What it does
Zendesk views tell you how many tickets are waiting. They are less helpful about which of those already broke an SLA promise: that is a red badge you only find by opening the view and scanning down the list.
Twice a day, at 8:00 and 14:00, the agent counts unsolved tickets through the Search API, splits them by priority and age, and reads the SLA metrics of the urgent and high tickets so every breach is listed by number. The tile is the unsolved count, so a falling line means the team is getting ahead.
How it works
1Count unsolved by priority
Call
GET /api/v2/search/count?query=type:ticket status<solvedfor the total, then addpriority:urgent,priority:high,priority:normalandpriority:lowfor each band; the difference from the total is tickets with no priority.status<solvedcovers new, open, pending and on-hold.2Split out tickets waiting on someone else
Repeat the counts with
status:pendingandstatus:hold, so work the team owes is separate from tickets waiting on the customer or a third party.3Age the queue
Count
type:ticket status<solved created<YYYY-MM-DDwith the dates 3 and 7 days ago, per priority. For the oldest tickets themselves, useGET /api/v2/search?query=...&sort_by=created_at&sort_order=asc.4Find SLA breaches
Load each unsolved urgent and high ticket with
GET /api/v2/tickets/{ticket_id}?include=slas. A breach is an entry inslas.policy_metrics(such asfirst_reply_timeornext_reply_time) whosebreach_athas passed and that has not been achieved yet.- 5
5Compare and post
Compare the unsolved total with the previous run, then post it with the priority and age table and the breached tickets: number, subject, metric and how long ago it breached.
Post it to the board
With
BRIEFKIN_TOKENset, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.
What you get
- Unsolved tickets now, and the change since the last run.
- By priority, with how many are pending or on-hold.
- Age: unsolved tickets older than 3 and 7 days.
- Past SLA: breached tickets with the metric and how long ago, most urgent first.
Install and run it
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
Install the skill
One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.
shell
curl -fsSL https://briefkin.dev/skills/zendesk-ticket-backlog/install | shRun it
Ask Claude Code:
prompt
Run the zendesk-ticket-backlog skillOr paste the prompt instead of installing:
prompt
Using the Zendesk Search API, count unsolved tickets (type:ticket status<solved) in total and by priority, and how many of each are pending or on-hold. Count unsolved tickets created more than 3 and more than 7 days ago. For unsolved urgent and high tickets, load the SLA sideload (include=slas) and list any whose SLA metric has a breach_at in the past and is not yet achieved: ticket number, subject, which metric (first reply, next reply...) and how long ago it breached. Show the totals first, then the breaches, most urgent first.Put it on a schedule
Weekdays at 8:00 and 14:00, from cron on any machine where Claude Code is signed in:
crontab
0 8,14 * * 1-5 claude -p "Run the zendesk-ticket-backlog skill"Add it with
crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.Send it to your board
Connect Briefkin once with
curl -fsSL https://briefkin.dev/install | shand every run lands on your board as a stat tile. How setup works
View the SKILL.mdRaw file
SKILL.md---
name: zendesk-ticket-backlog
description: "Twice each weekday: unsolved Zendesk tickets by priority and age, the ones already past their SLA target, and whether the queue grew. Use when the user asks for this, or when it runs on a schedule."
---
# Zendesk ticket backlog
Twice each weekday: unsolved Zendesk tickets by priority and age, the ones already past their SLA target, and whether the queue grew.
Zendesk views tell you how many tickets are waiting. They are less helpful about which of those already broke an SLA promise: that is a red badge you only find by opening the view and scanning down the list.
Twice a day, at 8:00 and 14:00, the agent counts unsolved tickets through the Search API, splits them by priority and age, and reads the SLA metrics of the urgent and high tickets so every breach is listed by number. The tile is the unsolved count, so a falling line means the team is getting ahead.
## Two ways to get the data
Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.
## Route A: API or MCP server
### What you need
- A Zendesk agent or admin login with an API token (`ZENDESK_SUBDOMAIN`, `ZENDESK_EMAIL`, `ZENDESK_API_TOKEN`), or a Zendesk connector with read access to tickets.
- SLA policies set up in Zendesk (Suite Growth or above, or Support Professional or above); without them the breach list stays empty.
If something is missing, say what and stop; do not invent numbers.
### Steps
1. **Count unsolved by priority** (Zendesk): Call `GET /api/v2/search/count?query=type:ticket status<solved` for the total, then add `priority:urgent`, `priority:high`, `priority:normal` and `priority:low` for each band; the difference from the total is tickets with no priority. `status<solved` covers new, open, pending and on-hold.
2. **Split out tickets waiting on someone else** (Zendesk): Repeat the counts with `status:pending` and `status:hold`, so work the team owes is separate from tickets waiting on the customer or a third party.
3. **Age the queue** (Zendesk): Count `type:ticket status<solved created<YYYY-MM-DD` with the dates 3 and 7 days ago, per priority. For the oldest tickets themselves, use `GET /api/v2/search?query=...&sort_by=created_at&sort_order=asc`.
4. **Find SLA breaches** (Zendesk): Load each unsolved urgent and high ticket with `GET /api/v2/tickets/{ticket_id}?include=slas`. A breach is an entry in `slas.policy_metrics` (such as `first_reply_time` or `next_reply_time`) whose `breach_at` has passed and that has not been achieved yet.
5. **Compare and post**: Compare the unsolved total with the previous run, then post it with the priority and age table and the breached tickets: number, subject, metric and how long ago it breached.
## Route B: the browser
### What you need
- Signed in to Zendesk as an agent with Explore Viewer access or above; adding the SLA column to a shared view needs an admin.
If something is missing, say what and stop; do not invent numbers.
### Steps
Start at https://www.zendesk.com/login/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.
1. **Open the Support dashboard in Explore**: Enter your subdomain on the sign-in page (you land on `https://<subdomain>.zendesk.com/agent/`), then open **Explore** from the product tray and go to **Dashboards** > **Zendesk Support**. The **Unsolved Tickets** tab gives unsolved tickets by priority and by status; filter by group or brand if the team's view does.
2. **Read the backlog by age**: On the same tab, read the unsolved counts by age bracket for older than 3 and 7 days. For exact numbers, switch to Support, open **Views** > **All unsolved tickets**, sort by **Requested** oldest first and count down to the 3-day and 7-day marks.
3. **Find the SLA breaches**: In **All unsolved tickets**, add the **SLA** column (admins do this under the view's **Formatting options**) and sort by it ascending: breached tickets show a red badge with the time since the breach. Read the urgent and high ones with their ticket number, subject and the metric named in the badge.
4. **Compare and post**: Set the unsolved total against the number from the previous run, then post it with the priority and age table and the breached tickets, most urgent first.
Note: Explore dashboards refresh about once an hour, so the view counts in Support can run a little ahead of the dashboard. Views list 30 tickets per page and show the total at the top. The SLA column exists only when SLA policies are set up (Suite Growth or above, or Support Professional or above).
## The report
- **Unsolved tickets** now, and the change since the last run.
- **By priority**, with how many are pending or on-hold.
- **Age**: unsolved tickets older than 3 and 7 days.
- **Past SLA**: breached tickets with the metric and how long ago, most urgent first.
## Post it to Briefkin
When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.
```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
-H "authorization: Bearer $BRIEFKIN_TOKEN" \
-H "content-type: application/json" \
-d @- <<'JSON'
{
"v": 1,
"event_id": "zendesk-ticket-backlog/<date of this run, e.g. 2026-10-16>",
"item_key": "zendesk-ticket-backlog",
"project": "Acme",
"source": "Zendesk ticket backlog skill",
"kind": "metric",
"title": "63 unsolved tickets, 4 past SLA",
"metric": {
"label": "Unsolved tickets",
"value": 63,
"better": "lower",
"period_start": "<start of the period, ISO 8601>",
"period_end": "<end of the period, ISO 8601>"
},
"glance": {
"type": "Grid",
"props": {
"columns": 3
},
"children": [
{
"type": "Stat",
"props": {
"label": "Urgent or high",
"value": 11
}
},
{
"type": "Stat",
"props": {
"label": "Older than 7 days",
"value": 9,
"tone": "warn"
}
},
{
"type": "Stat",
"props": {
"label": "Past SLA",
"value": 4,
"tone": "bad"
}
}
]
},
"widget": [
{
"type": "Table",
"props": {
"columns": [
"Priority",
"Unsolved",
"Pending or on-hold",
"Over 3 days",
"Over 7 days"
],
"align": [
"left",
"right",
"right",
"right",
"right"
],
"rows": [
[
"Urgent",
3,
0,
1,
0
],
[
"High",
8,
2,
3,
1
],
[
"Normal",
39,
11,
14,
6
],
[
"Low",
9,
3,
4,
2
],
[
"No priority",
4,
1,
1,
0
]
]
}
},
{
"type": "Table",
"props": {
"columns": [
"Ticket",
"Priority",
"Breached",
"Since"
],
"align": [
"left",
"left",
"left",
"right"
],
"rows": [
[
"#21874 Checkout fails with card declined",
"Urgent",
"First reply",
"2 h ago"
],
[
"#21851 Cannot export invoices to CSV",
"High",
"Next reply",
"5 h ago"
],
[
"#21790 SAML login error after IdP change",
"High",
"First reply",
"1 day ago"
],
[
"#21702 Data import stuck at 90%",
"High",
"Next reply",
"3 days ago"
]
]
}
},
{
"type": "Callout",
"props": {
"text": "#21874 is urgent and still has no first reply.",
"tone": "bad"
}
}
],
"size": "md"
}
JSON
```
Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.
Set `period_start` and `period_end` to the window the number covers: the tile names it from them ("Last 7 days", "Today", "This month"). For a count right now (open items, a balance), send `"period_label": ""` so no period shows; for another name, send it as `period_label` (at most 24 characters).
## Run it on a schedule
Suggested: Weekdays at 8:00 and 14:00 (`0 8,14 * * 1-5`). From cron, with the agent signed in on that machine:
```bash
0 8,14 * * 1-5 claude -p "Run the zendesk-ticket-backlog skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```
Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/zendesk-ticket-backlog#schedule
Source: https://briefkin.dev/skills/zendesk-ticket-backlog
What your agent needs
A Zendesk agent or admin login with an API token (
ZENDESK_SUBDOMAIN,ZENDESK_EMAIL,ZENDESK_API_TOKEN), or a Zendesk connector with read access to tickets.SLA policies set up in Zendesk (Suite Growth or above, or Support Professional or above); without them the breach list stays empty.
Connecting Zendesk
- MCP server. Zendesk doesn't list an official one; community MCP servers exist, and they need the same subdomain, email and API token as a direct API call.
- API with an API token. An admin enables token access in Admin Center under Apps and integrations > APIs and creates a token. The skill reads
ZENDESK_SUBDOMAIN,ZENDESK_EMAILandZENDESK_API_TOKENand sends basic auth as{email}/token:{token}. - OAuth client. For a narrower credential, register an OAuth client in Admin Center and request the
readscope.
An API token acts as the user who made it, with that agent's full rights; an OAuth token with only read can't update, assign or close tickets.
Questions
Why does the count differ from my Zendesk view by a few tickets?
Search results are indexed with a short delay, usually a minute or two, and a view can apply conditions the search does not, such as a group or brand. Add group: or brand: to every query if your view filters on them.
Do pending tickets count as backlog?
They are in the unsolved total, because the ticket is not done, but the table shows them in their own column. To leave them out of the headline, change the query to status<pending and the tile tracks only new and open tickets.
Do I need Briefkin to use the Zendesk ticket backlog skill?
No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a stat tile, so you can glance at it instead of asking again.
Which agents can run it?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.
Can it work without an API or MCP server, from my browser?
Yes. Switch the data source to "Your browser" and the steps change to the Zendesk pages themselves: the agent opens www.zendesk.com/login in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.