https://retellai.com/?utm_source=discord&utm_medium=seo logo
Dynamic Variables Not Returning To The Agent
# ❓・bug-report
d
Hey guys, I have a problem returning dynamic variables from GHL to Retell. I included all of the variables in the global prompt and when I check in Make, Webhook response does return them, but they are still not implemented in the Agent (for example when it is supposed to replace the {{user_name}} with Marko the Agent says {{user_name}} and it doesn’t provide with any other data as well). Here is the link to a Loom video showcasing the setup for both Retell and Make: https://www.loom.com/share/100ea0a85d2d46018cb36d5fd8bcc22a?sid=1f62c6d6-9fe4-43e4-88b0-9cc9dd88509d. Do you know what it could be?
I used Postman to check if the Webhook response returns the data, and it does, so it should be something in Retell causing the issue.
c
thanks for creating a video and sharing your issue. can you share detail log of call where you getting this issue and call id ?
d
Here is the call ID: call_2714943d09757d49c2015f548e9 And here is the detail call log: https://www.loom.com/share/49901b9ab4f549de9db647bf9d971ca5?sid=87eec564-77c6-4bc5-ac72-c2ae07dfc505
As you can see at the end of the video it says: "error: failed to get dynamic variable for inbound call: Error: dynamic variables must be an object that's key value pairs of strings". I am not sure what this means since as you can see on the previous video both Make and Retell dynamic variables ARE actually defined as key value pairs. Thoughts?
l
@Deleted User Did you manage to solve this? I have the same issue
c
@Deleted User Can you validate the json you are passing once? Probably at some website like https://jsonlint.com/
d
No, I have been looking for a solution for days already and still don't have a clue
Yes, it says it's valid
c
@Deleted User even though this should work. Can you try using below body in webhook response { "call_inbound": { "dynamic_variables": { "customer_name": "John Doe" } } }
Let me know if this works
d
Here it is, still not working...
c
have you added the correct webhook link ? Go to phone number you are using for this agent and add tis webhook link there as well.
Also make sure your make scenario is publishjed and active
d
Yes I checked all of it, here is the loom: https://www.loom.com/share/3129357c1d334bdab45a1cca8344daec
Could it be an error regarding the Inbound Call Webhook being migrated to the Phone Number level?
s
"I have the same problem, it hasn't been working for 2 days... I check that the information is coming back, but it doesn't reach the agent. In the response webhook, I have:"{ "call_inbound": { "override_agent_id": "agent_12345", "dynamic_variables": { "customer_name": "John Doe" }, "metadata": { "random_id": "12345" } } }
c
@son_iaonline whats response format of your inbound webhook ?
s
The inbound webhook automation runs correctly and responds, but then I ask the agent what my name is, and it doesn’t know, nor does it execute the variable correctly in 'Hello! {{nombre_usuario}}
I have checked that the phone is assigned to the agent, and I don't see anything else I can verify...
d
@chiraggupta1910_87616 I tried redetermining the Webhook Data Structure and fixed a problem to a degree. When I only include {{user_name}} in my webhook response like in the first picture, it actually works and the Agent says "Hey Marko" when starting the call (it implements the dynamic variable). But when I try to add multiple dynamic variables in the webhook response, like in the second picture, the agent does not receive those variables and says "Hey user_name" at the beginning of the call. And I also get this error when trying to implement multiple dynamic variables: "error: failed to trigger inbound call webhook: Error: Invalid webhook response format". What could be wrong here and why can I implement one dynamic variable, but not multiple?