views:

25

answers:

2

I currently work for a company that uses Kayako for their support system. They sell an extra program called Insta Alert that plays a sound when a new ticket is submitted.

I use WHMCS for my own company, and would like to develop something to work with it that does the same thing. Here is the WHMCS API...

http://wiki.whmcs.com/API:Functions

I am wondering if it would make more sense from a remote C++ application to use the API or just check the MySQL database for new tickets? This is not really something im overly familiar with (I usually make mods) but it doesn't seem overly difficult. I just want some assistance in choosing the best approach.

A: 

I would always prefer a published API over a (usually) black-box database, which has a much higher rate of change possibilities. An API has been exposed for the express purpose of integration.

Joe
A: 

Firstly, I wouldn't go down the route of playing with the database at all, an important system should have its database only accessible from 127.0.0.1 which would rule this possibility out.

Then you have the option of either push notifications or polling, depending on how your app works.

For polling you would need to remember which was the last ticket you saw, then you could use the API:Get_Tickets method (I believe you should use limitstart == last ticket you saw - we don't use this part of whmcs and instead also use kayako so I'm not sure)

Alternatively, If you want push notifications, then you could use http://wiki.whmcs.com/Hooks and the TicketOpen hook and then make whmcs send the ticket ID to your app.

Shane Mc Cormack