3

SLA next breach automation

With the new SLA features in place, I wanted to try to set up an automation that can actually warn our support staff (or do something else) when a ticket is closing in on a SLA breach. That way we can handle the issue before the SLA is breached. 

With a little help from a community moderator I ended up with the following setup.

The setup should be almost self explanatory, but the ticket tag use should be explained in more detail. In short, the way automations work, an automation can only run once per ticket. If there is a chance it can run multiple times, the automation can not be created. (You will get the error message below:)

 

Automation could not be created as:

  • Automation must not run multiple times per ticket: It must have a time based condition that is only true once (Hours since created is 24) or a action that nullified a condition ("Priority Is High" and an action setting it to "Priority Is Urgent").

 

So a tip from a community moderator (Colin Piper) was to check if a specific tag is set on the ticket (in this example called "sla:breach:in:1). If it already exists (the automation has already run), the automation does not run again for the same ticket.

You can perform any action you would like after this, my mission was to create an email notification that can alert me of the ticket status.

This works great!

Now, what about cases where we have several possible SLA breaches for a ticket? A tip is to add a trigger that removes the tag when the issue is updated, which will allow for the automation to run again when the ticket is closing in on another SLA breach.

9 comments

  • 0

    Awesome, Tio! Thanks for sharing your solution.

    This will be useful to a lot of users, I think!

  • 0

    @Thanks Tio - can't wait to try it out in my environment.

  • 0

    Very useful, thanks @Tio

  • 1

    I'm interested in doing something like this but posting it to our Slack channel. Will have a play around and come back with results :)

  • 0

    This is really useful, thanks!  How would I modify this if I wanted to send the notification to Slack rather than via email?  I have a separate Slack webhook trigger setup already, but it does not appear as an option in the Automations flow.  

  • 0

    Hey Jon! Great question.

    I did some messing around with the Slack integration for Zendesk, but it doesn't look like you can specify notifications by tag - just by status. Which I think will end up being too noisy.

    I set up something similar for Community notifications, so I think we can figure out how to get this done for you. Here's what I did,:

    In a Gmail inbox, I set up a filter to apply a label to any incoming notification with specific keywords. (I have a designated one for Community notifications, but you can use your own if needed.)

    Then I set up a recipe in IFTTT to send a Slackbot notification anytime an email arrives in the inbox with that label. IFTTT allows you to select whatever channel you want the notification to go to, and you can customize what the notification says. So you could set up a different recipe for each SLA level with text specific to that level.

    Now, I know that Slack has an API, so if you're smarter than I am you might be able to get something set up with that and Zendesk's API and bypass the middleman altogether. We have a section in our Community devoted to API questions, which you can find here.

    Hope that helps!

     

     

  • 0

    I implemented this today using Slack.

     

    1. Created a new custom integration specific for SLA breaches. Select incoming webhooks.

    2. Choose your channel and click add incoming webhook integration

    3. Setup all your integration settings to your liking (ie Customization name, icon, etc)

    4. Copy the webhook URL

    5. Head over to extensions in Zendesk and create a new target.

    6. Select URL Target

    7. Set the Title to something like SLA Breach Slack, the URL to the webhook URL you previously copied, the method to Post, and the attribute name to payload

    8. Create target and submit.

     

    Once I created the new target, I set the message to something like:

     

    {"text": "<{{ticket.link}}|Ticket #{{ticket.id}}> is about to breach SLA in 1 hour, please act accordingly!"}

     

     

    Hope that helps!

  • 0

    Thanks for sharing, Jay!

  • 0

    Trying to get the Slack notifications working with the incoming webhooks.

    Jay (or someone else), does yours work with an automation as Tor shows, or is it with a Trigger (to Notify target)? Or can it be either.....

Please sign in to leave a comment.