vodmordia
11/19/2025, 4:52 PMAI Evy
11/19/2025, 4:52 PMAI Evy
11/19/2025, 4:52 PM{{variable_name}}) get passed in the URL.
The Solution:
Switch to using a POST request instead of GET. [(1) ]() For POST, PATCH, and PUT requests, you can define parameters using JSON schema format, and the LLM will properly extract and pass the values. [(3) ]() [(4) ]()
Here's what you need to do:
1. Change your HTTP method from GET to POST
2. Define your parameters using JSON schema format For example:
json
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The customer's name"
},
"start_time": {
"type": "string",
"description": "The appointment start time"
},
"phone": {
"type": "string",
"description": "The customer's phone number"
},
"email": {
"type": "string",
"description": "The customer's email address"
}
},
"required": ["name", "start_time", "phone", "email"]
}
3. Update your prompt to explicitly tell the agent when to call this function and what information to extract. [(4) ]() For example:AI Evy
11/19/2025, 4:52 PMWhen the user provides their name, appointment time, phone number, and email, call the booking function with these details.
The POST request will send the parameters in the request body as JSON, which properly handles dynamic variable substitution. [(3) ]() [(4) ]()
Alternative (if you must use GET) :
If your backend requires GET, you could use a POST request to an intermediary service (like n8n or Make.com) that extracts the data and then makes the GET request to your actual endpoint. [(1) ]()AI Evy
11/19/2025, 4:52 PMAI Evy
11/19/2025, 4:52 PMvodmordia
11/19/2025, 4:54 PMvodmordia
11/19/2025, 4:54 PMAI Evy
11/19/2025, 4:55 PMAI Evy
11/19/2025, 4:55 PMjson
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The customer's name"
},
"start_time": {
"type": "string",
"description": "The appointment start time"
},
"phone": {
"type": "string",
"description": "The customer's phone number"
},
"email": {
"type": "string",
"description": "The customer's email address"
}
},
"required": ["name", "start_time", "phone", "email"]
}
[(1) ]() , [(2) ]()
The LLM will:
1. Listen to the conversation
2. Extract the relevant information (Josh, Wednesday November 19th at 4:30pm, phone, email)
3. Automatically populate these parameters in the request body [(1) ]() [(2) ]()
Your backend will receive: [(1) ]()
json
{
"name": "get_booking_details",
"call": { ... },
"args": {
"name": "Josh",
"start_time": "Wednesday, November 19th at 4:30pm",
"phone": "...",
"email": "..."
}
}
The key is in your prompt - you need to explicitly tell the agent when to call the function and what information to extract:AI Evy
11/19/2025, 4:55 PMWhen the user provides their name, appointment time, phone number, and email, call the booking function with these details.
Dynamic variables (like {{customer_name}}) are used in different contexts - in prompts, begin messages, or tool descriptions - but not in the parameter schema itself. [(3) ]()AI Evy
11/19/2025, 4:55 PMAI Evy
11/19/2025, 4:55 PMvodmordia
11/19/2025, 4:56 PMAI Evy
11/19/2025, 4:56 PMAI Evy
11/19/2025, 4:57 PMretell_llm_dynamic_variables field. [(1) ]() For outbound calls, this is done via the Create Phone Call API. For inbound calls, you supply them through the Inbound Call Webhook.
To make the LLM use these pre-existing variables in your custom function:
1. Reference the dynamic variables in your function's tool description - You can use dynamic variables in tool descriptions to provide context to the LLM.
2. Update your prompt to instruct the agent to use the pre-existing information. For example:
You have access to the customer's information: name is {{name}}, phone is {{phone}}, and email is {{email}}. When booking an appointment, use these existing details along with the appointment time the customer provides.
The LLM will then know to use these pre-populated values when calling your custom function, rather than asking the customer for them again.
Important note: All values in retell_llm_dynamic_variables must be strings.
If you're experiencing issues where the agent isn't using the dynamic variables even though they're being sent, make sure you're setting them correctly in the call initiation. [(2) ]() One user reported success by structuring the return as:
json
{
"call_inbound": {
"dynamic_variables": {
"caller_name": " "
}
}
}AI Evy
11/19/2025, 4:57 PMAI Evy
11/19/2025, 4:57 PMvodmordia
11/19/2025, 5:02 PMAI Evy
11/19/2025, 5:02 PMAI Evy
11/19/2025, 5:03 PMcustomer_name (which you set) but couldn't find phone and email because those exact variable names need to be referenced.
Here's what you need to do:
1. Match your dynamic variable names exactly in your prompt and tool description. You set customer_name, email, and phone as dynamic variables, so reference them exactly that way. [(1) ]()
2. Update your prompt to explicitly tell the agent to use these pre-existing variables:
You have access to the customer's information through dynamic variables:
- Customer name: {{customer_name}}
- Phone number: {{phone}}
- Email address: {{email}}
When booking an appointment, you MUST use these existing details. Do not ask the customer for this information - it is already available to you.
3. In your custom function's tool description, reference the dynamic variables: [(2) ]()
For example, in the description field of your parameters:
json
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Use the customer name from {{customer_name}}"
},
"start_time": {
"type": "string",
"description": "The appointment start time provided by the customer"
},
"phone": {
"type": "string",
"description": "Use the phone number from {{phone}}"
},
"email": {
"type": "string",
"description": "Use the email address from {{email}}"
}
},
"required": ["name", "start_time", "phone", "email"]
}AI Evy
11/19/2025, 5:03 PMretell_llm_dynamic_variables with all values as strings: [(1) ]()
json
{
"customer_name": "Josh Morlan",
"phone": "+1234567890",
"email": "josh@example.com"
}
The key issue is that the LLM needs explicit instructions in both the prompt and the tool description to map the dynamic variables to the function parameters. Without this guidance, it won't automatically know to use {{phone}} for the phone parameter in your function call.
**AI Evy
11/19/2025, 5:03 PMAI Evy
11/19/2025, 5:03 PM