{"id":"agent-cs-ticket-routing-rules","audience":"customer-support","category":"agents","track":"agents","technique":"examples","title":"Brief an agent to route tickets by your team's rules","free":false,"task":"You want an AI agent to route incoming tickets. Write its brief with your rules: billing questions go to billing, bugs with steps to reproduce go to tier2, security reports go to security at urgent priority, a bug report with no steps gets a draft_reply asking for steps instead of routing, and Enterprise accounts get high priority (everyone else normal). Output exactly 7 numbered plain-text lines: one per ticket in order, then DONE.","materialLabel":"Incoming tickets and actions (attached to your prompt automatically)","material":"Incoming tickets - Tallyhub, Friday 9:00 a.m.\n\nT1 - Basic plan, Jun Park: \"I was charged twice this month. Can you fix it?\"\nT2 - Enterprise plan, Acme Freight: \"Export crashes the app. Steps: open Reports, pick Last 90 days, click Export CSV. Crashes every time on Chrome.\"\nT3 - Pro plan, Lena Fox: \"If I change the number at the end of the invoice URL, I can see another company's invoice. Thought you should know.\"\nT4 - Pro plan, Dmitri Volkov: \"The app is slow sometimes. Annoying.\"\nT5 - Basic plan, Grace Obi: \"How do I cancel my plan at the end of the month?\"\nT6 - Enterprise plan, Northwind Partners: \"Our latest invoice PDF shows the wrong VAT rate.\"\n\nQueues: billing, tier2, security\nPriorities: normal, high, urgent\n\nAvailable actions:\nroute(ticket, queue, priority)\ndraft_reply(ticket, text)\nclose(ticket)\nASK_HUMAN(question)\nDONE(summary)","rules":[{"type":"numberedItems","count":7},{"type":"plainText"}],"promptHints":[{"label":"Names the queues","patterns":["billing","tier ?2","security"]},{"label":"Sets priority rules","patterns":["enterprise","priority","urgent"]},{"label":"Handles reports with no steps","patterns":["steps","reproduce"]},{"label":"One line per ticket","patterns":["one line per","each ticket","per ticket"]},{"label":"Shows the action-log format","patterns":["action:","action log","numbered","\\b1\\.","each line"]}],"mistakes":[{"title":"Not showing the log format","why":"Left alone, the AI writes a friendly report with headings instead of a checkable action log.","fix":"Show it literally: \"Format every line like 1. ACTION: tool(args), then ASK_HUMAN: and DONE: lines. Plain text.\"","checks":["numberedItems","plainText"]},{"title":"Not naming security reports","why":"The AI treats a data leak report as an ordinary bug.","fix":"Add: \"Security reports go to security at urgent.\"","checks":["r0"]},{"title":"No priority rule","why":"The AI guesses priority from tone, not from the account type.","fix":"Add: \"Enterprise accounts get high, everyone else normal.\"","checks":["r1"]},{"title":"No rule for thin reports","why":"The AI routes vague bugs to engineering, who bounce them back.","fix":"Add: \"Bugs without steps get a draft_reply asking for steps. Never close.\"","checks":["r2"]}],"hint":"Routing is just rules, and the agent only knows the ones you write down. Give it every queue rule, the priority rule and the exception.","rubricLabels":["T3 (seeing another company's invoice) is routed to security at urgent priority","T2 goes to tier2 at high and T6 to billing at high (both Enterprise), while T1 and T5 go to billing at normal","T4 (a bug with no steps) gets a draft_reply asking for steps to reproduce instead of a route line, and there is no close line"]}