support · basic
Support Routing
Route an incoming support message to one primary queue and score how quickly it should be reviewed.
choicescore
When to use it
- Ticket routing
- Queue prioritization
- Support automation
Example state
{
"message": "My card was charged, but the upgrade never appeared.",
"customer_plan": "Starter",
"payment_status": "settled"
}Decision questions
choicequeue
Choose the primary support queue for this case.
billing— Payment, invoice, or charge issueaccount— Account, access, or entitlement issuetechnical— Product behavior or technical failurecancellation— Subscription cancellationother— None is clearly primary
scoreurgency
Score review urgency from 0 to 3.
- 0 — routine; no time-sensitive impact
- 1 — minor impact
- 2 — active customer impact
- 3 — severe or time-critical customer impact
Expected structured output
One primary queue plus an expected urgency score from the ordered rubric.
TypeScript example
import { choice, score, TypeSafeClient } from "@typesafe-ai/sdk";
const client = new TypeSafeClient();
const result = await client.systemOne({
state: {
message: "My card was charged, but the upgrade never appeared.",
customer_plan: "Starter",
payment_status: "settled",
},
questions: {
queue: choice("Choose the primary support queue.", {
billing: "Payment, invoice, or charge issue",
account: "Account, access, or entitlement issue",
technical: "Product behavior or technical failure",
cancellation: "Subscription cancellation",
other: "None is clearly primary",
}),
urgency: score("Score review urgency.", [
"Routine",
"Minor impact",
"Active customer impact",
"Severe or time-critical impact",
]),
},
});Why this design works
- A primary-route instruction resolves cases that could plausibly fit multiple queues.
- The urgency rubric is explicit instead of asking for an undefined number.
Limits and boundaries
- Routing should not silently discard secondary issues.
- Urgency is a triage signal, not a service-level agreement.
Sources and inspiration
Continue
Browse all templates, learn the official SDK shape, or estimate production volume with the cost calculator.