Count the support tickets your AI agent never answered
At the end of a shift, I’d ask for the list of tickets the help desk accepted. That’s where I’d start checking whether an AI agent helped customers. If you start with the agent’s replies, every ticket that produced no re
At the end of a shift, I’d ask for the list of tickets the help desk accepted. That’s where I’d start checking whether an AI agent helped customers. If you start with the agent’s replies, every ticket that produced no reply has already disappeared from the review.
Did the customer get a reply by the deadline? Did someone take ownership when the agent couldn’t finish? A handoff can save the workflow and the customer may still be waiting.
Run it on five tickets
These are fictional tickets. Times are minutes since the shift began. Take the snapshot at minute 35. Four tickets have reached their deadline. Ticket E still has time, so it belongs in the open queue and enters the measurement when its deadline arrives.
Paste this into SQLite. A blank reply means the help desk has no recorded first reply. A handoff time means a person accepted the ticket.
WITH tickets(id, due_minute, reply_minute, handoff_minute) AS (
VALUES ('A', 20, 12, NULL),
('B', 20, 26, NULL),
('C', 20, NULL, 14),
('D', 20, NULL, NULL),
('E', 50, NULL, NULL)
),
classified AS (
SELECT id, CASE
WHEN reply_minute <= due_minute THEN 'replied on time'
WHEN reply_minute <= 35 THEN 'replied late'
WHEN handoff_minute <= due_minute THEN 'handed off on time, no reply'
ELSE 'no reply by cutoff'
END AS outcome
FROM tickets
WHERE due_minute <= 35
)
SELECT outcome, COUNT(*) AS tickets
FROM classified
GROUP BY outcome
ORDER BY outcome;
| Outcome at minute 35 | Tickets |
|---|---|
| Handed off on time, no reply | 1 |
| No reply by cutoff | 1 |
| Replied late | 1 |
| Replied on time | 1 |
One of four customers got an on-time reply. Two are still waiting. One of those has a person on the case. The other is the ticket I’d ask a supervisor to open first.
Put it on a shift report
Start with accepted ticket IDs from the help desk. Join the earliest customer-visible reply and earliest accepted handoff by ticket ID. Use a left join so tickets survive when either event is missing. Keep a row per ticket. If your logs can contain events that arrived after the snapshot, filter to what the report could see at its cutoff.
Use the report to pull up the actual tickets. For a late reply, show the first reply time and the deadline. For a handoff, show who accepted it and when. For a ticket without either event, show the last action and who needs to take it next. A supervisor should be able to act on the row during the shift.
Once you can see the missing replies, check for the inverse failure. A reply can reach the customer even when the sending worker sees a timeout. The runnable timeout example shows how that produces duplicate replies.
AI helped draft and edit this article and example.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.