https://retellai.com/?utm_source=discord&utm_medium=seo logo
ok I am having issues with checking availability ...
# ❓・ai-evy-support
f
ok @AI Evy I am having issues with checking availability on the cal.com calendar when the user gives a broad response like "next tuesday" but there is no actual date included. The etsCheckAvailability function always gives an error and says there is no available time that date tool_call_id: 4c3e5820e6770020 { "start_time": "next Tuesday 12:00 AM", "end_time": "next Tuesday 11:59 PM", "execution_message": "Checking availability for next Tuesday." } how do i fix this so it is able to look up the date as well
a
Thanks for tagging me @feeasa_98155. I'll look through relevant sources and get back to you shortly.
### Answer [(1) ]() This is a common issue with relative date handling in the cal.com integration [(2) ]() [(3) ]() . The built-in cal.com integration has known limitations with relative dates like "tomorrow, next week, this friday, etc." [(3) ]() Here are solutions to fix this issue: 1. Update your prompt to handle date conversion Include specific instructions for converting relative dates to absolute dates :
Copy code
**Convert today's date: `{{current_time}}` to Central Time (America/Chicago, CST/CDT) before making the request to ensure the requested time is not in the past.**
2. Instruct the agent to ask for specific dates Add this to your prompt :
Copy code
When user stated a time range, please check the calendar availability by calling the `check_calendar_availability` function and let user know whether that range work or not.
[(1) ]() 3. Handle timezone conversion properly Ensure proper timezone handling in your prompt [(3) ]() :
Copy code
Ask for a specific date and time they prefer for a 30-minute appointment this week.
4. Consider the integration limitations The built-in cal.com integration is more for demo purposes and doesn't work well in production when conversations involve relative dates . If you give the agent exact dates like "March 6, 2025" it has no problem, but people rarely talk like that . 5. Improve your prompt structure In most cases, issues are not due to bugs, but because your prompt or process of appointment booking is not set up well enough . The cal.com API "get available slots" can be unreliable in some cases [(4) ]() , so consider implementing better error handling and date validation in your prompts.
​ To learn more, see the sources I considered: [[1] Check Calendar Availability](https://docs.retellai.com/build/check-availability) [[2] Discord message from @melvinglenford on 2025-03-06](https://discord.com/channels/1186424376300679209/1186462578310910112/1347206753783250995) [[3] Discord message from @qcumbers1_cc on 2025-03-06](https://discord.com/channels/1186424376300679209/1186462578310910112/1347214150778224692) [[4] Discord message from @jayzpio on 2025-01-16](https://discord.com/channels/1186424376300679209/1186462578310910112/1329318130165481502) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.