Hi, I find the built-in 'email on event' rules too basic and a little dumb in some respects. For example, if you tick the box to notify just the submitter of a comment then even if the sumbitter makes the comment (by email in this example), then an email alert is generated back to the submitter notifying them of the comment. Duh KACE, the client knows about this comment, they just made it!

Also, even though you may only tick one box, the email alert will still list all the changes made to the ticket within the time frame of that notification which I don't want.

For this reason, on all my queues, I have all but one of the factory 'email on event' rules disabled and have replaced them with custom rules. Unfortunately I am not clever enough at SQL to create my latest one and am after some help.

I will place a custom field on the queue called 'Send to client' and it's type will be set to 'Note' to give it the big text box.

The rule I want from that field is:

-If 'Send to client' contains text (or is not null), send that text to the client by email, appended with something like "Hello, the IT staff member working on your helpdesk ticket has sent the below message to you which may require a response."

-If the client responds to that message, paste the contents into the ticket as a 'Comment' and also email the assignee to let them know of the response, again appended with something like "The client has responded to a message you sent them via ticket number <ticknum>. The response was: <text>."

That's it. It means I don't have to enable every comment being sent to the client and only the required email notifications and updates will be recieved.

Appreciate any help in creating this rule.



1 Comment   [ + ] Show Comment


  • The custom fields may not be needed as the HD_TICKET_CHANGE data tables hold this information.

    Changes to the ticket like drop downs or categories and such are stored in the HD_TICKET_CHANGE.DESCRIPTION field but any comments in a ticket are stored in HD_TICKET_CHANGE.COMMENT and these can both be aliased to be included in the email body as you see fit. (Aliasing it in sql with a AS statement then $alias in the email body.)

    This also means you need to get the hd_ticket_change id that matches that ticket.

    Take a look at this article:
    • Thanks. I've decided I'm making it too complicated. Do you know how I could modify the built-in email event for when a comment is made so that it doesn't send the email notification to the submitter if it was the submitter that made the comment?
      E.g. At the moment if you enable the email notification to submitter when a comment is made option, they get an email notifying them of a comment they made, which is silly.
Please log in to comment

There are no answers at this time


Answer this question or Comment on this question for clarity