https://retellai.com/?utm_source=discord&utm_medium=seo logo
my dynamic variables got suddenly replaced inside ...
# ❓・ai-evy-support
k
@AI Evy my dynamic variables got suddenly replaced inside the webhook response
a
Thanks for tagging me @K Rudy. I'll look through relevant sources and get back to you shortly.
### Answer If you're seeing dynamic variables replaced unexpectedly in your webhook response, here are the most common causes: 1. Incorrect response structure for inbound webhooks For inbound webhooks, dynamic variables must be nested under
call_inbound
, not returned at the top level. [(1) ]() [(2) ]() Correct structure:
Copy code
json
{
  "call_inbound": {
    "dynamic_variables": {
      "first_name": "John",
      "last_name": "Doe"
    }
  }
}
Incorrect structure (will not work) :
Copy code
json
{
  "retell_llm_dynamic_variables": {
    "first_name": "John"
  }
}
[(2) ]() 2. Webhook configured at wrong level Make sure your inbound webhook URL is configured at the phone number level (in the Phone Numbers tab) , not just at the agent level. 3. For outbound calls When using the Create Phone Call API, set variables in the
retell_llm_dynamic_variables
field directly. [(3) ]() 4. Verify your webhook response Check the Detail Logs in your dashboard to confirm what response your webhook is actually returning. [(2) ]() Could you share: - Is this an inbound or outbound call? - What does your webhook response structure look like?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Inbound webhook returns retell_llm_dynamic_variables but agent doesn't receive them](https://community.retellai.com/t/inbound-webhook-returns-retell-llm-dynamic-variables-but-agent-doesnt-receive-them/733) [[3] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​