{
  "$format": "thethinkloop.template/v1",
  "slug": "account-team-routing",
  "title": "Customer message routing",
  "decides": "Which team should own a customer message: sales, customer success, support, or billing.",
  "question": {
    "name": "decision",
    "type": "choice",
    "instructions": "Which team should own this customer message?",
    "choices": [
      {
        "value": "sales",
        "description": "New purchases, pricing, demos, and quotes."
      },
      {
        "value": "customer_success",
        "description": "Onboarding, adoption, renewals, and expansion."
      },
      {
        "value": "support",
        "description": "Troubleshooting and technical problems with the product."
      },
      {
        "value": "billing",
        "description": "Invoices, payments, and refunds."
      }
    ]
  },
  "evidenceChecks": [
    {
      "name": "factor_1",
      "label": "Technical failure",
      "type": "predicate",
      "instructions": "The message reports an error, crash, or failed request."
    },
    {
      "name": "factor_2",
      "label": "Cancellation intent",
      "type": "predicate",
      "instructions": "The customer says they intend to cancel or not renew."
    }
  ],
  "inputs": [
    {
      "name": "message",
      "type": "string",
      "required": true,
      "description": "The customer's message, verbatim. Include the subject line if there is one."
    },
    {
      "name": "is_customer",
      "type": "boolean",
      "required": false,
      "description": "Whether the sender is an existing customer. Helps separate sales from customer success."
    }
  ],
  "expectedOutput": "One of the four values, a confidence value, and a probability for every option, plus one probability per evidence check.",
  "examples": [
    {
      "title": "A new customer planning their rollout",
      "input": "We signed last month and need help planning the rollout. Can someone run onboarding training for our 30 agents and share best practices?",
      "expected": "customer_success"
    },
    {
      "title": "A seat count dispute on an invoice",
      "input": "Our invoice for October shows a charge for 50 seats but we only have 35. Please correct it.",
      "expected": "billing"
    }
  ],
  "startingPolicy": {
    "automateAt": 0.75,
    "abstainBelow": 0.5,
    "note": "A starting point for exploration, not a recommendation. Calibrate against your own labeled examples."
  }
}
