Skip to content

Every 10 minutes

Get warned before tickets breach their SLA

Your team hears about a ticket 30 minutes before it misses its first-reply target, not after.

Runs
Every 10 minutes
Apps
Zendesk
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: every 10 minutes, check open Zendesk tickets and post to #support in Slack when one is within 30 minutes of breaching its SLA. Alert once per ticket.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A first-reply SLA of one hour looks achievable until a Friday afternoon queue builds up. A ticket is opened at 3:10 p.m., and by 3:45 nobody has replied. Zendesk will mark the breach after the fact, but a breached SLA is already a broken promise, and for enterprise customers it can mean a credit on the next invoice or a penalty written into the contract.

Every ten minutes, open tickets are listed with their SLA metrics. Any ticket whose first-reply target is set to breach in the next 30 minutes is picked out, and an alert is sent with the ticket link, the customer and the minutes remaining. Each ticket is alerted once, so the warning does not repeat.

Particularly useful for teams with contractual response times. The warning window can be tuned to how fast your team can respond.

What you get out of it

  • Breaches are prevented, not reported

    Thirty minutes is enough to find an agent and send a first reply, which is why the warning fires well before the target, not at it. Tickets get answered in time instead of being explained after the fact.

  • Contract penalties avoided

    Service credits in enterprise contracts often depend on first-reply targets. Each avoided breach protects real revenue and keeps the account relationship away from an uncomfortable conversation about penalties. Credits can reach five figures on large accounts.

  • Attention goes to what is nearest to failing

    The alert names the ticket and the minutes left, so triage during a busy hour takes seconds. The team goes first to the ticket closest to failing, not the one that arrived earliest.

  • Data on near misses

    Warnings show where the team comes close even when it succeeds. If they cluster at 3 p.m. on Fridays, you know the shift is too thin and can staff for it before a real breach.

  • One alert per ticket

    One alert per ticket keeps the channel readable on a busy day. People pay attention to a source that speaks only when something is at risk, and they ignore one that repeats itself.

  • Better numbers in contract reviews

    When a key customer asks how well you meet your response targets, you can answer with a record of warnings and the replies that followed. That is stronger than a general promise to do better.

How it works

What happens, step by step

  1. Every 10 minutes, ClickRuntime checks your open Zendesk tickets and their SLA targets.

  2. It picks out tickets that will breach a target, such as first reply time, within the next 30 minutes.

  3. Each ticket is flagged only once.

  4. A warning goes to your #support Slack channel with the ticket number, subject and breach time.

Before it runs live

  • Connect Zendesk

What you get

RunsEvery 10 minutes
Get warned before tickets breach their SLAtoday, 9:00Succeeded
Slack · #supportSLA (first_reply_time) breaches at 14:30Z: #4835 Refund still not received

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Zendesk steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
sla_breach_early_warning.pyexample
from datetime import datetime, timedelta, timezone
from clickruntime import on_trigger, http, credentials, notify, state, report_fetched

ZD = "https://yourcompany.zendesk.com/api/v2"
AGENT_EMAIL = "you@yourcompany.com"

def zd(method, path, **kw):
    r = http.request(method, f"{ZD}{path}", auth=(f"{AGENT_EMAIL}/token", credentials.secret("ZENDESK_API_TOKEN")), **kw)
    r.raise_for_status()
    return r.json() if r.content else None

@on_trigger
def run(event):
    soon = datetime.now(timezone.utc) + timedelta(minutes=30)
    alerted = set(state.get("alerted") or [])
    tickets = zd("GET", "/search.json", params={"query": "type:ticket status<solved", "include": "tickets(slas)", "per_page": 100})["results"]
    risky = []
    for t in tickets:
        for p in (t.get("slas") or {}).get("policy_metrics", []):
            at = p.get("breach_at")
            if at and p.get("stage") == "active" and datetime.fromisoformat(at.replace("Z", "+00:00")) <= soon and t["id"] not in alerted:
                risky.append((t, p))
                break
    report_fetched(len(risky))
    if not risky:
        return {"at_risk": 0}
    for t, p in risky:
        notify.slack(f"SLA ({p['metric']}) breaches at {p['breach_at'][11:16]}Z: #{t['id']} {t['subject']}\n"
                     f"https://yourcompany.zendesk.com/agent/tickets/{t['id']}", channel="#support")
        alerted.add(t["id"])
    state.set("alerted", list(alerted)[-1000:])
    return {"at_risk": len(risky)}

FAQ

Common questions

Which SLA metrics are used?
The Zendesk ticket's SLA information includes the next breach time for policies such as first reply time. The warning compares that time with the current time and fires if it falls within the warning window.
Do I need a particular Zendesk plan?
SLA policies are available on Zendesk plans that include them, such as Professional and above. Without SLA policies defined, tickets have no SLA metrics and nothing to warn about. The target comes from Zendesk, which gives each ticket its own next breach time.
Can the warning window be longer than 30 minutes?
Yes. The window is a number in the automation, so you can warn an hour ahead for slow-moving teams or 15 minutes for fast ones. Choose a window that gives a real chance to respond. The window is a number you can raise or lower.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get warned before tickets breach their SLA” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.