hhbuddy
08/13/2025, 8:56 PMAI Evy
08/13/2025, 8:56 PMAI Evy
08/13/2025, 8:56 PMget_user_details
- Description: Get user details based on name and age
2. **Prompt Engineering**: You can add specific prompts to make function calls more reliable [(4) ]() . As suggested in the community, you could try adding prompts like: "If xxxx, please immediately and reliably call the 'function_name' function" .
## Function Configuration
When setting up custom functions, you can:
- Configure function details with unique names separated by underscores [(3) ]()
- Select HTTP methods (GET, POST, PATCH, PUT, DELETE)
- Define parameters using JSON schema formatAI Evy
08/13/2025, 8:56 PMAI Evy
08/13/2025, 8:56 PMAI Evy
08/13/2025, 8:56 PMhhbuddy
08/13/2025, 9:00 PMAI Evy
08/13/2025, 9:00 PMAI Evy
08/13/2025, 9:00 PMjavascript
// Custom function configuration
{
"name": "transfer_call",
"description": "Transfer the call to a specific extension",
"parameters": {
"type": "object",
"properties": {
"extension": {
"type": "string",
"description": "The extension number to transfer to"
}
},
"required": ["extension"]
}
}AI Evy
08/13/2025, 9:00 PMAI Evy
08/13/2025, 9:00 PMAI Evy
08/13/2025, 9:00 PMhhbuddy
08/13/2025, 9:05 PMAI Evy
08/13/2025, 9:05 PMAI Evy
08/13/2025, 9:06 PMretell_llm_dynamic_variables field :
json
{
"user_name": "John Smith",
"product_name": "Premium Plan",
"account_status": "active"
}
### For Inbound Calls
You can supply dynamic variables in the Inbound Call Webhook .
## Using Variables in Custom Functions
You can configure custom functions to include dynamic variables in [(1) ]() :
- Request headers - Header values can include dynamic variables
- Query parameters - Query parameter values can include dynamic variables
- Endpoint URL - Your custom function URL can contain dynamic variables
## Important Notes
All values in retell_llm_dynamic_variables must be strings [(2) ]() . Numbers, booleans, or other data types are not supported.
When a dynamic variable is not assigned a value, it will remain unchanged in the output as {{variable_name}} rather than being replaced with an empty string .AI Evy
08/13/2025, 9:06 PMAI Evy
08/13/2025, 9:06 PMhhbuddy
08/21/2025, 3:47 PMAI Evy
08/21/2025, 3:47 PMAI Evy
08/21/2025, 3:47 PMretell_llm_dynamic_variables field when using the Create Phone Call API [(1) ]() [(3) ]() :
json
{
"user_name": "John Smith",
"product_name": "Premium Plan",
"account_status": "active"
}
[(1) ]()
For inbound calls, you can supply dynamic variables in the Inbound Call Webhook .
The sources also mention that there are collected_dynamic_variables which are "Dynamic variables collected from the call. Only available after the call ends" [(3) ]() , but don't provide details on how the agent updates these during the call.
I don't have enough information in the available sources to provide a complete answer about how an agent can update dynamic variables during an active call. You might want to check these potentially helpful sources:
- [Dynamic Variables]()
- [Create Phone Call]()
- [Update Call]()
Would you like me to try to provide a general answer based on my knowledge instead?AI Evy
08/21/2025, 3:47 PMAI Evy
08/21/2025, 3:47 PMhhbuddy
08/21/2025, 3:49 PMAI Evy
08/21/2025, 3:49 PMAI Evy
08/21/2025, 3:49 PMText, Number, Enum, or Boolean
- Enum Options - Options to choose from (only when type is enum)
### 3. Update Your Prompt
It's best to include in the prompt explicitly when is the best time to invoke the extract variable function . For example:
When user states his name and phone number, please extract the information by calling the `extract_user_details` function.AI Evy
08/21/2025, 3:49 PMAI Evy
08/21/2025, 3:49 PMText, Number, Enum, or Boolean
## Variable Types Available
You can create variables of the following types [(1) ]() [(2) ]() :
- Text - Any word or sentence. Examples: "headache", "John Smith"
- Number - A numeric value. Examples: 42, 98.6
- Enum - A value from a predefined list. Examples: "Yes", "No", "Maybe"
- Boolean - True or false
The key is providing clear instructions in your prompt about when the AI should call the extract function, along with well-defined variable descriptions so the AI knows what information to capture.AI Evy
08/21/2025, 3:49 PM