Jump to content

Basic Pushover push notification PHP script for new/reassigned tickets


Recommended Posts

I've had trouble getting WHMCS's email notifications when tickets are opened or reassigned to do what I want them to do, and I'm also a big fan of the Pushover push notifications app/service, so I created this basic PHP script that will send me a push notification whenever a ticket is opened in or reassigned to a particular support department:

 

http://pastebin.com/sUFS4sqB

 

Since the WHMCS API doesn't provide for searching tickets in this way, my script queries the WHMCS database directly. If you want to change which support departments are being "watched", get the department's numeric ID and then modify this line in the SQL query:

 

did in (2, 3)

 

It needs to be run via cron every X minutes, where the $history_interval variable is set to that same number of minutes. In my use of it I'm running it every 5 minutes, so:

 

*/5 * * * * php -q /home/whmcs/bin/notify_whmcs_tickets.php

 

I hope this is helpful to someone else who uses WHMCS and Pushover. I would welcome any improvements or refinements.

 

Chris

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated