{
  "$schema": "https://pinlyx.com/resources/schema/handoff-rules.json",
  "version": 1,
  "description": "Six hard handoff triggers from Step 4 of the AI sales bot guide. Import under Settings > AI > Handoff rules.",
  "stopOnFirstMatch": true,
  "rules": [
    {
      "id": "explicit-request",
      "name": "Customer asks for a human",
      "priority": 1,
      "match": {
        "anyKeyword": [
          "human",
          "real person",
          "agent",
          "someone else",
          "speak to a person",
          "talk to sales",
          "manager"
        ]
      },
      "action": "handoff",
      "notifyMessage": "Customer explicitly asked for a human."
    },
    {
      "id": "pricing",
      "name": "Pricing or discount mentioned",
      "priority": 2,
      "match": {
        "anyKeyword": [
          "price",
          "pricing",
          "cost",
          "quote",
          "discount",
          "how much",
          "per seat",
          "annual",
          "invoice"
        ]
      },
      "action": "handoff",
      "notifyMessage": "Pricing question. Never let the bot quote numbers."
    },
    {
      "id": "complaint",
      "name": "Complaint or hostility detected",
      "priority": 3,
      "match": {
        "sentimentBelow": -0.4,
        "anyKeyword": [
          "terrible",
          "useless",
          "refund",
          "cancel",
          "lawyer",
          "unacceptable",
          "scam"
        ]
      },
      "action": "handoff",
      "notifyMessage": "Negative sentiment. Hand to a human immediately."
    },
    {
      "id": "decision-maker",
      "name": "Decision maker confirmed",
      "priority": 4,
      "match": {
        "anyKeyword": [
          "our CEO",
          "our CTO",
          "head of",
          "VP of",
          "will join the call",
          "decision maker",
          "procurement",
          "the board"
        ]
      },
      "action": "handoff",
      "notifyMessage": "Senior stakeholder in the thread. Worth a human."
    },
    {
      "id": "stalled",
      "name": "Three turns without progress",
      "priority": 5,
      "match": {
        "botTurnsWithoutIntentChange": 3
      },
      "action": "handoff",
      "notifyMessage": "Conversation is going in circles."
    },
    {
      "id": "custom-deal",
      "name": "Custom deal language",
      "priority": 6,
      "match": {
        "anyKeyword": [
          "custom contract",
          "MSA",
          "DPA",
          "security review",
          "on-premise",
          "SLA",
          "enterprise agreement",
          "50% off",
          "special terms"
        ]
      },
      "action": "handoff",
      "notifyMessage": "Custom terms requested. Sales only."
    }
  ],
  "onHandoff": {
    "assignTo": "round_robin",
    "addTag": "ai-handoff",
    "replyToCustomer": "Let me bring in a colleague who can help with this properly. One moment.",
    "pauseAiForContact": true
  }
}
