Ben “The Automator”
04/12/2025, 7:36 PMVapi Support Bot
04/12/2025, 7:38 PMassistantOverrides
with variableValues
. Here's how:
json
{
"assistantId": "your-assistant-id",
"assistantOverrides": {
"variableValues": {
"internalId": "12345",
"otherVariable": "value"
}
},
"customer": {
"number": "+1xxxxxxxxxx"
},
"phoneNumberId": "your-phone-id"
}
According to the [dynamic variables documentation](https://docs.vapi.ai/assistants/dynamic-variables), you'll need to add {{variableName}}
in your prompts where you want to use the variable.
## For Inbound Calls Specifically
For inbound calls, consider using the rolling-history
transfer mode to preserve data. According to [Discord discussions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341910696182681613), this approach:
- Preserves conversation historyVapi Support Bot
04/12/2025, 7:38 PMapplication/json
4. Variable names in API requests match what the Vapi assistant expects
Is there anything specific about these approaches you'd like me to elaborate on?
Sources:
- [Discord discussions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339365599268311202)
- [Discord feedback](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339094322078814258)
- [dynamic variables documentation](https://docs.vapi.ai/assistants/dynamic-variables)
- [Discord discussions](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341910696182681613)Ben “The Automator”
04/12/2025, 7:48 PMKyle Brunker
04/12/2025, 7:49 PMBen “The Automator”
04/12/2025, 7:51 PMjson
{
"results": [
{
"toolCallId": "call_2QjXTP9nWMxA24SiDvzAVnWU",
"result": {
"message": "Your appointment with our expert has been successfully scheduled for: Tuesday, April 15th 2025 at 10:00 AM - 1:00 PM <!--customer_id:cus_ee81504473994fdbbaff7ea36a47cf81; job_id:job_90837ec74de749888d0697ff0d4b357a; is_vip:false; phone_number:+xxxxxxx-->"
}
}
]
}
without comments:
json
{
"results": [
{
"toolCallId": "call_seYBT2eMQPHuQ6dZ445JMjEl",
"result": {
"message": "Your appointment with our expert has been successfully scheduled for: Tuesday, April 15th 2025 at 10:00",
"job_id": "job_90837ec74de749888d0697ff0d4b357a",
"is_vip": false,
"customer_id": "cus_ee81504473994fdbbaff7ea36a47cf81",
"phone_number": "+xxxxxxx"
}
}
]
}
Ben “The Automator”
04/12/2025, 7:53 PMcustomer_id
in structured data
or analysis
Ben “The Automator”
04/12/2025, 7:56 PM- Return values:
- job_id: The internal job ID for the created appointment
- estimate_id: The ID of the estimate if created
- customer_id: Customer ID in the system
Ben “The Automator”
04/14/2025, 5:56 PMBen “The Automator”
04/15/2025, 9:41 PMSahil
04/17/2025, 9:04 PM