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 support two patterns. Choose one per your architecture:
-
Assistant-supplied destination (no webhook)
- The transfer tool includes custom parameters (e.g.,
phoneNumber). - The assistant determines the destination (via reasoning or tools) and calls the transfer tool with that parameter.
- Vapi executes the transfer directly. The
transfer-destination-requestwebhook is not sent.
- The transfer tool includes custom parameters (e.g.,
-
Server-supplied destination (webhook)
- The transfer tool has an empty
destinationsarray and no destination parameter is provided by the assistant. - Vapi sends a
transfer-destination-requestto your server. - Your server decides the destination and responds with it.
- The transfer tool has an empty
Available context to servers (webhook pattern): Your webhook receives conversation transcript, extracted variables, function parameters (if any), and call metadata.
Parameters for transfer tools are fully customizable. You can name and structure them however you like to guide routing (for example phoneNumber, department, reason, urgency, etc.).
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 enables dynamic routing
- Set function name:
dynamicTransfer - Add a description describing when this tool should be used
- Decide your pattern:
- If the assistant will provide the destination: add a custom parameter like
phoneNumber - If your server will provide the destination: omit destination params and add any context params you want (e.g.,
reason,urgency)
- If the assistant will provide the destination: add a custom parameter like
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
- Optional: Enable the transfer-destination-request server event and set your server URL if using the server-supplied pattern. This is not required when the assistant provides
phoneNumberdirectly.
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
Squad-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.
Troubleshooting
- If transfers work but you never see
transfer-destination-requeston your webhook, your assistant likely provided the destination (e.g.,phoneNumber) directly in the tool call. This is expected and no webhook will be sent in that case. - If you expect a webhook but it’s not firing, ensure your transfer tool has an empty
destinationsarray and the assistant is not supplying a destination parameter. - If the assistant transfers to an unexpected number, audit your prompts, tools that return numbers, and any variables the assistant can access.
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