Personalization with user information
Add customer-specific information to your voice assistant conversations
Overview
Personalization lets you include customer-specific information in your voice assistant conversations. When a customer calls, your server can provide data about that customer, which is then used to tailor the conversation in real time.
This approach is ideal for use cases like customer support, account management, or any scenario where the assistant should reference details unique to the caller.
How Personalization Works
Customer Calls Your Number
When a call comes in, Vapi sends a request to your server instead of using a fixed assistant configuration.
Your Server Looks Up the Caller
Your server receives the request, identifies the caller (for example, by phone number), and fetches relevant customer data from your database or CRM.
Prerequisites
- A Vapi phone number
- A created Vapi Assistant
- A server endpoint to receive Vapi’s requests
Implementation
Add Dynamic Variables to Your Assistant
Use variable placeholders in your assistant’s instructions or messages with the {{variable_name}}
syntax.
Example:
"Hello {{customerName}}! I see you've been a {{accountType}} customer since {{joinDate}}."
Error Handling
If your server encounters an error or cannot find the customer, return a response like this to end the call with a spoken message:
Common Issues
- Use the exact
{{variable_name}}
syntax for variables in your assistant configuration. - Your server must respond within 7.5 seconds.
- Implement fallbacks for missing or incomplete customer data.
- Ensure your endpoint is highly available to avoid missed calls.