Avoiding conflicting triggers Follow

Something you may need to watch out for are triggers that undo or modify an action that was contained in another trigger. Imagine that you've created a trigger to assign tickets from requesters based on the company they work for. To do that is quite simple. You add tags to your organizations and then when users from those organizations submit support requests, those tags are added to their tickets.

Example Bank 1 Organization

Example Bank 2 Organization

Whenever a ticket from a user in either of these organizations is received, the appropriate tag is added to the ticket.

You can then use the 'acme' and 'orange' tags in a trigger that assigns these tickets to the appropriate group. For example, we want to assign tickets from both of these banks to the Level 2 Support group.

When the trigger fires, the group assignments are made.

Imagine then that you have another trigger that assigns tickets received via email to the Level 1 Support group, as in this trigger example:

The problem here is that there's an unintended conflict. The first trigger will assign tickets from these banks to the Level 2 Support because those tickets contain either the 'acme' or 'orange' tag and the second trigger then changes the group to the Level 1 Support group because the request was received via email. The intended behavior of course is that we want tickets from these banks to automatically be assigned to the Level 2 Support group.

This happened because you can only assign a ticket to one group at a time and we've got two active triggers that are setting two different group assignments based on different conditions.  

The order in which your triggers are listed on your Triggers page makes a big difference because triggers are processed in order from top to bottom. In our list of triggers, the Assign Bank Customers Tickets To Level-2 Support trigger comes before the Assign Tickets Received By Email to Level-1 Support trigger, which explains how the assignments were made.  In this example, reversing the order of these two triggers would address the problem.

The point of this example is to demonstrate how important it is to have oversight of all of the triggers in your Zendesk to make sure that they're not conflicting with each other and that your workflow is behaving as you expected. In some cases, you can resolve a trigger sequencing issue by reordering your triggers; sometimes however you'll need to modify or deactivate your triggers instead.

To bring this full circle, if you wanted to accomplish what both of these triggers are trying to accomplish without having them conflict with one another, you just need to take a slightly different approach. The goal is to assign tickets received by email to the Level 1 Support group unless they are from one of your bank customers, in which case you want those tickets assigned to the Level 2 Support group. To do this, you'll still need both triggers, but a condition needs to be added to the Level 1 trigger that will check that the tags for the requester's organization is not for one of those banks, which is what were using in the Level 2 trigger (acme or orange).

In the first trigger, which must come before the second trigger, tickets submitted by email that aren't also tagged with a bank customers tag (i.e. acme or orange) are assigned to the Level 1 Support group as they should be. Then the second trigger, which comes after the first, assigns tickets from the bank customers to the Level 2 group instead, based on the organization tags that were added to tickets automatically when they were created.

Here is an example of the order in the triggers page in Zendesk that shows the correct trigger order.

Hopefully these examples give you a good idea of how triggers interact with each other and how important it is to make sure that you're creating triggers with all your other triggers in mind, that the order of your triggers is considered, and that you should always have specific conditions that act on specific tickets.

When you're dealing with lots of triggers and a high volume of tickets, inefficiencies in how you've created your triggers can impact how quickly your tickets are processed and the efficiency of your agents.

Have more questions? Submit a request

Please sign in to leave a comment.

Powered by Zendesk