https://retellai.com/?utm_source=discord&utm_medium=seo logo
m
@AI Evy What are 1. retell_llm_dynamic_variables 2. collected_dynamic_variables Why the payload is returning some invalid values for the variables as 'retell_llm_dynamic_variables' while the actual values are not collected from the user
a
Thanks for tagging me @manucmt_18551. I'll look through relevant sources and get back to you shortly.
### Answer ## 1. retell_llm_dynamic_variables
retell_llm_dynamic_variables
are optional dynamic variables in key-value pairs of strings that inject into your Response Engine prompt and tool description [(1) ]() . They allow you to personalize your agent's responses for each specific call using the
{{variable_name}}
syntax [(2) ]() . These variables can be used in prompts, begin messages, tool configurations, and call handling . When making outbound calls, you set these variables in the API request [(1) ]() :
Copy code
json
{
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe"
  }
}
All values in
retell_llm_dynamic_variables
must be strings [(2) ]() . ## 2. collected_dynamic_variables
collected_dynamic_variables
are dynamic variables collected from the chat or call [(3) ]() . They're only available after the chat or call ends . These represent data that was gathered during the conversation itself. Example response format:
Copy code
json
{
  "collected_dynamic_variables": {
    "last_node_name": "Test node"
  }
}
## Regarding Invalid Values The sources don't specifically address why you might be seeing invalid values in
retell_llm_dynamic_variables
payloads. However, there are a few common issues mentioned in the Discord discussions: - Make sure you're using the correct variable syntax
{{variable_name}}
rather than
{{retell_llm_dynamic_variables.variable_name}}
[(4) ]() - Ensure all variable values are strings, not other data types [(2) ]() - Variables must be properly set when creating the call or chat session [(1) ]() For specific troubleshooting of invalid values in your payloads, I'd recommend checking that your variable names match exactly between your API request and your agent configuration, and that all values are properly formatted as strings.
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] List Chat](https://docs.retellai.com/api-references/list-chat) [[4] Outbound Custom Variable](https://discord.com/channels/1186424376300679209/1371090783989530694) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.