hans_70884
10/07/2025, 11:48 AMAI Evy
10/07/2025, 11:48 AMAI Evy
10/07/2025, 11:48 AMretell_llm_dynamic_variables field [(1) ]() :
javascript
const webCallResponse = await client.call.createWebCall({
agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
retell_llm_dynamic_variables: {
"customer_name": "John Doe"
}
}) ;
For inbound calls, you can set dynamic variables through the inbound webhook response [(2) ]() :
json
{
"call_inbound": {
"override_agent_id": "agent_12345",
"override_agent_version": 1,
"dynamic_variables": {
"customer_name": "John Doe"
},
"metadata": {
"random_id": "12345"
}
}
}
You can also update dynamic variables during an ongoing call using the update call API [(3) ]() :
javascript
const callResponse = await client.call.update('call_a4441234567890777c4a4a123e6', {
override_dynamic_variables: {
"additional_discount": "15%"
}
}) ;
For integrating with external calendar systems like Go High Level, you'd typically use custom functions [(4) ]() . When the LLM needs calendar data, it can call your custom function which then fetches the appointment slots from your calendar API .
To troubleshoot your JSON error, ensure your payload structure matches the expected format exactly, with proper comma placement and closing brackets .AI Evy
10/07/2025, 11:48 AMAI Evy
10/07/2025, 11:48 AMhans_70884
10/07/2025, 11:52 AMAI Evy
10/07/2025, 11:52 AMhans_70884
10/07/2025, 11:52 AMAI Evy
10/07/2025, 11:53 AMretell_llm_dynamic_variables [(1) ]() . The API documentation specifies that dynamic variables should be "key value pairs of string" .
In the Create Phone Call API, the retell_llm_dynamic_variables field is defined as an object containing string key-value pairs :
json
{ "customer_name": "John Doe" }
This same pattern is consistent across other endpoints - the Create Web Call API [(2) ]() and Create Chat API [(3) ]() also specify dynamic variables as string key-value pairs.
A community member encountered a similar issue and received guidance to ensure proper JSON formatting with curly brackets [(4) ]() . The error you're seeing when using arrays or objects instead of strings is the expected behavior based on the current API schema.
For your use case with calendar slots, you'll need to serialize your array data into a string format, such as:
- Comma-separated: "slot1, slot2"
- JSON string: "[\"slot1\",\"slot2\"]"
- Custom delimiter: "slot1|slot2"
Then parse this string within your agent's prompt or custom function logic to handle the individual slot values.AI Evy
10/07/2025, 11:53 AMAI Evy
10/07/2025, 11:53 AM