Adding multiple task lists in a particular order

If you're wanting to add multiple task lists automatically to a ticket (as per these instructions) and you're wanting to place those task lists in a particular order, the most obvious approach would be to notify all of the targets in a single trigger. However, unfortunately, due to the nature of Zendesk triggers, this method will fire all targets at once rather than in the order specified. As such it is not possible for SweetHawk's servers to know which list should be added in which order, and they end up being added in random order. 

You may also be thinking that by separating things out so that each task list is added by a separate trigger which instigates the next trigger to fire would be the solution here. However, this will not work either, again due to the nature of Zendesk triggers in that not only do they fire all actions within a single trigger at once, but they also fire all triggers that have their conditions met at once. This includes triggers that change a ticket to make other triggers fire in the same ticket update. 

As such the only way to reliably add multiple task lists in a specific order is to create a dialogue between the tasks app so that each trigger adds a task list, and each task list that gets added in-turn adds a tag that causes the next trigger to fire. 

To do this, first specify a tag that gets added when the first of the lists is added to the ticket like this:

Screen_Shot_2019-05-08_at_12_27_17_pm.png

​​SweetHawk__-_Agent.png

Then you can build a trigger that looks for this tag and adds the next task list in the order of lists like this: 

SweetHawk__-_Agent.png

Now in your second task list set it so that the moment it's added to a ticket, it adds the tag that the trigger above is checking doesn't yet exist on the ticket like this:

Screen_Shot_2019-05-08_at_1_06_55_pm.png

SweetHawk__-_Agent.png

It's very important that you set the second list to add the tag that the trigger is checking isn't on the ticket. This is because if the trigger above were to fire and the tag wasn't added then nothing would be stopping it from firing every time the ticket was updated. ie. you would end up with a looping trigger. 

Now at the point that the second task list is added, the tag "task_list_2_added" gets added to the ticket by the app. 

To add a third task list, it's simply a matter of repeating the above steps. 

Create a trigger that checks the second list was added, the third one wasn't and then adds it like this:

SweetHawk__-_Agent.png

And in your 3rd task list set it so that the moment it's added to a ticket, it adds the tag that the trigger above is checking doesn't yet exist on the ticket like this:

Screen_Shot_2019-05-08_at_1_32_09_pm.png

SweetHawk__-_Agent.png

You can then repeat this process for as many task lists as you need to be added. 

This means that you will end up with as many triggers as you have task lists that you want in order.

In order to keep your triggers to a minimum, you should consider combining task lists as much as possible.

 
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk