How do triggers run according to theirs position on the trigger page?
Triggers continue to execute until none of the trigger conditions are met. This means that Zendesk may run through the list of triggers several times until no more tickets meet the trigger conditions.
Thus, it's important to understand exactly how triggers are executed. This document breaks down that workflow:
How do trigger execute?
Triggers will run each time a ticket is:
Trigger execution can be broken down into a few stages:
- The current trigger is evaluated. The ticket is checked against the conditions specified for the trigger, and a ticket which satisfies those conditions is updated according to the actions defined in the trigger.
- Once that trigger has been evaluated, Zendesk moves on to the next trigger in the list of triggers and repeats the evaluation step.
- This continues until the end of the list of triggers is reached. At that point, Zendesk returns to the top of the list of triggers and begins evaluating each trigger again to see if the ticket suddenly meets the conditions. Previously fired triggers shouldn’t fire again, but if a trigger is suddenly made true by a prior trigger (even one that ran on a previous loop through the list of triggers) then that trigger will fire.
- Trigger execution for that ticket will stop only when the ticket fails to satisfy any new trigger conditions.
Why does it matter?
Admins sometimes try to use trigger order as a way of creating triggers with imprecise or incomplete conditions. They will place a trigger earlier in the trigger order thinking it won’t fire because the conditions weren’t met on the initial iteration of trigger execution. Unfortunately, that’s incorrect and the trigger will fire on a subsequent iteration if the trigger conditions are suddenly fulfilled due to the action performed by a later trigger.
It’s important to create trigger conditions which are as specific as possible, taking into account all triggers present in the account. This is beneficial because:
- It narrows down the search criteria
- Will return fewer tickets
- Fewer tickets to act on means the trigger run will be faster and more efficient
- Fewer chances of overlapping conditions