anton333_50203
07/17/2025, 8:34 AMAI Evy
07/17/2025, 8:34 AMAI Evy
07/17/2025, 8:35 AMAI Evy
07/17/2025, 8:35 AMAI Evy
07/17/2025, 8:35 AManton333_50203
07/17/2025, 10:07 AMAI Evy
07/17/2025, 10:07 AMAI Evy
07/17/2025, 10:07 AMAI Evy
07/17/2025, 10:07 AMAI Evy
07/17/2025, 10:07 AManton333_50203
07/17/2025, 10:10 AManton333_50203
07/17/2025, 10:10 AMAI Evy
07/17/2025, 10:10 AMAI Evy
07/17/2025, 10:10 AMAI Evy
07/17/2025, 10:10 AMAI Evy
07/17/2025, 10:10 AManton333_50203
07/17/2025, 10:12 AManton333_50203
07/17/2025, 10:12 AMAI Evy
07/17/2025, 10:12 AMAI Evy
07/17/2025, 10:13 AMAI Evy
07/17/2025, 10:13 AMAI Evy
07/17/2025, 10:13 AMAI Evy
07/17/2025, 10:13 AManton333_50203
07/17/2025, 10:18 AMAI Evy
07/17/2025, 10:18 AMAI Evy
07/17/2025, 10:19 AMAI Evy
07/17/2025, 10:19 AMAI Evy
07/17/2025, 10:19 AMAI Evy
07/17/2025, 10:19 AManton333_50203
07/17/2025, 10:21 AMAI Evy
07/17/2025, 10:21 AMAI Evy
07/17/2025, 10:21 AMAI Evy
07/17/2025, 10:21 AMAI Evy
07/17/2025, 10:21 AMAI Evy
07/17/2025, 10:21 AManton333_50203
07/17/2025, 10:27 AManton333_50203
07/17/2025, 10:27 AMAI Evy
07/17/2025, 10:27 AMAI Evy
07/17/2025, 10:27 AMAI Evy
07/17/2025, 10:27 AMAI Evy
07/17/2025, 10:27 AManton333_50203
07/17/2025, 10:31 AMAI Evy
07/17/2025, 10:31 AMAI Evy
07/17/2025, 10:31 AMWhen user states his name and phone number, please extract the information by calling the `extract_user_details` function.
No JSON schema needed:
The sources don't indicate that you need JSON schema in edges to transfer dynamic variables between multi-prompt nodes. The Extract Dynamic Variables tool handles the persistence of these variables throughout the conversation automatically .
The variable extraction happens at the node level through the tool, but once set, the variable can be referenced in prompts throughout your multi-prompt agent .AI Evy
07/17/2025, 10:31 AMAI Evy
07/17/2025, 10:31 AManton333_50203
07/17/2025, 10:32 AMAI Evy
07/17/2025, 10:32 AMAI Evy
07/17/2025, 10:33 AMjson
{
"type": "object",
"properties": {
"appointment_id": {
"type": "string",
"description": "ID of the existing appointment to cancel. This can be found in the customer record appointment array."
}
},
"required": [
"appointmentId"
]
}
However, the user noted that when they removed the JSON schema from the edge, it worked, but it had worked at one point previously .
The sources show that JSON schema is used extensively in custom functions for defining parameters [(2) ]() [(3) ]() [(4) ]() [(5) ]() , but they don't clearly explain the specific purpose of JSON schema in multi-prompt edges versus the automatic variable persistence through Extract Dynamic Variables.
The available sources don't provide sufficient detail about the specific use cases and purposes of JSON schema in multi-prompt edges. For a complete understanding of when and why to use JSON schema in edges, you may need to check the official documentation directly or contact support.AI Evy
07/17/2025, 10:33 AMAI Evy
07/17/2025, 10:33 AManton333_50203
07/19/2025, 9:32 PManton333_50203
07/19/2025, 9:32 PMAI Evy
07/19/2025, 9:32 PMAI Evy
07/19/2025, 9:32 PMjson
{
"call_inbound": {
"override_agent_id": "{{1.call_inbound.agent_id}}",
"dynamic_variables": {
"customer_name": "{{2.`0`}}",
"info": "{{2.`8`}}"
},
"metadata": {
"random_id": "12345"
}
}
}
[(4) ]()
Key Point:
The inbound webhook is configured at the phone number level, not the agent level [(5) ]() . When someone calls, the webhook receives the phone number data automatically, and {{user_number}} becomes available as a system variable throughout the conversation [(1) ]() .
So you don't need to create {{user_number}} anywhere - it's automatically provided by Retell AI's system for inbound calls .AI Evy
07/19/2025, 9:32 PMAI Evy
07/19/2025, 9:32 PManton333_50203
07/20/2025, 2:03 PMAI Evy
07/20/2025, 2:03 PMAI Evy
07/20/2025, 2:03 PMAI Evy
07/20/2025, 2:03 PMAI Evy
07/20/2025, 2:03 PManton333_50203
07/20/2025, 2:17 PMAI Evy
07/20/2025, 2:17 PMAI Evy
07/20/2025, 2:17 PMAI Evy
07/20/2025, 2:17 PMAI Evy
07/20/2025, 2:17 PManton333_50203
07/21/2025, 9:30 AMAI Evy
07/21/2025, 9:30 AMAI Evy
07/21/2025, 9:31 AMAI Evy
07/21/2025, 9:31 AMAI Evy
07/21/2025, 9:31 AManton333_50203
07/21/2025, 5:15 PMAI Evy
07/21/2025, 5:15 PMAI Evy
07/21/2025, 5:15 PMjson
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}
Sample Response Schema (what your webhook should return) :
json
{
"call_inbound": {
"override_agent_id": "agent_12345",
"override_agent_version": 1,
"dynamic_variables": {
"customer_name": "John Doe"
},
"metadata": {
"random_id": "12345"
}
}
}
Key Points:
- The webhook expects a JSON response with successful status code (2xx) with fields grouped under call_inbound
- All response fields are optional
- Available fields include override_agent_id, override_agent_version, dynamic_variables, and metadata
Additional Example from Community: [(2) ]()
json
{
"call_inbound": {
"dynamic_variables": {
// dynamic variables here in a dict
},
"metadata": {
//add metadata here in a dict
},
}
}
The webhook response structure must have dynamic_variables and metadata as dictionaries within the call_inbound object .AI Evy
07/21/2025, 5:15 PMAI Evy
07/21/2025, 5:15 PManton333_50203
07/25/2025, 1:21 PMAI Evy
07/25/2025, 1:21 PMAI Evy
07/25/2025, 1:21 PMwebhook_url parameter [(2) ]() [(3) ]() . You can set this when creating or updating an agent:
json
{
"webhook_url": "<https://webhook-url-here%22>
}
Custom function authentication options:
Custom functions provide more authentication flexibility, allowing you to set request headers and query parameters [(1) ]() . For custom functions, you can define custom headers to include with the request, and header values can be static or include dynamic variables .
Agent-level webhook limitations:
The sources show that agent-level webhooks are triggered for call events (call.started, call.ended, call.analyzed) [(4) ]() [(5) ]() , but they don't provide configuration options for Basic Auth headers or query parameters like custom functions do.
Webhook verification:
For security, agent-level webhooks include an X-Retell-Signature header for request verification [(1) ]() :
javascript
if (
!Retell.verify(
JSON.stringify(req.body) ,
process.env.RETELL_API_KEY,
req.headers["x-retell-signature"] as string,
)
) {
console.error("Invalid signature") ;
return;
}AI Evy
07/25/2025, 1:21 PMAI Evy
07/25/2025, 1:21 PMAI Evy
07/25/2025, 1:21 PManton333_50203
07/25/2025, 1:22 PMAI Evy
07/25/2025, 1:22 PMAI Evy
07/25/2025, 1:22 PMAI Evy
07/25/2025, 1:22 PMAI Evy
07/25/2025, 1:22 PManton333_50203
07/25/2025, 1:24 PMAI Evy
07/25/2025, 1:24 PMAI Evy
07/25/2025, 1:24 PMX-Retell-Signature header with each webhook request that you can verify:
javascript
// install the sdk: <https://docs.retellai.com/get-started/sdk>
import { Retell } from "retell-sdk";
import express, { Request, Response } from "express";
const app = express() ;
app.use(express.json() ) ;
app.post("/webhook", (req: Request, res: Response) => {
const {event, call} = req.body;
switch (event) {
case "call_started":
console.log("Call started event received", call.call_id) ;
break;
case "call_ended":
console.log("Call ended event received", call.call_id) ;
break;
case "call_analyzed":
console.log("Call analyzed event received", call.call_id) ;
break;
default:
console.log("Received an unknown event:", event) ;
}
// Acknowledge the receipt of the event
res.status(204) .send() ;
}) ;AI Evy
07/25/2025, 1:24 PMwebhook_url parameter when creating or updating agents:
json
{
"webhook_url": "<https://webhook-url-here%22>
}
The webhook signature verification is the recommended security approach for agent-level webhooks, as it ensures the authenticity of requests from Retell AI without requiring Basic Auth configuration [(1) ]() .AI Evy
07/25/2025, 1:24 PMAI Evy
07/25/2025, 1:24 PManton333_50203
08/01/2025, 9:16 AMAI Evy
08/01/2025, 9:16 AMAI Evy
08/01/2025, 9:17 AM{{current_agent_state}} - Current state name (for multi-state agents)
- {{previous_agent_state}} - Previous state name
- {{current_time}} - Current time in America/Los_Angeles
- {{current_time_[timezone]}} - Current time in specified timezone, for example: {{current_time_Australia/Sydney}}
- {{current_calendar}} - 14-day calendar in America/Los_Angeles
- {{current_calendar_[timezone]}} - 14-day calendar in specified timezone, for example: {{current_calendar_Australia/Sydney}}
- {{call_type}} - Call type, web_call or phone_call
Available for phone calls only:
- {{direction}} - Call direction, inbound or outbound
- {{user_number}} - User's phone number (from_number for inbound, to_number for outbound)
- {{agent_number}} - Agent's phone number (to_number for inbound, from_number for outbound)
Additional system variables mentioned in changelog:
- {{current_time}} - current time in America/Los_Angeles (Monday, March 24, 2025 at 02:53:01 PM PDT) [(2) ]()
- {{current_time_[timezone]}} - current time in given timezone
- {{call_type}} - web_call or phone_call
- {{direction}} - inbound or outbound (for phone calls only)
- {{user_number}} - user phone number (inbound: from_number, outbound: to_number)
- {{agent_number}} - agent phone number (inbound: to_number, outbound: from_number)
These system variables are automatically provided by Retell and don't need to be configured in your agent settings [(1) ]() .AI Evy
08/01/2025, 9:17 AMAI Evy
08/01/2025, 9:17 AM