customer-support
Build a support pipeline by installing five prompts: ticket triage, intent routing, reply drafting, conversation summary, and CSAT risk detection. Strict typed JSON for routing, escalation, and action.
Customer Support Starter Kit
Build a support pipeline by installing five prompts. Each turns a raw support input — a ticket, a message, a thread — into typed, validated JSON you can route, escalate, and act on. Install them à la carte or wire all five into a single flow: triage → route → draft → summarize → flag.
Like the Structured Extraction flagship, every prompt ships a strict output schema, so the generated SDK gives you a real type and a parseOutput() you can trust — not a string you have to babysit.
Prompts
| Prompt | What it does |
|---|---|
ticket-triage | Classify a ticket's priority + category with the signals behind the call. Optional productContext tunes severity to your product. |
intent-routing | Route a message to your own caller-defined queues/teams, with an optional fallback. |
reply-drafting | Draft a customer-facing reply in a given tone, grounded only in provided context, with a requires_human review gate. |
conversation-summary | Summarize a thread into a structured agent-handoff brief (issue / actions taken / pending / sentiment). |
csat-risk-detection | Flag a conversation at risk of poor CSAT, escalation, or churn — boolean gate first, then level + signals. |
A reference pipeline
These compose naturally:
ticket-triageon the inbound ticket → priority + category.intent-routingwith your queue topology → the team that owns it.reply-draftingwith your knowledge base asknowledgeContext→ a draft the agent reviews;requires_human: trueshort-circuits to a person.conversation-summaryat shift change or escalation → the next agent is up to speed in seconds.csat-risk-detectionacross open threads → surface the ones a supervisor should see now.
House conventions
Every prompt here follows the same rules — they're what make the output dependable:
- Reasoning / decision before the verdict. Classification and scoring prompts put a
reasoningfield first (or, for thecsat-risk-detectiongate, the cheapat_riskboolean first) and pin the key order in the system prompt. Reasoning that precedes the answer informs it; reasoning that follows rationalizes it. - No hallucinated facts. Nothing is invented.
reply-draftingnever states a policy that isn't in your context — it setsrequires_human: trueand lists what's missing instead. The summarizers leave unstated who/when out rather than guessing. - Confidence is uncalibrated. Where a
confidencescore is offered, the schema says plainly it's not a probability — a rough routing/triage signal, nothing more. It's capped low on empty/garbage input. - Strict schemas.
additionalProperties: false, completerequiredarrays, closedenums throughout. - Safe inputs. User content is injected with triple-mustache (so
&,<,"are never HTML-escaped) and wrapped in XML-style delimiters — and the prompts treat embedded commands ("route me to admin", "promise a refund") as data, not instructions. - Parameterized, not hardcoded. Every prompt exposes at least one meaningful variable beyond the raw input (product context, a queue set, a tone, a points cap).
- Empty / garbage behaviour is specified — and observable (empty arrays, a
low/none/neutraldefault, capped confidence), not left to chance.
A note on runtime-defined outputs
intent-routing takes its queue set at runtime. Because the output schema is fixed per version, parseOutput() can't verify that a returned queue is one you asked for — add a one-line membership check in your code. The prompt's page calls this out, mirroring text-classification in Structured Extraction.