Jump to content

Action Hook - Notice Email when Note is added


rodeoXtreme

Recommended Posts

We are in need of a solution that will notify our Support Techs when a note is added to a Ticket in a Department that they are assigned to.

 

We started writing an action hook but we cannot get the emails to work. I have included what we have gotten so far; if we can get some thoughts how to get it to send the email:

 

<?php

function send_admin_note_email($vars) {

// ticketid, replyid, deptid, deptname, subject, message, priority, admin, status
   $ticketid = $vars['ticketid'];
   $ticketmessage = $vars['message'];
   $adminid = $vars['adminid'];

	$message = "<p>A new Admin note has been made.</p>\n\n";
	$message .= "<p> </p>\n\n";
	$message .= "<p>---<br />\n";
	$message .= $ticketmessage."<br />\n";
	$message .= "---</p>\n";
	$message .= "<p><a href=\"".$whmcs_admin_url."supporttickets.php?action=viewticket&id=".$ticketid."\">".$whmcs_admin_url."supporttickets.php?action=viewticket&id=".$ticketid."</a></p>\n";		
	// Get ticket, so we can notify all admins that are subscribed
	$postfields = array();
	$postfields["username"] = $username;
	$postfields["password"] = md5($password);
	$postfields["action"] = "getticket"; #action performed by the API:Functions
	$postfields["ticketid"] = $ticketid;

}

add_hook("TicketAddNote",1,"send_admin_note_email");
?>

Link to comment
Share on other sites

I had this discussion with another software recently, is emails the best way to go about it?

 

If you have a somewhat large (and growing) client base, for every ticket note an email will be dispatched. Lets say later on a tech goes to the ticket will they really remember that note for this specific ticket?

 

So a solution would be to have the ticket notes appear in the header of the ticket, before anything else. They visit the ticket and bang the first thing they see are the notes.

Link to comment
Share on other sites

Good point Alex, however, our Techs do not keep our WHMCS opened all of the time, they have other monitoring services they watch and perform other tasks. We use the notes to keep Tech's informed and update each other. We have an internal chat solution but unless the ticket is assigned to a specific Tech, it would be difficult to tell everyone that a note was added.

 

I remember years ago when we used Kayako; this was a feature that we loved and utilized it often. I would like to see better notification solution for ticket notes.

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