mohammed21
06/26/2025, 2:53 PMAI Evy
06/26/2025, 2:53 PMAI Evy
06/26/2025, 2:53 PM"custom in 'responses': {phone}error_required_field" suggests that Cal.com's event type configuration requires a phone number field that isn't being included in the booking API call [(1) ]() [(2) ]() .
To troubleshoot this:
1. Check your Cal.com event type settings to see if phone number is marked as required [(2) ]()
2. Verify that your agent's prompt explicitly instructs it to collect and use the phone number when booking [(3) ]()
3. Consider that some users have found the native Cal.com integration has limitations with custom fields, and may require using the Cal.com API directly through custom functions for more complex field requirements [(4) ]() [(5) ]()
One user mentioned that they had to use custom functions instead of the built-in Cal.com integration to handle additional fields properly [(5) ]() . Another approach mentioAI Evy
06/26/2025, 2:53 PMAI Evy
06/26/2025, 2:53 PMAI Evy
06/26/2025, 2:53 PMmohammed21
06/26/2025, 4:27 PMAI Evy
06/26/2025, 4:27 PMAI Evy
06/26/2025, 4:27 PMbook_appointment_custom)
- Add a description like "Book appointment with custom fields including phone number"
3. Select the HTTP method (typically POST for booking)
4. Add your endpoint URL where Retell will send the booking request
5. Set request headers if needed (like Authorization for your calendar API)
6. Define parameters using JSON schema format :
javascript
{
"type": "object",
"properties": {
"start": {
"type": "string",
"description": "The start time of the appointment"
},
"eventTypeId": {
"type": "number",
"description": "The event type ID from your calendar"
},
"attendee": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The attendee's name"
},
"email": {
"type": "string",
"description": "The attendee's email"
},
"phone": {
"type": "string",
"description": "The attendee's phone number"
}
}
}
},
"required": ["start", "eventTypeId", "attendee"]
}
## Setting Up Your Endpoint
Your custom function endpoint will receive requests with this structure :
javascript
{
"name": "book_appointment_custom",
"call": { /* call object with context */ },
"args": { /* the booking parameters */ }
}
## Verifying Requests
To verify requests are from Retell, check the X-Retell-Signature header :AI Evy
06/26/2025, 4:27 PMjavascript
import { Retell } from "retell-sdk";
this.app.post("/book-appointment", async (req: Request, res: Response) => {
if (
!Retell.verify(
JSON.stringify(req.body) ,
process.env.RETELL_API_KEY,
req.headers["x-retell-signature"] as string,
)
) {
console.error("Invalid signature") ;
return;
}
// Handle booking logic here
}) ;
## Updating Your Prompt
Include explicit instructions in your agent's prompt about when to use the custom function :
When user provides all booking details including phone number, please book the appointment by calling the `book_appointment_custom` function.
This approach gives you full control over the booking process and can handle custom fields like phone numbers that the built-in Cal.com integration might not support properly [(2) ]() .AI Evy
06/26/2025, 4:27 PMAI Evy
06/26/2025, 4:27 PM