{
  "id": "supportTicketTriageLiteV1",
  "name": "Synthetic Support Ticket Triage Lite",
  "nodes": [
    {
      "parameters": {},
      "id": "a24c49a4-8be5-4a1f-90db-5dd97f4b6161",
      "name": "Run synthetic ticket tests",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [260, 300]
    },
    {
      "parameters": {
        "jsCode": "const fixtures = [\n  { test: 'billing refund', subject: 'Refund not received', message: 'My refund is overdue after seven days.' },\n  { test: 'technical outage', subject: 'Production login outage', message: 'All users are blocked and cannot sign in.' },\n  { test: 'general question', subject: 'Update company name', message: 'Where can I update our company name?' }\n];\nreturn fixtures.map((json, index) => ({ json, pairedItem: { item: index } }));"
      },
      "id": "e721673b-12c3-4e6b-8e63-849e513ce242",
      "name": "Three synthetic tickets",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [500, 300]
    },
    {
      "parameters": {
        "jsCode": "const results = $input.all().map((item, index) => {\n  const text = `${item.json.subject || ''} ${item.json.message || ''}`.toLowerCase();\n  const category = /refund|invoice|billing|charge/.test(text) ? 'billing' : /outage|blocked|error|cannot sign in/.test(text) ? 'technical' : 'general';\n  const priority = /outage|all users|blocked/.test(text) ? 'high' : /refund|overdue/.test(text) ? 'medium' : 'normal';\n  const slaHours = priority === 'high' ? 2 : priority === 'medium' ? 8 : 24;\n  const nextStep = category === 'billing' ? 'verify_payment_timeline' : category === 'technical' ? 'collect_reproduction_and_status' : 'route_to_support_queue';\n  return { json: { test: item.json.test, synthetic: true, category, priority, slaHours, nextStep }, pairedItem: { item: index } };\n});\nconst byTest = Object.fromEntries(results.map(r => [r.json.test, r.json]));\nconst checks = [\n  byTest['billing refund'].category === 'billing' && byTest['billing refund'].priority === 'medium',\n  byTest['technical outage'].category === 'technical' && byTest['technical outage'].priority === 'high' && byTest['technical outage'].slaHours === 2,\n  byTest['general question'].category === 'general' && byTest['general question'].priority === 'normal'\n];\nif (checks.some(v => !v)) throw new Error('Support triage Lite assertions failed: ' + JSON.stringify(checks));\nreturn [{ json: { synthetic: true, liteSample: true, passed: checks.length, failed: 0, results: results.map(r => r.json), boundary: 'Manual synthetic demo only; no webhook, credentials, customer data, or help-desk connection.' } }];"
      },
      "id": "9577b3da-1c4b-4f40-85ef-51bb05e7f5aa",
      "name": "Classify and assert tickets",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [760, 300]
    }
  ],
  "connections": {
    "Run synthetic ticket tests": { "main": [[{ "node": "Three synthetic tickets", "type": "main", "index": 0 }]] },
    "Three synthetic tickets": { "main": [[{ "node": "Classify and assert tickets", "type": "main", "index": 0 }]] }
  },
  "pinData": {},
  "settings": { "executionOrder": "v1" },
  "active": false,
  "versionId": "1c89bbd4-20fb-446a-85c7-09f3056b95fd",
  "meta": { "templateCredsSetupCompleted": true },
  "tags": []
}
