Ciaran
03/02/2026, 10:56 AMAI Evy
03/02/2026, 10:56 AMAI Evy
03/02/2026, 10:56 AMcall_inbound, not returned at the top level as retell_llm_dynamic_variables.
[(1) ]()
Your webhook should return this structure:
json
{
"call_inbound": {
"dynamic_variables": {
"user_name": "John",
"user_postcode": "12345",
"user_id": "abc123"
}
}
}
Not this:
json
{
"retell_llm_dynamic_variables": {
"user_name": "John",
"user_postcode": "12345",
"user_id": "abc123"
}
}
Even if your logs show the variables being returned, if they're at the wrong nesting level, the agent won't receive them—which explains why your prompt's condition no '{{user_id}}' keeps triggering the authentication flow.
Additionally, when a dynamic variable has no assigned value, it remains in its raw form with the curly braces intact (e.g., {{user_id}} stays as literal text) .
[(2) ]()
To verify, check your webhook response format and ensure variables are nested under call_inbound.dynamic_variables.AI Evy
03/02/2026, 10:56 AMAI Evy
03/02/2026, 10:56 AMCiaran
03/02/2026, 11:07 AMAI Evy
03/02/2026, 11:07 AMAI Evy
03/02/2026, 11:07 AMcall_inbound.dynamic_variables should be injected into the call. [(1) ]()
A few things to check:
1. Verify the webhook is actually being called - Check your Detail Logs in the dashboard to confirm the inbound webhook is firing and returning the expected response. [(2) ]()
2. Ensure your webhook returns a 2xx status code - The webhook has a 10-second timeout. If no success status is received, it retries up to 3 times. [(1) ]()
3. Check the Data tab for the call - After a test call, look at the "Data" tab to see if "Extracted Dynamic Variables" shows your variables. If it shows "No Extracted Dynamic Variables," the webhook response isn't being processed correctly. [(3) ]()
4. Confirm variables are defined in agent settings - Make sure the dynamic variables (user_name, user_postcode, user_id, etc.) are defined in your Single Prompt agent's settings.
5. Return valid values for unknown callers - If your CRM lookup returns no results, you still need to return a valid webhook response. One workaround is to return placeholder values (e.g., "user_id": "" or "user_id": "unknown") rather than omitting the field entirely. [(4) ]()
Can you check the Detail Logs for a specific call and confirm what the webhook response shows?AI Evy
03/02/2026, 11:07 AMAI Evy
03/02/2026, 11:07 AMCiaran
03/02/2026, 11:13 AMAI Evy
03/02/2026, 11:13 AMAI Evy
03/02/2026, 11:14 AMuser_id: 1) , the webhook is working correctly and the variables are being received. The issue is with your prompt logic—specifically how you're checking for the existence of {{user_id}}.
The problem is likely in your conditional check. When you write no '{{user_id}}' in your prompt, the LLM may not correctly interpret whether the variable has a value. The variable exists and has a value (1) , but your prompt phrasing might be confusing the agent.
Try adjusting your prompt to be more explicit:
- Instead of checking if {{user_id}} "exists," check for a specific condition like:
- If {{user_id}} equals "" or {{user_id}} equals "unknown"
- Or use a separate flag variable like your found_user: true which is already set
Since you already have found_user: true being returned, you could rewrite your authentication logic to check that variable instead:
- If {{found_user}} is false or empty: Go to Authentication Flow
- If {{found_user}} is `true`: Proceed with the user's request using {{user_id}}
This approach gives the LLM a clearer boolean condition to evaluate rather than trying to determine if a variable "exists."
[(1) ]()
You might also consider returning a special value like NOT_FOUND from your webhook when no user is matched, making it easier to write the logic in the prompt.
[(2) ]()AI Evy
03/02/2026, 11:14 AMAI Evy
03/02/2026, 11:14 AMCiaran
03/02/2026, 11:26 AMAI Evy
03/02/2026, 11:26 AMAI Evy
03/02/2026, 11:26 AMfound_user: true is showing in the call data) , but the LLM isn't following your conditional logic correctly.
This is a known challenge with Single/Multi Prompt agents—when tools aren't being triggered as expected or conditional logic isn't followed, Retell recommends giving explicit trigger conditions in the system prompt and strengthening the "Tool Usage Instructions" section with clear rules.
[(1) ]()
A few approaches to try:
1. Make the condition more explicit and direct:
Instead of relying on the LLM to interpret "if true/false," try phrasing it as a strict rule at the very top of your prompt:
CRITICAL: {{found_user}} = true means the user IS authenticated. Do NOT ask for postcode or any authentication. Proceed directly to helping them.
2. Use the LLM Playground to debug:
Test your prompt with the exact variable values (found_user: true) and see how the LLM interprets your instructions. You can use "Regenerate 10 Times" to test consistency and adjust temperature if needed.
3. Consider splitting logic:
If the agent keeps defaulting to authentication despite clear variables, you might need to restructure your prompt so the "authenticated user" path is the default, with authentication only triggered by an explicit negative condition.
The fact it worked in Conversation Flow but not Single Prompt suggests the LLM in Single Prompt mode needs more explicit, direct instructions to follow conditional paths reliably.AI Evy
03/02/2026, 11:26 AMAI Evy
03/02/2026, 11:26 AMCiaran
03/02/2026, 12:00 PMAI Evy
03/02/2026, 12:00 PMAI Evy
03/02/2026, 12:00 PMset_inbound_variables function that the transferred-to agent calls immediately is a valid pattern for re-populating the context that was set in the original call_inbound webhook.
For reference, another community member noted a similar issue where {{user_number}} wasn't working correctly after agent transfers—the variable context wasn't being preserved across the transfer.AI Evy
03/02/2026, 12:00 PMAI Evy
03/02/2026, 12:00 PMCiaran
03/02/2026, 12:24 PMAI Evy
03/02/2026, 12:24 PMAI Evy
03/02/2026, 12:25 PM{{current_time_Europe/London}}
[(1) ]()
This will return the current time in the Europe/London timezone (e.g., "Thursday, March 28, 2024 at 11:46:04 PM GMT") .
You can also use {{current_hour_Europe/London}} if you only need the current hour (e.g., "3 PM GMT") .
For a 14-day calendar in London time, use {{current_calendar_Europe/London}}.
Just add the variable directly in your prompt where you need the time reference.AI Evy
03/02/2026, 12:25 PMAI Evy
03/02/2026, 12:25 PM