Goopa Snoops
01/26/2026, 9:07 PMAI Evy
01/26/2026, 9:07 PMAI Evy
01/26/2026, 9:08 PMjson
{ "customer_name": "John Doe" }
For your use case, you would include the emergency contact info as dynamic variables (e.g., {{emergency_email}}, {{emergency_phone}}) , and ensure these are:
1. Set when the original call is created, or
2. Passed through your custom function/tool during the conversation before the transfer occurs
Then configure your emergency response agent's prompt to reference these variables (e.g., "Send the alert to {{emergency_email}} and {{emergency_phone}}") .
This way, the transferred agent will have access to those values through the dynamic variables rather than relying on prompt content that doesn't carry over.AI Evy
01/26/2026, 9:08 PMAI Evy
01/26/2026, 9:08 PMGoopa Snoops
01/26/2026, 9:11 PMAI Evy
01/26/2026, 9:11 PMAI Evy
01/26/2026, 9:11 PM{{variable_name}} syntax:
Send the emergency alert to {{emergency_email}} and {{emergency_phone}}.
## 2. Set the Variable Values
You have two options for providing the values:
*Option A: At call creation (for outbound calls) *
When using the Create Phone Call API, include the variables in `retell_llm_dynamic_variables`:
json
{
"emergency_email": "alert@example.com",
"emergency_phone": "+12137771234"
}
Option B: For inbound calls
Supply dynamic variables in the Inbound Call Webhook response.
## 3. Configure Agent-Level Defaults (Optional)
You can also set default values for dynamic variables at the agent level. These serve as a fallback and will only be used when specific variables aren't included in the call request.
The key point: the variables need to be defined in the agent that will use them (your emergency response agent) , and the values need to be passed when the call is initiated or via the inbound webhook.AI Evy
01/26/2026, 9:11 PMAI Evy
01/26/2026, 9:11 PMGoopa Snoops
01/26/2026, 9:14 PMAI Evy
01/26/2026, 9:14 PMAI Evy
01/26/2026, 9:14 PM{{emergency_email}} and {{emergency_phone}} with that agent's specific values.
2. In your emergency response agent's prompt, reference those variables:
Send the emergency alert to {{emergency_email}} and {{emergency_phone}}.
[(2) ]()
When Agent Transfer occurs, the destination agent has access to the full conversation history.
[(3) ]()
Dynamic variables extracted during the call persist and can be used by the transferred agent. The Extract Dynamic Variable tool lets you save values as dynamic variables that can then be referenced in subsequent prompts and tools.
[(1) ]()
## Alternative Approach
If the emergency contact info is known at call creation time, you can pass different values via retell_llm_dynamic_variables when initiating each call:
json
{
"emergency_email": "specific-alert@example.com",
"emergency_phone": "+12137771234"
}
[(2) ]()
This way, each call starts with the correct contact info already set, and it will be available to any agent that handles the call, including after a transfer.AI Evy
01/26/2026, 9:15 PMAI Evy
01/26/2026, 9:15 PM