Hi elmo7,
You can pass nested objects as variables via assistantOverrides.variableValues and reference their properties in templates (e.g., {{company.name}}). Use a JSON object in the call payload — do not stringify it.
Example call body:
{
"assistantId": "your-assistant-id",
"assistantOverrides": {
"variableValues": {
"company": {
"name": "company name",
"contact": "company contact"
}
}
},
"customer": { "number": "+1xxxxxxxxxx" },
"phoneNumberId": "your-phone-id"
}
Notes from the docs:
- Default variables are auto-filled; custom nested vars must be supplied in assistantOverrides.variableValues (see
https://docs.vapi.ai/assistants/dynamic-variables).
- In assistant prompts use {{company.name}} and {{company.contact}}.
- If you use the assistant-selector webhook flow (personalization), return assistantOverrides with variableValues containing the nested object in your server response (see
https://docs.vapi.ai/assistants/personalization).
- If it’s still not working, confirm the incoming selector payload includes your assistantOverrides and that you’re not accidentally stringifying the object before sending.
If you share the exact request body you’re sending