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

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 issue
  • account — Account, access, or entitlement issue
  • technical — Product behavior or technical failure
  • cancellation — Subscription cancellation
  • other — None is clearly primary
scoreurgency

Score review urgency from 0 to 3.

  1. 0 — routine; no time-sensitive impact
  2. 1 — minor impact
  3. 2 — active customer impact
  4. 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

Limits and boundaries

Sources and inspiration

Continue

Browse all templates, learn the official SDK shape, or estimate production volume with the cost calculator.