Workflow: How to alert your team to tickets nearing an SLA breach

In Zendesk, you can define service level agreements, or SLAs, to specify and measure the response and resolution times that your support team delivers to your customers. In this tutorial, you'll learn how to create automations that alert your team when an SLA is about to breach and notify you of a breached SLA. In this article: Note: Automations run once every hour, so an automation can send a notification as close as the hour before or the hour after an SLA breach. You can't send a notification at the exact moment of an SLA breach or use intervals smaller than hourly automations.

Expand all tabs



document.addEventListener('DOMContentLoaded', function () {
const toggleBtn = document.getElementById('master-toggle');

toggleBtn.addEventListener('click', function () {
const action = this.getAttribute('data-action');
const headers = document.querySelectorAll('.accordion');

headers.forEach(header => {
const isActive = header.classList.contains('active');
const panel = header.nextElementSibling; // Grabs the corresponding .panel container

if (action === 'expand' && !isActive) {
// Open it by simulating a standard click
header.click();
} else if (action === 'collapse' && isActive) {
// Close it by simulating a standard click
header.click();
}
});

// Flip button text and states
if (action === 'expand') {
this.setAttribute('data-action', 'collapse');
this.textContent = 'Collapse all tabs';
} else {
this.setAttribute('data-action', 'expand');
this.textContent = 'Expand all tabs';
}
});
});
Create an automation to notify the team when an SLA is about to breach
The condition Ticket: Hours until next SLA breach lets you build an automation that notifies a team or an individual user of an SLA about to breach.
To create this automation:

Add a new automation

Under Meets all of the following conditions, select these conditions: Ticket: Hours until next SLA breach | Less than | 2 Ticket: Status category | Less than | Solved Ticket: Tags | Contains none of the following | sla_alert The status category condition ensures the automation saves successfully. You can also use conditions for Type, Group, Assignee, or Requester to meet this requirement.

Under Perform these actions, add these actions: Notifications: Group email | (assigned group) Email subject:
SLA about to breach: {{ticket.id}}
Email body:
This is a notification to inform you that a ticket assigned to your group
is approaching its SLA breach time.

Ticket: {{ticket.link}}

Time remaining until SLA breach: Less than 2 hours

Prioritize this ticket to ensure it is resolved or addressed promptly.
Ticket: Add tags | sla_alert Use the Ticket: Tags condition and the Ticket: Add tags action to ensure the automation doesn't fire more than once. For more information, see About automations and how they work.

Click Create automation



This workflow notifies your team when the SLA breach happens in less than two hours. If you need a longer or shorter timeframe, change the value under Ticket: Hours until next SLA breach.
Create an automation to notify the team of a breached SLA
The condition Ticket: Hours since last SLA breach lets you build an automation that notifies a team or an individual user after your agents breach the SLA.
To create this automation:

Add a new automation

Under Meets all of the following conditions, select these conditions: Ticket: Hours since last SLA breach | Less than | 1 Ticket: Status category | Less than | Solved Ticket: Tags | Contains none of the following | sla_alert2 The status category condition ensures the automation saves successfully. You can also use conditions for Type, Group, Assignee, or Requester to meet this requirement. Use the Ticket: Tags condition and the Ticket: Add tags action to ensure the automation doesn't fire more than once.

Under Perform these actions, add these actions: Notifications: User email | (You or the agent responsible to monitor SLA breaches) Email subject:
SLA recently breached: {{ticket.id}}
Email body:
This is a notification to inform you that a ticket had an SLA breach.

Ticket: {{ticket.link}}

Time elapsed since the last SLA breach: Less than 1 hour

Prioritize this ticket to investigate the cause of the breach.
Ticket: Add tags | sla_alert2 Use the Ticket: Tags condition and the Ticket: Add tags action to ensure the automation doesn't fire more than once.

Click Create automation



This workflow notifies your team when the SLA breaches in less than one hour. If you need a longer timeframe, modify the value under Ticket: Hours since last SLA breach.
