Agent not picking up variables
# support
j
Hi VAPI team, I'm trying to make this agent reads the First message with 1 variable "Hi, thank you for calling {{orgName}}" For testing purposes I'm using API call. This is my postman request POST "https://api.vapi.ai/call" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer MY_ID" \ --body "{ \"assistantId\": \"b23ffec0-eb72-4e0e-9d92-43f0441a4adb\", \"phoneNumberId\": \"MY_NUM\", \"customer\": { \"number\": \"+12345678901\" }, \"assistantOverrides\": { \"variableValues\": { \"orgName\": \"BTEC\", \"accountType\": \"premium\" } } }" RESPONSE I GET: { "subscriptionLimits": { "concurrencyBlocked": false, "concurrencyLimit": 10, "remainingConcurrentCalls": 9 }, "id": "019aeb75-a42a-711b-9b5c-a69d2833063d", "assistantId": "b23ffec0-eb72-4e0e-9d92-43f0441a4adb", "phoneNumberId": "MY_NUM", "type": "outboundPhoneCall", "createdAt": "2025-12-04T22:22:26.858Z", "updatedAt": "2025-12-04T22:22:26.858Z", "orgId": " MY_ORG", "cost": 0, "customer": { "number": "+12345678901" }, "status": "queued", "phoneCallProvider": "vapi", "assistantOverrides": { "variableValues": { "orgName": "BTEC", "accountType": "premium" } }, "monitor": { "listenUrl": "... ", "controlUrl": "... " }, "transport": { "conversationType": "voice", "provider": "vapi.sip" } } I'm making calls from the "Talk to assistant" from the web dashboard and it initiates the calls just fine. Problem is that the Agent never reads my variables "orgName": "BTEC", "accountType": "premium". Checked the logs and they do not show the variables are being used. Could you please provide some guidance on how to proceed?
v
Suggestion: Make sure your assistant's first message or system prompt in the dashboard includes the variable using double curly braces, like this:
Copy code
text
Hi, thank you for calling {{orgName}}
If
{{orgName}}
is not present in the prompt, the variable will not be used—even if you pass it in your API call. Update your assistant's prompt, save, and try your API call again. Reference: See the dynamic variables documentation for details on prompt setup (https://docs.vapi.ai/assistants/dynamic-variables). Source: - [Dynamic Variables Documentation](https://docs.vapi.ai/assistants/dynamic-variables)
c
Hi jmenjivar, To ensure your assistant reads the variable correctly, please verify the following: 1. **Prompt Configuration**: Make sure that your assistant's system prompt or initial message in the dashboard includes the variable using double curly braces. For example:
Copy code
text
   "Hi, thank you for calling {{orgName}}"
2. **API Call**: Your API request seems structured correctly with the
assistantOverrides.variableValues
passed as expected. 3. **Logs Check**: After initiating a call using the "Talk to assistant" feature, navigate to the
Observe > Call Logs
section in your Vapi dashboard to verify if the variable was passed in the API request. If it's not displayed, ensure that there is no mismatch in variable naming between the API payload and the assistant setup. If the setup in the prompt adheres exactly to the variable naming in your API call, it should include the desired variable value. Double-check these points, adjust if necessary, and test the configuration again. For additional guidance, refer to the [Dynamic Variables Documentation](https://docs.vapi.ai/assistants/dynamic-variables).
j
Hi Aniah and thanks for your reply. Yes I'm sure I'm using the right assistant with the proper configurations if you could help me validate I'd really appreciate it. This is my assistant: b23ffec0-eb72-4e0e-9d92-43f0441a4adb Here is how I've setup the First message matching the variable names and required format. This is an example call I did today from the Dashboard "Talk to assistant" option: 019b04ea-ba63-7226-baa3-1afcb3921f30 if you notice Transcript does not even get the variables, because the Agent never pronounces them. Here is the log entry for the verbalization of the statement, and btw I've checked all the previous logs and the ones after this entry to check if the variables are ever mentioned or included in any api call etc. and they never show up image.png This one should include the {{orgName}} but it's not there. Then I've also tried searching for the variables: Please any help that you could provide would be really appreciated. Tysm
c
To use dynamic variables, the call must be initiated via the API with
assistantOverrides.variableValues
. The dashboard (“Talk to assistant”) does not support setting variable values, so variables will not resolve there. If you want to verify that variables are being passed correctly, trigger the phone call using the API and answer that call. Only API-initiated calls apply
assistantOverrides
.