https://retellai.com/?utm_source=discord&utm_medium=seo logo
how to feed dynamic variable to retell AI
# ❓・ai-evy-support
a
Thanks for tagging me @simonlaplante. I'll look through relevant sources and get back to you shortly.
### Answer To feed dynamic variables to Retell AI, you need to pass them in the
retell_llm_dynamic_variables
field when creating a call [(1) ]() [(2) ]() [(3) ]() . For Outbound Calls: When using the Create Phone Call API, include your variables in the
retell_llm_dynamic_variables
field [(1) ]() . All values must be strings :
Copy code
json
{
  "from_number": "+16504144521",
  "to_number": "your_target_number",
  "override_agent_id": "agent_71724df7636716ceb3a7e244c8",
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe",
    "order_id": "12345"
  }
}
, [(2) ]() , [(3) ]() For Inbound Calls: You can supply dynamic variables in the Inbound Call Webhook [(1) ]() . Using Variables in Your Prompts: In your prompts, reference variables using the
{{variable_name}}
syntax :
Copy code
Hello {{customer_name}}, I understand you're interested in {{product_name}}. How can I help you today?
Important Notes: - All values in
retell_llm_dynamic_variables
must be strings - Spaces around the variable name will be trimmed when evaluating the variable - You can also set default values for dynamic variables at the agent level as a fallback If your agent isn't retrieving the dynamic variable, verify that you're passing the variables in the correct field (
retell_llm_dynamic_variables
) and that all values are strings .
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[2] 404 Error on Create a Phone Call](https://retell.discourse.group/t/404-error-on-create-a-phone-call/22) [[3] Here is how that can be fixed](https://retell.discourse.group/t/here-is-how-that-can-be-fixed/23) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
s
retell is not able to read the information that is send by the webhook, the workflow is going well and the correct dynamic variable are correctly extract