Trigger running on creation AND on update
Hello,
something really missing is a criteria to run a trigger when a ticket is created AND updated. Sometimes infos just follow with an update because an agent has to request giving infos about what happened at all. The trigger then would not get triggered or the double amount of triggers would have to be created and managed.
Best regards,
Sebastian
-
Hey Sebastian,
If you add:
Ticket is Created
Ticket is Updated
Under the 'Any' section of the trigger conditions, it should fire on create and update events.
-
Thanks for sharing that solution, Dan. Sebastian, let us know if that solves the issue for you.
-
Thanks for the idea, strange that trigger aren't triggered ALWAYS anyway when a ticket gets created or updated.
In any case this would not work when I would want to run the trigger with other conditions like
commenttext contains "this is an emergency"
or
"this is not true"
because this trigger would get triggered always because one of these 4 conditions is always true.
It might be possible to create a trigger that only contains created and updated and then set a certain keyword. Then in each other trigger put this keyword as a binding requirement for the trigger to run. Though I'm not sure if these other triggers then would be started at all without being asked for created or updated again. -
It seems the trigger can only be saved when there is an all condition set.I used ticket is not closed.
And it works. all other tickets need as all criteria the keyword. all other criterias can be set normally.
Looks like it works, the additional keyword "changed" I used, is not so good, since it has to be in every ticket, but at least it does the trick. -
While it probably seems frustrating now, it's actually quite a good thing triggers aren't executed on every action. Sometimes there's a need just for selective activation.
For the objective you're describing, you could try something like:
ALL Conditions
Status less than Closed
ANY Conditions
commenttext contains the following string "this is an emergency"
commenttext contains the following string "that is not true"
----
Since any tickets you can actually act on are always less than Closed (New -> Solved) this should always be true. This frees up the ANY section for the actual criteria you want to evaluate.
A word about string matching (that I learned the hard way) - unless you're piping in tickets from a system that defines the string (a system that sends data with fixed content that you know will always be an exact match) it's very easy to miss catching on events. You may have more success using the contains at least one of the following and then enter an array of synonyms. Customers may write in different styles that express the same sentiment.
For example, instead of:
comment text contains the following string "this is an emergency"
Consider:
comment text contains at least one of the following words "emergency urgent critical catastrophe serious"
EDIT: I replied to the email notification from your earlier comment before you found a solution. Seems the emails are a bit delayed. Glad you found something that works!
-
I'm going to move this thread over to Q&A so that other users can more easily find it for their own troubleshooting purposes.
Please sign in to leave a comment.
6 Comments