raja
04/05/2026, 2:36 AMAI Evy
04/05/2026, 2:36 AMAI Evy
04/05/2026, 2:36 AMAI Evy
04/05/2026, 2:36 AMAI Evy
04/05/2026, 2:36 AMraja
04/05/2026, 2:37 AMAI Evy
04/05/2026, 2:38 AMAI Evy
04/05/2026, 2:38 AMAI Evy
04/05/2026, 2:38 AMAI Evy
04/05/2026, 2:38 AMraja
04/05/2026, 5:09 PMAI Evy
04/05/2026, 5:09 PMAI Evy
04/05/2026, 5:10 PMfetch() function to make HTTP requests to your dental PMS API .
## Steps to Connect Your Dental PMS
1. Add a Custom Function or Code Tool
- Click "+ Add" in the tools section and select "Custom Function" or "Code" [(1) ]() [(2) ]()
- Configure the function name and description (e.g., "book_dental_appointment") [(1) ]()
2. Configure API Connection
For Custom Functions:
- Select the HTTP method (GET, POST, PATCH, PUT, DELETE)
- Add your dental PMS API endpoint URL
- Set request headers and query parameters as needed
For Code Tool:AI Evy
04/05/2026, 5:10 PMjavascript
// Example: Fetch patient data from dental PMS
const response = await fetch("<https://api.yourdentalPMS.com/patients/%22> + dv.patient_id, {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
}
}) ;
const patientData = await response.json() ;
return { patient_name: patientData.name, next_appointment: patientData.next_visit };
[(2) ]()
3. Define Parameters
Define the parameters using JSON schema format for the data you need to send to your dental PMS [(1) ]() .
4. Set Response Variables
Extract values from the API response and save them as dynamic variables for use later in the conversation [(1) ]() [(2) ]() .
5. Update Your Prompt
Guide the LLM on when to use the integration in your agent's prompt .
## Alternative: Webhooks
You can also use webhooks to receive real-time notifications about call events and trigger actions in your dental PMS [(4) ]() . Retell supports events like call_started, call_ended, and call_analyzed .AI Evy
04/05/2026, 5:10 PMAI Evy
04/05/2026, 5:10 PMraja
04/05/2026, 5:11 PMAI Evy
04/05/2026, 5:11 PMAI Evy
04/05/2026, 5:12 PMfetch() calls to your PMS system [(2) ]()
- Connecting through certified partners who have experience with specific dental software [(3) ]()
If you need help integrating a specific dental PMS not listed above, you can work with a [Retell AI certified partner]() who specializes in healthcare integrations, or build the integration yourself using Custom Functions or Code Tool if your PMS has an API [(1) ]() [(2) ]() .AI Evy
04/05/2026, 5:12 PMAI Evy
04/05/2026, 5:12 PMraja
04/05/2026, 8:44 PMAI Evy
04/05/2026, 8:44 PMAI Evy
04/05/2026, 8:44 PMAI Evy
04/05/2026, 8:44 PMAI Evy
04/05/2026, 8:44 PMcall_analyzed as the webhook event type and call_analysis as the field name in the call object [(1) ]() [(2) ]() .
## Webhook Event
The webhook event is call_analyzed, which is triggered when call analysis is complete [(1) ]() . This event includes the full call data with the call_analysis object populated .
## Field in Call Object
The analysis results are stored in the call_analysis field within the call object [(2) ]() . This field contains:
- call_summary
- in_voicemail
- user_sentiment
- call_successful
- custom_analysis_data
## Example Webhook Payload
json
{
"event": "call_analyzed",
"call": {
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"call_analysis": {
"call_summary": "The agent called the user to ask question about his purchase inquiry...",
"in_voicemail": false,
"user_sentiment": "Positive",
"call_successful": true,
"custom_analysis_data": {}
}
}
}
[(1) ]() [(2) ]()
Summary: Use call_analyzed when configuring which webhook events to receive, and access the call_analysis field in the payload to retrieve the analysis results .raja
04/26/2026, 10:24 PMAI Evy
04/26/2026, 10:24 PMAI Evy
04/26/2026, 10:24 PMcall_analysis contains custom_analysis_data [(1) ]() [(2) ]() [(3) ]() [(4) ]() [(5) ]() , but they don't explain what happens to this field when agent_swap occurs or which agent's webhook receives which analysis data.
For detailed information about agent_swap and custom_analysis_data handling, I recommend:
- [Create Web Call]()
- [Get Call]()
- [Webhook Overview]()
Would you like a general answer based on my knowledge instead?AI Evy
04/26/2026, 10:24 PMAI Evy
04/26/2026, 10:24 PMraja
04/26/2026, 10:37 PMAI Evy
04/26/2026, 10:37 PMAI Evy
04/26/2026, 10:37 PMcustom_analysis_data is handled between agents when agent_swap is used, or which agent's webhook receives which analysis data.
The sources show that call_analysis contains custom_analysis_data [(1) ]() [(2) ]() , but they don't document the specific behavior during agent swap scenarios—specifically whether the First Agent's webhook receives the Flex/Destination Agent's custom_analysis_data in the call_analyzed event.
For detailed information about agent swap webhook behavior, check out these potentially useful sources:
- [Update Call]()
- [Register Phone Call]()
- [Platform Changelogs | Retell AI]()
Would you like a general answer based on my knowledge instead?AI Evy
04/26/2026, 10:37 PMAI Evy
04/26/2026, 10:37 PMraja
04/26/2026, 10:38 PMAI Evy
04/26/2026, 10:38 PMAI Evy
04/26/2026, 10:38 PMcall_analyzed webhook at the end [(1) ]() [(2) ]()
2. **Consolidated Analysis**: The call_analysis object typically includes analysis from the entire call journey, which may combine data from both the First Agent and the Flex/Destination Agent
3. **Webhook Routing**: The call_analyzed webhook is generally sent to the webhook URL configured for the agent that initiated or owns the call, though this can vary by platform implementation
Important Considerations:
- The custom_analysis_data field within call_analysis may aggregate results from both agents or only reflect the final agent's analysis, depending on how the platform processes multi-agent calls
- If you need to track analysis data separately for each agent in the swap, you may need to implement custom tracking through intermediate webhooks or custom functions during the transfer
Recommendation:
To get definitive behavior for Retell AI's agent_swap feature, I recommend:
- Testing with a simple agent swap scenario and examining the webhook payload
- Reaching out to Retell AI support at support@retellai.com for official documentation on this specific behavior
- Checking the [Platform Changelogs]() for any recent updates about agent transfer webhook behavior [(3) ]()
This is a general answer based on typical platform patterns, as the specific implAI Evy
04/26/2026, 10:38 PMAI Evy
04/26/2026, 10:38 PMAI Evy
04/26/2026, 10:38 PM