# Support ticket triage with priority and routing — Claude XML example

> Classify tickets by category, priority, and the team that should handle them — JSON output.
>
> Source: https://claudexml.com/examples/ticket-triage/ · Last updated 2026-05-25

Home / Examples / Support ticket triage with priority and routing
    Classification · intermediate

# Support ticket triage with priority and routing

    Classify tickets by category, priority, and the team that should handle them — JSON output.

    A support inbox needs deterministic triage: category, priority, owning team, and a short summary the on-call engineer can scan in 2 seconds.


## The prompt

    Copy this verbatim. Replace the `{{ … }}` placeholders with your values.


```xml
<instructions>
Triage the support ticket. Return a single JSON object matching <format>.
Return the JSON inside <result> tags. No prose, no markdown fences.

Priority rubric:
- urgent: production outage, data loss, or security incident
- high: blocking a paying customer with no workaround
- medium: degraded experience with a workaround
- low: feature request, cosmetic issue, or question
</instructions>

<format>
{
  "category": "billing | bug | feature_request | account | security | other",
  "priority": "low | medium | high | urgent",
  "owner_team": "billing | platform | mobile | growth | trust_safety | unknown",
  "needs_human": true,
  "summary": "string, max 140 chars, neutral tone"
}
</format>

<ticket>{{ ticket_body }}</ticket>

Return inside <result> tags.
```


## Sample input


```xml
Hey, your dashboard hasn't loaded since this morning. Our entire ops team is blocked. — Acme Corp (Enterprise plan)
```


## Expected output


```xml
<result>
{
  "category": "bug",
  "priority": "urgent",
  "owner_team": "platform",
  "needs_human": true,
  "summary": "Enterprise customer reports dashboard unreachable; team-wide block since this morning."
}
</result>
```


## Notes & tuning tips


- The rubric inside  is what makes priority labels consistent — without it, Claude reverts to vibes.
- Wrapping output in  makes parsing trivial: regex /([\s\S]*?)/.
- For higher reliability, define the schema as an API tool instead of a  block.


## What this example uses

    Tags: <instructions> <format>

    Patterns: structured output


## More like this


      classification
### Sentiment classifier
Classify customer reviews as positive, neutral, or negative with few-shot examples.

      classification
### Multi-label content tagging
Apply zero-to-many tags from a controlled vocabulary to an article.

      classification
### Toxicity grader with rubric
Score user-generated comments on a 0–3 toxicity scale with reasoning.




Cite this page

`Support ticket triage with priority and routing. claudexml.com. https://claudexml.com/examples/ticket-triage/`
