Is there a field in the DB that tracks where a ticket in a queue originated from?
I would like to have a "Ticket Source" field that automatically is populated on ticket creation with the appropriate source of the ticket creation, whether the web UI or email, with a custom ticket rule. However I don't know if that attribute is even tracked in the DB (or possibly already available in a default field I am missing) and would appreciate if someone could point me in the right direction if it is?
Answer Chosen by the Author
There isn't one field that tracks this, but it is possible by comparing some values from the HD_TICKET and the HD_TICKET_CHANGE tables, specifically the first change for the ticket.
If HD_TICKET_CHANGE.VIA_EMAIL is set then the ticket was created via email, otherwise it was created via the UI.
You can also compare who created the ticket with the possible owners to get an idea of whether or not an end user created the ticket or if it was created by a technician.
If you are creating tickets with a custom rule then those are probably coming in via email, and you can check to see what the value of VIA_EMAIL is in those cases. Presumably only tickets coming from that email address were created via rule.
Using that information you should be able to create ticket rules that will set your custom field appropriately.
Answered 03/03/2017 by: chucksteel
Please log in to comment
log in to commentPlease