Dynamic call transfers
Route calls to different destinations based on real-time conversation context and external data.
Overview
Dynamic call transfers enable intelligent routing by determining transfer destinations in real-time based on conversation context, customer data, or external system information. Unlike static transfers with predefined destinations, dynamic transfers make routing decisions on-the-fly during the call.
Key capabilities:
- Real-time destination selection based on conversation analysis
- Integration with CRM systems, databases, and external APIs
- Conditional routing logic for departments, specialists, or geographic regions
- Context-aware transfers with conversation summaries
- Fallback handling for unavailable destinations
Prerequisites
- A Vapi account
- A server or cloud function that can receive webhooks from Vapi
- (Optional) CRM system or customer database for enhanced routing logic
How It Works
Dynamic transfers operate by leaving the destination unspecified initially, then using webhooks to determine the appropriate destination when needed.
Transfer flow:
- Trigger - Voice agent determines a transfer is needed based on conversation
- Webhook - Vapi sends
transfer-destination-request
to your server with call context - Decision - Your server analyzes context and external data to determine routing
- Response - Server returns destination details and transfer configuration
- Transfer - Vapi executes the transfer to the determined destination
Available context: Your webhook receives conversation transcript, extracted variables, customer information, function parameters, and call metadata.
Quick Implementation Guide
Create a dynamic transfer tool
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
- Navigate to Tools in your dashboard
- Click Create Tool
- Select Transfer Call as the tool type
- Important: Leave the destinations array empty - this creates a dynamic transfer tool
- Set function name:
dynamicTransfer
- Add description explaining when this tool should be used
Create an assistant with the transfer tool
Dashboard
TypeScript (Server SDK)
Python (Server SDK)
cURL
- Navigate to Assistants
- Create a new assistant or edit an existing one
- Add your dynamic transfer tool to the assistant
- Enable the transfer-destination-request server event
- Set your server URL to handle the webhook
Implementation Approaches
Assistant-based implementation uses transfer-type tools with conditions interpreted by the assistant through system prompts. The assistant determines when and where to route calls based on clearly defined tool purposes and routing logic in the prompt. Best for quick setup and simpler routing scenarios.
Workflow-based implementation uses conditional logic based on outputs from any workflow node - tools, API requests, conversation variables, or other data sources. Conditions evaluate node outputs to determine routing paths within visual workflows. Best for complex business logic, structured decision trees, and team-friendly configuration.
Assistant-based routing
Route customers to appropriate support tiers based on conversation analysis and customer data
Workflow-based routing
Direct tenant calls to the right department with automated verification
Routing Patterns
Common Use Cases
-
Customer support routing - Route based on issue type, customer tier, agent availability, and interaction history. Enterprise customers and critical issues get priority routing to specialized teams.
-
Geographic routing - Direct calls to regional offices based on customer location and business hours. Automatically handle time zone differences and language preferences.
-
Load balancing - Distribute calls across available agents to optimize wait times and agent utilization. Route to the least busy qualified agent.
-
Escalation management - Implement intelligent escalation based on conversation tone, issue complexity, and customer history. Automatically route urgent issues to senior agents.
Transfer Configuration
-
Warm transfers provide context to receiving agents with AI-generated conversation summaries, ensuring smooth handoffs with full context.
-
Cold transfers route calls immediately with predefined context messages, useful for simple departmental routing.
-
Conditional transfers apply different transfer modes based on routing decisions, such as priority handling for enterprise customers.
-
Destination types include phone numbers for human agents, SIP endpoints for VoIP systems, and Vapi assistants for specialized AI agents.
Security considerations: Always verify webhook signatures to ensure requests come from Vapi. Never log sensitive customer data, implement proper access controls, and follow privacy regulations like GDPR and CCPA when handling customer information in routing decisions.
Related Documentation
- Call Forwarding - Static transfer options and transfer plans
- Webhooks - Webhook security and event handling patterns
- Custom Tools - Build custom tools for advanced routing logic