> ## Documentation Index
> Fetch the complete documentation index at: https://kb.vinfer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure AI-to-Human Agent Handover in VInfer Neuron

> Set up rules for VInfer Neuron to transfer calls to human agents when escalation is needed, with context handoff and warm transfer support.

Neuron handles the vast majority of calls autonomously — but the best AI deployments know exactly when to step back and bring in a human. An angry customer, a complex regulatory dispute, or a simple explicit request for a real person all require a graceful handover that feels seamless to the caller and leaves your human agent fully prepared. VInfer's handover system lets you define precise triggers, choose warm or cold transfer modes, and automatically deliver a real-time conversation summary to your agent before they even say hello.

## When Handover Is the Right Call

Neuron is designed to resolve calls without human intervention, but certain situations should always route to a human agent. Understanding these scenarios helps you configure your triggers effectively:

<CardGroup cols={2}>
  <Card title="Explicit Human Request" icon="hand-point-right">
    When a customer says "I want to speak to a real person" or "Can I talk to your manager?", transfer immediately — never make a customer repeat this request.
  </Card>

  <Card title="Negative Sentiment Detected" icon="face-angry">
    Sustained frustration or distress signals that Neuron's conversation approach is not working. A human can de-escalate in ways AI cannot.
  </Card>

  <Card title="High-Risk Keywords" icon="triangle-exclamation">
    Phrases like "legal action", "consumer forum", "complaint", or "media" indicate situations with potential regulatory or reputational implications.
  </Card>

  <Card title="Compliance Exceptions" icon="shield">
    Certain regulatory scenarios (RBI grievance handling, insurance disputes, loan restructuring) require a licensed human agent by mandate.
  </Card>

  <Card title="Call Exceeds Duration Limit" icon="clock">
    If a call goes beyond your maximum configured duration without reaching a disposition, the customer's query is likely too complex for the current script.
  </Card>

  <Card title="Custom Business Logic" icon="code-branch">
    Any condition expressible in your script — account type, loan amount threshold, number of previous complaints — can be a handover trigger.
  </Card>
</CardGroup>

***

## Configuring Handover Rules

### In the Dashboard

Navigate to **Neuron → Voice Agents → \[Agent Name] → Fallback Rules**. You can add, edit, and prioritize handover triggers from this panel. Triggers are evaluated in priority order — the first matching trigger fires the handover.

### Via API

Configure handover rules programmatically when creating or updating a voice agent:

```json theme={null}
{
  "fallback": {
    "triggers": [
      {
        "type": "explicit_request",
        "priority": 1
      },
      {
        "type": "keyword",
        "priority": 2,
        "phrases": ["manager", "complaint", "legal action", "consumer forum", "media"],
        "match": "any"
      },
      {
        "type": "sentiment",
        "priority": 3,
        "threshold": -0.6,
        "consecutive_turns": 2
      },
      {
        "type": "max_duration",
        "priority": 4,
        "seconds": 300
      },
      {
        "type": "compliance_alert",
        "priority": 5
      }
    ],
    "transfer_to": "+918001234567",
    "transfer_type": "warm",
    "context_summary": true
  }
}
```

**Trigger configuration fields:**

| Field               | Description                                                                                            |
| ------------------- | ------------------------------------------------------------------------------------------------------ |
| `type`              | Trigger type: `explicit_request`, `keyword`, `sentiment`, `max_duration`, `compliance_alert`, `custom` |
| `priority`          | Evaluation order — lower number = higher priority                                                      |
| `phrases`           | For `keyword` type: list of trigger phrases (case-insensitive, partial match by default)               |
| `match`             | For `keyword` type: `any` (one phrase matches) or `all` (all phrases must appear)                      |
| `threshold`         | For `sentiment` type: score from -1.0 (very negative) to 1.0 (very positive)                           |
| `consecutive_turns` | For `sentiment` type: how many consecutive negative turns before triggering                            |
| `seconds`           | For `max_duration` type: maximum call duration before escalation                                       |

***

## Warm vs. Cold Transfer

<Tabs>
  <Tab title="Warm Transfer">
    In a warm transfer, Neuron places the customer on a brief hold, connects to the human agent first, delivers a spoken or text summary of the conversation, and only then connects the customer. The agent is fully briefed before the customer hears their voice.

    **Customer experience:** "Please hold for a moment while I connect you to a specialist."

    **Agent experience:** Receives a real-time summary — "Customer Priya Sharma is calling about a disputed EMI deduction of ₹3,200 on 12th January. She is requesting a refund and expressed frustration about a previous unresolved complaint."

    **Best for:** Complex escalations, upset customers, situations where context is critical to the resolution.
  </Tab>

  <Tab title="Cold Transfer">
    In a cold transfer, Neuron immediately connects the customer to the human agent without a briefing step. The call transfers in seconds.

    **Customer experience:** Direct connection, minimal hold time.

    **Agent experience:** Call arrives without advance context; the agent must ask the customer to re-explain their issue.

    **Best for:** Simple routing (e.g., "I want to check my account balance with a human"), time-critical situations, or when your agents have access to the real-time screen pop from your CRM.
  </Tab>
</Tabs>

<Note>
  For most escalation scenarios, warm transfer delivers significantly higher customer satisfaction scores. Cold transfer is faster but risks frustrating customers who must re-explain an issue they've already described to Neuron.
</Note>

***

## Context Handoff

When `context_summary: true` is set in your fallback configuration, VInfer automatically generates a structured handoff brief for the receiving agent before the call connects. This brief is delivered in two ways:

