reyrj8145
09/10/2025, 12:52 AMAI Evy
09/10/2025, 12:52 AMAI Evy
09/10/2025, 12:52 AMwait for result is turned on, the agent will wait for the function to finish executing before attempting to transition to any other node, which guarantees that when you reach the next node, the result is already ready to be used .
For custom functions, Retell sends a POST request to your endpoint with specific structure [(2) ]() :
json
{
"name": "the name of the custom function",
"call": "the call object for you to get more context about the call, it also contains real time transcript up to the time the request is sent",
"args": "the arguments for the custom function, as a JSON object"
}
The key difference between chat and voice calls might be related to how the LLM processes and formats the arguments. For voice calls, you should ensure your function parameter schema is properly defined using JSON schema format :
json
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city of the weather"
}
},
"required": [
"city"
]
}AI Evy
09/10/2025, 12:52 AMtool_call_strict_mode to true when using GPT-4o or GPT-4o mini models, which uses structured output to ensure tool call arguments follow the JSON schema [(3) ]() [(4) ]() .
I don't have specific documentation about known issues with variable mapping differences between voice and chat flows. For debugging this specific integration issue, I'd recommend:
Visit [Contact Sales]() or [) for more detailed troubleshooting support.
Would you like a general answer based on my knowledge instead?AI Evy
09/10/2025, 12:52 AMAI Evy
09/10/2025, 12:52 AMAI Evy
09/10/2025, 3:02 AMreyrj8145
09/10/2025, 3:02 AMAI Evy
09/10/2025, 3:03 AMAI Evy
09/10/2025, 3:03 AMWhen user provided the city name, please get the weather for that city by calling the `get_weather` function.
For your specific Cal.com booking use case, you would adapt this pattern like:
When user provides their name, email, and preferred appointment time, please book the appointment by calling the `book_appointment` function. Always ensure the time is converted to ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ) before calling the function.
The documentation shows this example parameter schema for custom functions [(2) ]() :
json
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city of the weather"
}
},
"required": [
"city"
]
}
For your Cal.com booking function, you'd want to define parameters with very explicit descriptions about the expected formats [(1) ]() :
json
{
"type": "object",
"properties": {
"email": {
"type": "string",
"description": "User's email address in valid email format"
},
"datetime": {
"type": "string",
"description": "Appointment date and time in ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ) "
},
"name": {
"type": "string",
"description": "User's full name"
}
},
"required": ["email", "datetime", "name"]
}
The documentation emphasizes that it's best to include in the prompt explicitly when is the best time to invoke the custom function .AI Evy
09/10/2025, 3:03 AMAI Evy
09/10/2025, 3:53 AMAI Evy
09/10/2025, 3:54 AMreyrj8145
09/10/2025, 3:54 AMAI Evy
09/10/2025, 3:54 AMAI Evy
09/10/2025, 3:54 AMAI Evy
09/10/2025, 3:54 AMAI Evy
09/10/2025, 3:55 AM