https://retellai.com/?utm_source=discord&utm_medium=seo logo
variable not working properly
# 💬・general
f
variable not working properly @AI Evy
a
Thanks for tagging me @firstcall_55852. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available information, here are the most common dynamic variable issues and their solutions: ## Common Dynamic Variable Problems Syntax Issues: - Ensure no spaces inside the curly braces - use
{{provider_info}}
not
{{ provider_info }}
[(1) ]() - Dynamic variables must be surrounded by double curly braces exactly as shown:
{{variable_name}}
[(2) ]() For Outbound Calls: Set variables in the
retell_llm_dynamic_variables
field when using the Create Phone Call API, with all values as strings :
Copy code
json
{
 "user_name": "John Smith",
 "product_name": "Premium Plan", 
 "account_status": "active"
}
For Chat: Use the
retell_llm_dynamic_variables
field in the Create Chat API [(3) ]() :
Copy code
json
{ "customer_name": "John Doe" }
For Inbound Calls: Dynamic variables must be returned as an object with key-value pairs of strings [(4) ]() . The error "dynamic variables must be an object that's key value pairs of strings" indicates the JSON structure or data types are incorrect . Where You Can Use Dynamic Variables: - Prompt [(2) ]() - Begin message - Tool call URL - Tool call description - Custom tool call properties description - Voicemail settings - Transfer call function number - Warm transfer settings If you're still experiencing issues, please share your specific implementation details, call ID, and the exact error message you're seeing.
​ To learn more, see the sources I considered: [[1] Issue with Dynamic Variables.](https://discord.com/channels/1186424376300679209/1336469878068219904) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Create Chat](https://docs.retellai.com/api-references/create-chat) [[4] Dynamic Variables Not Returning To The Agent](https://discord.com/channels/1186424376300679209/1347902728617328741) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.