{
  "$schema": "https://pinlyx.com/resources/schema/handoff.json",
  "version": 1,
  "description": "Handoff configuration for AI agents: keyword triggers, customer- facing messages and the internal summary format. Set under AI Agents > [agent] > Handoff.",
  "triggerKeywords": [
    "human",
    "real person",
    "agent",
    "manager",
    "supervisor",
    "someone else",
    "speak to sales",
    "talk to a person",
    "refund",
    "cancel my account",
    "chargeback",
    "complaint",
    "lawyer",
    "legal",
    "GDPR",
    "data deletion",
    "security review",
    "penetration test",
    "SLA",
    "MSA",
    "DPA",
    "custom contract",
    "enterprise agreement",
    "procurement",
    "invoice dispute"
  ],
  "autoHandoffOnUncertainty": true,
  "uncertaintyThreshold": 0.6,
  "customerMessages": {
    "businessHours": "Let me bring in a colleague who can help with this properly. One moment.",
    "afterHours": "I have passed this to the team. Someone will reply when the office opens, usually within a few hours.",
    "escalation": "I want to get this right rather than guess, so I am handing you to someone who can help directly."
  },
  "internalSummary": {
    "enabled": true,
    "format": "One sentence on what the customer wants, one on what has already been tried, and the exact trigger that caused the handoff.",
    "includeLastMessages": 6
  },
  "routing": {
    "strategy": "round_robin",
    "byTopic": [
      {
        "match": [
          "refund",
          "chargeback",
          "invoice dispute"
        ],
        "assignTo": "finance"
      },
      {
        "match": [
          "security review",
          "penetration test",
          "GDPR",
          "DPA"
        ],
        "assignTo": "security"
      },
      {
        "match": [
          "procurement",
          "MSA",
          "enterprise agreement"
        ],
        "assignTo": "sales-lead"
      }
    ]
  },
  "afterHandoff": {
    "pauseAiForContact": true,
    "addTag": "ai-handoff",
    "note": "Pausing the agent for that contact is the important part. An agent that keeps replying underneath a human conversation is worse than no agent."
  }
}
