Creating a 'Next update SLA' timer workflow (advanced)

A next update SLA timer measures the amount of time it takes to update the requester using the last update as the starting point. In order to achieve this it requires you to stop and restart the same timer at the same time (the point that the update takes place). 

Problem: If you try to do this by firing both triggers that start and stop the timer at the same time, the workflow will fail. This is because no matter the order of triggers, they all fire at the same time and it becomes a matter of chance as to whether the trigger that stops the timer fires before the trigger that starts it (which would result in a successful restart) or the reverse, which would result in the timer failing to restart. 

As such in order to ensure that the trigger that stops the timer always fires first, you need to prevent the start timer from firing until the timer has been confirmed to have stopped.

How do you confirm that your Next update SLA timer has stopped? 

In the timer definition, for the Timer Stopped ticket update, set it to add the tag "next_update_sla_stopped" like this: 




Now in the trigger that starts the timer ensure that it contains the rule under Meet ALL of the following conditions

"Ticket Tags" - "Contains at least one of the following" - "next_update_sla_stopped"

Lastly under the ticket Actions, in addition to the webhook calling the timer to be started, add the rule: 

"Remove tags" - "next_update_sla_stopped". 


So the resultant workflow is as follows: 

1) Trigger fires to start the "Next update SLA" timer. 

2) Update is provided by the agent, this causes the Trigger to stop the "Next update SLA" timer to fire. 

3) The stop command hits the SweetHawk server and it the settings of the timer definition updates the ticket with the tag "next_update_sla_stopped".

4) The addition of the tag, allows the trigger to start the "Next update SLA" timer again. This loops us back to 1).  


In summary, what you're doing above is creating a dialogue between the trigger and the timer definition to ensure things happen in the correct order. 


Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.