<CardGroup cols={2}>
  <Card title="Spoken Summary (Warm Transfer)" icon="volume-high">
    Neuron reads the summary aloud to the agent during the hold phase: "Incoming call from Priya Sharma, +91 98765 43210. She is disputing an EMI deduction and has requested a refund. Sentiment: frustrated."
  </Card>

  <Card title="Screen Pop (CRM Integration)" icon="display">
    If you've integrated VInfer with your CRM, the contact record opens automatically on the agent's screen with the in-progress call notes and NeuronLens real-time transcript visible.
  </Card>
</CardGroup>

The context summary includes:

* **Caller identity:** Name and phone number
* **Reason for call:** Detected intent and conversation goal
* **Key entities collected:** Account numbers, amounts, dates, issue descriptions
* **Trigger reason:** Why the escalation fired (e.g., "Customer requested human agent", "Keyword detected: legal action")
* **Sentiment trajectory:** How the caller's mood changed during the conversation
* **Conversation duration:** How long the caller has already been on the call

***

## Setting Up Warm Handover

<Steps>
  ### Define Your Escalation Triggers

  Map out every scenario in which your campaign or inbound flow should hand off to a human agent. Start with the universal triggers (explicit request, high-risk keywords) and add campaign-specific ones (e.g., "disputed amount above ₹50,000").

  Log into the dashboard and go to **Neuron → Voice Agents → \[Agent Name] → Fallback Rules → Add Rule** for each trigger. Set priority order carefully — if both a keyword trigger and a sentiment trigger could fire simultaneously, the one with higher priority wins.

  ***

  ### Set the Transfer Destination Number

  Enter the phone number or SIP URI your human agents receive calls on:

  ```bash theme={null}
  curl -X PATCH https://api.vinfer.ai/v1/agents/agt_abc123 \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "fallback": {
        "transfer_to": "+918001234567",
        "transfer_type": "warm"
      }
    }'
  ```

  <Info>
    If you have multiple agent queues (e.g., a collections team and a customer care team), you can configure different transfer destinations per trigger type. Use the `transfer_to` field within each individual trigger object to override the default destination.
  </Info>

  ***

  ### Enable Context Summary

  Ensure `context_summary` is set to `true` in your agent's fallback configuration. You can also configure the summary language — Neuron will generate and deliver the summary in your preferred agent language regardless of the language the customer called in.

  ```bash theme={null}
  curl -X PATCH https://api.vinfer.ai/v1/agents/agt_abc123 \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "fallback": {
        "context_summary": true,
        "summary_language": "en-IN"
      }
    }'
  ```

  ***

  ### Test with a Simulated Call

  Before going live, run a simulated escalation test:

  1. Navigate to **Neuron → Voice Agents → \[Agent Name] → Test Call**
  2. Enter a test mobile number and initiate the call
  3. In the conversation, deliberately trigger each escalation condition:
     * Say "I want to speak to a human" (tests `explicit_request`)
     * Say "I'm going to take legal action" (tests `keyword`)
  4. Confirm that the transfer initiates within 1–2 seconds of the trigger firing
  5. Verify that the warm transfer summary is spoken accurately before you're connected
  6. Check the **Escalation Log** under **Neuron → Calls → Escalated** to confirm the event was recorded

  ***

  ### Monitor Escalation Rates in the Dashboard

  After going live, track your escalation metrics at **Neuron → Analytics → Escalations**:

  | Metric                              | What to Watch For                                                                |
  | ----------------------------------- | -------------------------------------------------------------------------------- |
  | **Escalation Rate**                 | % of calls that trigger handover; typically 5–15% for well-tuned campaigns       |
  | **Top Trigger Types**               | Which trigger fires most often — high keyword triggers may indicate a script gap |
  | **Escalation by Hour**              | Peaks during certain hours may require more human agents on shift                |
  | **Post-Escalation Resolution Rate** | % of escalated calls resolved by human agents without callback                   |

  <Tip>
    If your escalation rate is above 20%, review the specific triggers firing most frequently. A high rate of `max_duration` escalations usually means your script has a loop or an unclear branch that confuses customers — fix the script rather than extending the duration limit.
  </Tip>
</Steps>

***

## Webhook for Handover Events

Subscribe to the `call.escalated` event to log every handover in your CRM and alert your team in real time:

```bash theme={null}
curl -X POST https://api.vinfer.ai/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-crm.com/api/vinfer-events",
    "events": ["call.escalated"],
    "secret": "your_signing_secret"
  }'
```

**Example `call.escalated` payload:**

```json theme={null}
{
  "event": "call.escalated",
  "call_id": "call_abc123",
  "campaign_id": "camp_xyz456",
  "contact": {
    "phone": "+919876543210",
    "name": "Priya Sharma"
  },
  "trigger": {
    "type": "keyword",
    "matched_phrase": "legal action"
  },
  "transfer_type": "warm",
  "transfer_to": "+918001234567",
  "escalation_at": "2024-01-15T11:22:45Z",
  "call_duration_before_escalation_seconds": 87,
  "context_summary": "Customer is disputing an EMI deduction of ₹3,200 and mentioned legal action. Account number: 9988776655."
}
```

Use this event to:

* Create an urgent follow-up task in your CRM assigned to the receiving agent
* Trigger a Slack or Teams alert to your team supervisor
* Update the contact's record with the escalation reason and trigger phrase
* Track escalation volume in your BI dashboard

<Note>
  Keep your human agent queue adequately staffed during campaign hours to handle escalations promptly. A warm transfer where the customer is placed on hold for more than 60 seconds while waiting for a human agent to pick up defeats the purpose of a seamless handover experience.
</Note>
