https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi I set up cal
# ❓・ai-evy-support
e
Hi @AI Evy I set up cal.com as per your tutorial. As for checking availability, it works, but when it comes to scheduling appointments, this error occurs: {"error":"Error calling Cal Booking API: Axios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400\nresponse status: 400\nresponse data: [{\"message\":\"1\",\"data\":null},\"custom in 'responses': {attendeePhoneNumber}error_required_field\"]"}
a
Thanks for tagging me @elvalith. I'll look through relevant sources and get back to you shortly.
### Answer The error message you’re getting indicates that the Cal.com booking API expects the attendeePhoneNumber field, but it’s missing from your payload. This is a required field for the booking to succeed with certain Cal.com event types [(1) ]() . To resolve this: - Make sure that when your Retell AI agent calls the book_appointment function for Cal.com, it is passing attendeePhoneNumber as part of the responses or payload. - Double-check your Retell AI function/tool configuration to ensure attendeePhoneNumber is being collected from the user and included in the function call [(2) ]() . If the API call is still failing, review your event type and function configuration in both Cal.com and Retell AI to verify all required fields are present .
​ To learn more, see the sources I considered: [[1] Cal.com booking errors](https://discord.com/channels/1186424376300679209/1377380250954105064) [[2] Book Calendar](https://docs.retellai.com/build/book-calendar) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
e
The number is not being passed to the book appointment function. How do I get it to pass it on? @AI Evy
a
Thanks for the follow-up, @elvalith. I'll get back to you soon.
### Answer To ensure the phone number (attendeePhoneNumber) is passed to the Cal.com booking function, you need to explicitly instruct the Retell AI agent to include this field in the function payload. According to discussions from other users, the LLM may not always pass all required fields (like phone) unless the prompt specifically directs it to do so [(1) ]() . A practical solution is to update your system prompt for the booking function with clear instructions, such as: "Important: Always transfer the date/time, email, name, and telephone number to the functions with each call." This prompt ensures the agent includes attendeePhoneNumber when invoking the book_appointment function, resolving the missing field issue .
​ To learn more, see the sources I considered: [[1] book_appointment doesn’t send phone attribute to cal](https://discord.com/channels/1186424376300679209/1329010496765956206) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.