Helpdesk SLA Digest
Turns a helpdesk ticket payload into a ranked SLA-breach digest: how many tickets are past target, which are worst, and which are still unassigned. Runs locally in Python's standard library. No credential, no network.
Tool ID
helpdesk-sla-digest
Credential Required
No. This tool does not fetch tickets. Pair it with a tool that does, such as zendesk, and pass that tool's output in.
Use case
A ticket search returns raw JSON, which makes a poor alert. This tool does the ageing, ranking and counting, so the message that goes out says how many tickets are past target and which ones to look at first.
Published Outputs
| Output | Description |
|---|---|
digest |
Multi-line text summary, ready to send |
breachCount |
Number of open tickets past their SLA target |
unassignedBreaches |
How many of those have no assignee |
worstOverdueHours |
Hours past target for the worst ticket (0 when none) |
scanned |
Number of tickets in the payload |
resultJson |
Everything above plus the breaches array, as one JSON object |
Example
Input:
{
"tool": "helpdesk-sla-digest",
"properties": {
"ticketsJson": "{\"results\": [{\"id\": 101, \"subject\": \"Checkout page returns 500\", \"priority\": \"urgent\", \"status\": \"open\", \"created_at\": \"2026-10-12T09:00:00Z\", \"assignee_id\": null}, {\"id\": 102, \"subject\": \"Cannot reset password\", \"priority\": \"high\", \"status\": \"open\", \"created_at\": \"2026-10-11T14:30:00Z\", \"assignee_id\": 7}, {\"id\": 103, \"subject\": \"Invoice PDF is blank\", \"priority\": \"normal\", \"status\": \"pending\", \"created_at\": \"2026-10-12T15:00:00Z\", \"assignee_id\": 4}, {\"id\": 104, \"subject\": \"Feature request: dark mode\", \"priority\": \"low\", \"status\": \"solved\", \"created_at\": \"2026-09-01T10:00:00Z\", \"assignee_id\": 4}]}"
}
}
Actual captured output (run at 2026-10-12 21:01 UTC):
2 of 4 ticket(s) past SLA (1 still unassigned). Worst is 26.5h over.
#102 [high] 26.5h over (30.5h old, target 4.0h) — Cannot reset password
#101 [urgent] 11.0h over (12.0h old, target 1.0h) UNASSIGNED — Checkout page returns 500
How it works
A ticket breaches when its age since created_at exceeds the target for its priority. The defaults are urgent 1h, high 4h, normal 24h, low 72h; slaHours overrides any of them. Breaches are listed worst first.
Solved and closed tickets are excluded. A ticket with no readable created_at is skipped and the digest says how many were.
The payload may be a Zendesk search response ({"results": [...]}) or a bare JSON array. Jira-style field names and date formats are read too.
Chaining Patterns
- zendesk → helpdesk-sla-digest → message — a scheduled SLA report to the support lead
- Use
{{task.breachCount}}in a later task'sifto send only when something is past target
Limitations
- Age is measured from ticket creation. First-response and next-reply SLAs, business hours and paused clocks are not modelled.
- If the ticket list cannot be found in the payload, the task fails and says so. It does not report an all-clear over a payload it could not read.
Source
tool.iml, sla_digest.py
Publishes
The keys a later task may reference as {{taskName.key}}. Referencing anything not listed here resolves to nothing at run time.
breachCountdigestresultJsonscannedunassignedBreachesworstOverdueHours
Input Properties
Every property this tool accepts, from its own tool.iml.
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
ticketsJson |
string | yes | — | Ticket payload as JSON. Accepts a Zendesk search response ({"results":[...]}) or a bare JSON array of tickets. |
slaHours |
string | no | {} |
Optional JSON object mapping priority to hours-until-breach, e.g. {"urgent": 1, "high": 4}. Omit for the defaults: urgent 1h, high 4h, normal 24h, low 72h. |
topN |
integer | no | 10 |
How many breaches to list in the digest. Counts always cover every ticket; this caps only the listing. |