{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "TicketTriage", "description": "Structured triage of one inbound customer support ticket.", "type": "object", "additionalProperties": false, "required": [ "category", "priority", "sentiment", "language", "summary", "customer_ask", "entities", "needs_human", "needs_human_reason", "suggested_queue" ], "properties": { "category": { "type": "string", "description": "Main topic of the ticket.", "enum": ["billing", "account_access", "bug_report", "how_to", "feature_request", "cancellation", "security", "other"] }, "priority": { "type": "string", "description": "urgent: outage, security issue, or money taken in error. high: user blocked from core work. normal: everything else that needs a reply. low: feedback or no action needed.", "enum": ["urgent", "high", "normal", "low"] }, "sentiment": { "type": "string", "description": "Customer's tone as written, not the severity of the issue.", "enum": ["angry", "frustrated", "neutral", "positive"] }, "language": { "type": "string", "description": "ISO 639-1 code of the language the customer wrote in, e.g. en, de, es." }, "summary": { "type": "string", "description": "One sentence, at most 30 words, stating the problem in plain terms." }, "customer_ask": { "type": "string", "description": "What the customer explicitly wants done, in their terms. Empty string if they did not ask for anything." }, "entities": { "type": "object", "description": "Identifiers copied exactly from the ticket. Use an empty array when the ticket contains none. Never guess.", "additionalProperties": false, "required": ["order_ids", "invoice_ids", "product_names", "error_messages"], "properties": { "order_ids": { "type": "array", "items": { "type": "string" } }, "invoice_ids": { "type": "array", "items": { "type": "string" } }, "product_names": { "type": "array", "items": { "type": "string" } }, "error_messages": { "type": "array", "description": "Error text quoted verbatim from the ticket.", "items": { "type": "string" } } } }, "needs_human": { "type": "boolean", "description": "True when an automated reply would be inappropriate: security, legal threats, refunds above policy, abuse, or anything ambiguous." }, "needs_human_reason": { "type": ["string", "null"], "description": "Short reason when needs_human is true, otherwise null." }, "suggested_queue": { "type": "string", "description": "Team queue to route to.", "enum": ["billing", "technical", "accounts", "success", "security"] } } }