https://retellai.com/?utm_source=discord&utm_medium=seo logo
My detail call log when checking for availability ...
# ❓・ai-evy-support
n
@AI Evy My detail call log when checking for availability on cal.com shows: Calling tool: check_availability_cal Arguments: {"start_time":"next Friday 12:00 AM","end_time":"next Friday 23:59"} I don't want it starting to look next friday. I want it to look for the next available days (I have time available monday-friday). How could I fix this?
a
Thanks for tagging me @nitr0us604. I'll look through relevant sources and get back to you shortly.
### Answer To fix this issue, you need to update your agent's prompt to provide clearer instructions for when to invoke the calendar availability function [(1) ]() . The documentation suggests including explicit guidance in the prompt about when to call the function . Based on the documentation, you should update your prompt to specify when the agent should check availability . Here's an example from the documentation:
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.
A community member shared a more detailed prompt structure that addresses your specific need for checking upcoming weekdays [(2) ]() :
Copy code
## Step-by-Step Instructions

1. **Collect Caller Information:**
   - Request their first and last name.
   - Ask for the purpose of the appointment.

2. **Collect Contact Information:**
   - Ask for their email address and ask them to spell it for accuracy.

Repeat the email back to them and wait for confirmation.
If incorrect, allow them to correct it and repeat the process.
   - Request their phone number for follow-up or changes.

3. **Request Timeslot:**
   - Ask for a specific date and time they prefer for a 30-minute appointment this week.

4. **Check Availability:**
   - **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.**
   - **Check availability in Central Time (CST/CDT) ** by calling function `check_availability_cal_3`.
   - If the spot is available, confirm the requested timeslot with the user:  
     - *"Just to confirm, you want to book the appointment at [time] on [specific date]?"*  
     - Ensure the chosen time is from the available slots.  
   - If the spot is unavailable, suggest three alternative times closest to the requested timeslot and ask the caller to choose one.  
   - Repeat the process until a valid timeslot is confirmed.  

5. **Book Appointment:**
   - Ensure the selected timeslot is **converted and stored in Mountain Time (America/Denver) before making the booking request**.
   - Call function `book_appointment_cal_4` tool in Mountain Time (America/Denver) to confirm the booking.
   - Let them know a confirmation email will be sent with all the details.
The key is to modify your prompt to instruct the agent to ask users for their preferred time range rather than defaulting to specific days like "next Friday" . You should also include instructions about checking availability across your business days (Monday-Friday) and suggesting alternative times when the requested slot isn't available .
​ 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) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
n
@AI Evy I don't want to ask users for their availability. I want to suggest the next two available days available in cal.com.
a
Thanks for the follow-up, @nitr0us604. I'll get back to you soon.
### Answer To have your agent automatically suggest the next two available days instead of defaulting to "next Friday", you'll need to modify your agent's prompt to instruct it to check availability across multiple days and present options to the user [(1) ]() . The documentation shows that you can customize how the check calendar availability function is used by updating your prompt . Instead of having the agent assume specific days, you should structure your prompt to: 1. Check availability across your business days (Monday-Friday) 2. Present the next available time slots to the user 3. Let the user choose from the suggested options Based on the Cal.com integration documentation, the check availability function can be configured to search across date ranges . You'll want to modify your prompt to include instructions like:
Copy code
When a user requests an appointment, check availability across the next several business days (Monday-Friday) by calling the `check_calendar_availability` function. Present the user with the next two available appointment slots and ask them to choose their preferred option.
The key is updating your prompt to be more specific about the desired behavior rather than letting the agent make assumptions about which days to check [(2) ]() . This approach aligns with the best practice of providing clear instructions for when and how to invoke custom functions [(1) ]() . You may also want to specify the time range more broadly in your function calls, checking multiple days at once rather than targeting specific days like "next Friday" .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Check Calendar Availability](https://docs.retellai.com/build/check-availability) [[2] How to Write Voice Bot Scripts That Engage Users | Retell AI](https://www.retellai.com/blog/how-to-write-voice-bot-prompt) ​