deep-jade•5mo ago
Setup dynamic variables as soon as inbound call comes in
Hi I want to link this assistant to multiple phone numbers and based on phone number, I want this agent to greet differently.
But the issue is I am unable to setup dynamic variables using the call update api.
Call id is 2dadfca8-3395-41f1-935d-3a1e1dbd9d9d

12 Replies
The error occurs because you're trying to add properties that aren't defined in your assistant's configuration. Based on the error message, your assistant doesn't have
restaurantName
and restaurantPhone
variables defined.
First, define these variables in your assistant configuration. Then use the call update API correctly:
Make sure these variable names match exactly what's defined in your assistant's prompts (using {{variableName}}
format).
Sources:
- Dynamic Variables
- Call Update API⤵️ Mention @Vapi Support Bot for follow-ups 🐥
deep-jadeOP•5mo ago
How do I define these values in assistant’s configuration?
conscious-sapphire•5mo ago
Like we said, kindly just inbox me.
I'll get this done for you
deep-jadeOP•5mo ago
I tried but can’t send you message
It’s blocking
conscious-sapphire•5mo ago
Send me a friend request
checking if this is resolved/solved for you?
deep-jadeOP•5mo ago
Not yet
Still experiencing the same issue
Hi any help with this?
To customize your assistant's greeting based on the incoming phone number, make sure you're using the correct JSON payload format when making the call via the API. Include the
"variableValues"
in the "assistantOverrides"
section to set dynamic variables for your assistant. Here's a quick example to guide you:
Ensure your assistant's prompts include placeholders like {{greeting}}
to apply these dynamic variables. If the variables are not setting correctly, double-check the format and ensure they're correctly implemented in your assistant's messages. If you need further assistance, feel free to reach out.deep-jadeOP•5mo ago
Thanks my calls are coming in by directly calling the phone number. I am not creating a call via api.
Hey @anshu, by today I'll publish a documentation on how to customize the calls for your users, or allow me some time.
deep-jadeOP•5mo ago
Thanks @Shubham Bajaj
Are you able to share the link of document here as well. Thanks