afrah_85175
09/03/2025, 2:36 PMAI Evy
09/03/2025, 2:36 PMAI Evy
09/03/2025, 2:36 PM"Hello {{user_name}}, I understand you're interested in {{product_name}}. How can I help you today?"
For Conversation Flow nodes specifically: [(2) ]()
In conversation nodes, you can write instructions using either:
- **Prompt**: Write a prompt for the agent to dynamically generate what to say
- **Static Sentence**: Agent will say a fixed sentence first, and if later still inside this node, it will generate content dynamically based on the static sentence set
Setting up variables: [(1) ]()
1. Add dynamic variables in your prompts using the {{variable_name}} syntax
2. Test your dynamic variables using the web interface
3. Configure agent-level default dynamic variables as fallback values
For production implementation:
When using the Create Phone Call API, set your variables in the retell_llm_dynamic_variables field :
{
"user_name": "John Smith",
"product_name": "Premium Plan",
"account_status": "active"
}
Common troubleshooting: [(3) ]()
Based on community reports, dynamic variables may work differently between "Test LLM" and "Test Audio" modes, with some users reporting better results testing via the API directly .AI Evy
09/03/2025, 2:37 PMAI Evy
09/03/2025, 2:37 PMafrah_85175
09/03/2025, 2:53 PMAI Evy
09/03/2025, 2:53 PMAI Evy
09/03/2025, 2:53 PMretell_llm_dynamic_variables must be sent as strings and match exactly what's in your prompt .
Verify Default Variables Setup [(2) ]()
You can set default values for dynamic variables at the agent level . Default variables serve as a fallback and will only be used when specific variables aren't included in the call request .
For the Update Retell LLM API, set defaults like this [(3) ]() :
javascript
"default_dynamic_variables": {
"customer_name": "John Doe"
}
Common Issue Resolution [(4) ]()
A community member found that using this format in their webhook response fixed variable setting issues :
javascript
return {
"call_inbound": {
"dynamic_variables": {
"caller_name": " "
}
}
}AI Evy
09/03/2025, 2:53 PMuser_name is not set, the output will show "Hello {{user_name}}, how can I help you today?" with the variable visible in raw form .
Verification Steps
1. Test your dynamic variables using the web interface before deploying
2. Ensure your prompt explicitly references the variables using {{variable_name}} syntax
3. Check that default variables are configured at the agent level
If the variables appear in the Data tab but aren't being used in functions, verify that your prompt explicitly references them and that the tool/function is properly configured to use them [(1) ]() .AI Evy
09/03/2025, 2:53 PMAI Evy
09/03/2025, 2:53 PMAI Evy
09/03/2025, 2:58 PMafrah_85175
09/03/2025, 2:58 PMAI Evy
09/03/2025, 2:58 PMAI Evy
09/03/2025, 2:58 PMjavascript
"default_dynamic_variables": {
"company_name": "Retell Inc",
"support_hours": "9 AM - 5 PM"
}AI Evy
09/03/2025, 2:58 PMdefault_dynamic_variables object is properly configured in your conversation flow [(1) ]()
2. Test that variables appear correctly using the {{variable_name}} syntax [(2) ]()
3. Check that all values in your dynamic variables are strings
If default variables still aren't working in your conversation flow agent, you may want to test with a simple variable first to isolate the issue, as suggested in the community discussions [(4) ]() .AI Evy
09/03/2025, 2:58 PMafrah_85175
09/03/2025, 4:03 PMAI Evy
09/03/2025, 4:03 PMAI Evy
09/03/2025, 4:03 PM- {{user_age}} > 18
- {{current_time}} > 9 AND {{current_time}} < 18
- {{user_location}} == "New York"
- {{user_location}} != "New York"
- "New York, Los Angeles" CONTAINS {{user_location}}
- "New York, Los Angeles" NOT CONTAINS {{user_location}}
- {{user_age}} < 18 OR {{user_location}} == "New York"AI Evy
09/03/2025, 4:03 PM{{user_name}} contains {{ - this evaluates to true if the variable is not set
- In prompts: use {{user_name}} is not set (have curly braces around it)
Important Limitations [(1) ]()
You can only use variables that are passed in as dynamic variables for equation conditions. If you need to use information extracted by the LLM (such as information learned during the call) , you must use prompt conditions instead .
Edge Case Behavior [(2) ]()
When a dynamic variable is not assigned a value, it will remain unchanged in the output. For example, if user_name is not set, the output will show "Hello {{user_name}}, how can I help you today?" with the variable visible in raw form .
Based on the available documentation, conversation flow agents primarily work with pre-set dynamic variables rather than dynamically setting new variable values during the conversation. For information extracted during the call, you'll need to use prompt conditions in your transition logic [(1) ]() .AI Evy
09/03/2025, 4:03 PMAI Evy
09/03/2025, 4:03 PM