vicious-gold•3mo ago
Support request- Dynamic Variables.
I am using the following CREATE CALL API request-
{"assistantId": "e42e7992-31aa-455b-8939-52b50ada34f7",
"phoneNumberId": "4f4b2672-35d5-43d9-8858-57f828b6d264",
"customer": {
"number": "+13365540000",
"assistantOverrides": {
"variableValues": {
"1": "Mr",
"2": "Jones"
}
}
}
}
The assistant is newly created and consists ONLY of a First message-
Hello, my name is {{2}} and a system prompt of-Your name is {{2}}
EXPECTED BEHAVIOUR-
I am expecting that the assistant calls me and says- "Hello, my name is Jones" and when asked "What is your name?" answers "My name is Jones"
EXISTING BEHAVIOUR-
I get a call and am greeted with- "Hello, my name is 2" and when asked "What is your name? answers "My name is 2"
7 Replies
You should use string-based variable names for dynamic variables in Vapi, not numbers.
Update your assistant's prompt and API request as follows: Prompt:
API request:
This will ensure the assistant says "Hello, my name is Jones" as expected. Sources: - Vapi Dynamic Variables Documentation - Vapi Personalization Guide
Update your assistant's prompt and API request as follows: Prompt:
API request:
This will ensure the assistant says "Hello, my name is Jones" as expected. Sources: - Vapi Dynamic Variables Documentation - Vapi Personalization Guide
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
vicious-goldOP•3mo ago
I changed the API request and the First Message so the variable {{2}} is now named {{Last}}. When it calls me the message is now- "Hello my name is"
There is no mention of the dynamic variable.
BTW-
I also tried appending the variable name with {{customer.Last}} as was suggested by Kyle Brunker-
Your dynamic variable will be available as {{customer.name}}. Try to call this variable instead.
To fix the issue, move
Here’s the correct API request and prompt: Prompt:
API request:
This will ensure the assistant says "Hello, my name is Jones" as expected.
See documentation Source: - Vapi Dynamic Variables Documentation
assistantOverrides
out of the customer
object and use string-based variable names.Here’s the correct API request and prompt: Prompt:
API request:
This will ensure the assistant says "Hello, my name is Jones" as expected.
See documentation Source: - Vapi Dynamic Variables Documentation
Message marked as helpful by @suppertime.! 🎉
vicious-goldOP•3mo ago
Thank you for the help! FYI- I got confused because the curl builder embeds the assistant override in the customer object. Thanks for your help!!!

It's totally understandable to be confused by the cURL builder's structure—placing
Reference: Vapi Dynamic Variables Documentation Source: - Vapi Dynamic Variables Documentation To ensure your dynamic variable works, place
Here’s the correct format: Set your prompt to:
This will make the assistant say "Hello, my name is Jones" as expected.
See documentation for details Sources: - Vapi Dynamic Variables Documentation - Vapi Personalization Guide To ensure dynamic variables work as expected, place
See official documentation for details. Source: - Vapi Dynamic Variables Documentation To ensure your dynamic variable is recognized, place
Here’s the correct format: Use
See documentation Source: - Vapi Dynamic Variables Documentation
assistantOverrides
inside the customer
object is a common mistake, especially if the tool suggests it. The correct approach is to keep assistantOverrides
at the root level of your API request. This way, your dynamic variables will work as expected and your assistant will use the values you provide. Glad you were able to get it working!
You're welcome! For future reference, always place assistantOverrides
at the root level of your API request, not inside the customer
object. Here’s the correct structure:
This will ensure your dynamic variable works as expected.Reference: Vapi Dynamic Variables Documentation Source: - Vapi Dynamic Variables Documentation To ensure your dynamic variable works, place
assistantOverrides
at the root level of your API request and use string-based variable names.Here’s the correct format: Set your prompt to:
This will make the assistant say "Hello, my name is Jones" as expected.
See documentation for details Sources: - Vapi Dynamic Variables Documentation - Vapi Personalization Guide To ensure dynamic variables work as expected, place
assistantOverrides
at the root level of your API request, not inside customer
. Here’s the correct structure:
This will allow your assistant to say "Hello, my name is Jones" when using {{Last}}
in your prompt.See official documentation for details. Source: - Vapi Dynamic Variables Documentation To ensure your dynamic variable is recognized, place
assistantOverrides
at the root level of your API request, not inside the customer
object.Here’s the correct format: Use
{{Last}}
in your assistant's prompt to reference the variable.See documentation Source: - Vapi Dynamic Variables Documentation
Hey! To help track down this issue, could you share:
- The call ID
This would really help us figure out what went wrong!
This would really help us figure out what went wrong!