{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"Customer Service Ticket","description":"Customer-facing service ticket capturing a request, complaint or question raised by an external customer. Distinct from generic.it.it_service_request which is an internal IT service desk ticket. Structure aligned with ITIL 4 incident management and common CRM ticketing practice; captures SLA targets, communication trail and CSAT.","type":"object","additionalProperties":false,"required":["ticket_id","created_on","created_by","customer","category","priority","subject","description","status","sla","assigned_team_or_agent","communications"],"$defs":{"customer":{"type":"object","additionalProperties":false,"required":["name","contact_email"],"properties":{"name":{"type":"string"},"account_id":{"type":"string"},"contact_email":{"type":"string","format":"email"},"contact_phone":{"type":"string"}}},"sla":{"type":"object","additionalProperties":false,"required":["first_response_target","resolution_target"],"properties":{"first_response_target":{"type":"string"},"resolution_target":{"type":"string"}}},"communication":{"type":"object","additionalProperties":false,"required":["timestamp","from","to","channel","summary"],"properties":{"timestamp":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"channel":{"type":"string","enum":["email","phone","chat","portal"]},"summary":{"type":"string"}}}},"properties":{"ticket_id":{"type":"string"},"created_on":{"type":"string"},"created_by":{"type":"string"},"customer":{"$ref":"#/$defs/customer"},"category":{"type":"string"},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"subject":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["new","triaged","in_progress","pending_customer","resolved","closed"]},"sla":{"$ref":"#/$defs/sla"},"assigned_team_or_agent":{"type":"string"},"communications":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/communication"}},"resolution_summary":{"type":"string"},"resolved_on":{"type":"string"},"csat_rating":{"type":"object","additionalProperties":false,"required":["score"],"properties":{"score":{"type":"integer","minimum":1,"maximum":5},"scale":{"type":"string"},"comment":{"type":"string"}}}}}