Can't get Assistant to Propose Available Appointme...
# support
u
No matter how i try to prompt it my Assistant is unable to do this. A Tool of Mine sends the following response:
Copy code
{
  "name": "checkAvailability",
  "role": "tool_call_result",
  "time": 1722956245369,
  "result": "2024-08-09T10:00:00 is booked. Therefore, the desired date is NOT available. All the following time periods are booked: \n\n from 2024-08-08T07:00:00.000Z to 2024-08-08T07:45:00.000Z, from 2024-08-08T08:00:00.000Z to 2024-08-08T08:45:00.000Z, from 2024-08-08T09:30:00.000Z to 2024-08-08T10:15:00.000Z, from 2024-08-08T11:15:00.000Z to 2024-08-08T12:00:00.000Z, from 2024-08-09T07:00:00.000Z to 2024-08-09T07:45:00.000Z, from 2024-08-09T08:00:00.000Z to 2024-08-09T08:45:00.000Z, from 2024-08-09T09:00:00.000Z to 2024-08-09T09:45:00.000Z, from 2024-08-09T10:00:00.000Z to 2024-08-09T10:45:00.000Z",
  "toolCallId": "call_OEZOCQxMSDhNs96mAtu4uqc5",
  "secondsFromStart": 38.211
}
It is then Prompted to Pick dates that arent in the List, and that follow other limitations and offer them to the Caller. But it picks random Appointments that overlap or are equal to the ones in the List. call id for Reference: e8019958-0a33-412a-9233-e535335302c7 Relevant Prompt Exerts for Reference: Use the 'checkAvailability' function to check if the appointment is booked. If the appointment is booked, the result will provide a list of booked appointments. Propose three available appointments that are not booked, considering all the conditions contained in this prompt. Prioritize appointments that are closer to the desired appointment date, for example, on the same day. [Appointment Booking Conditions] The appointment must not be in the past! That means it must not be before {{now}}. The appointment must be on a weekday (Monday to Friday). Appointments are available from 09:00 to 18:00. The appointment duration is 45 minutes, and appointments must not overlap. Observe public holidays in Germany.
v
@UC-BEN I understand you're experiencing some issues with your Assistant selecting appropriate appointment times. Let's address this step by step. First, we need to ensure that the Assistant is correctly parsing the list of booked appointments and then applying the conditions you've provided to find suitable alternatives. Here are the steps we'll take: 1. Parse the list of booked appointments from the 'checkAvailability' tool response. 2. Apply the conditions to identify potential appointment slots: - The appointment must be in the future. - It must be on a weekday (Monday to Friday). - Appointment times are between 09:00 and 18:00. - Each appointment is 45 minutes long without overlapping existing bookings. - Public holidays in Germany must be observed and avoided. Given the booked times you've provided, we will find the next available slots that meet these criteria. If you have a function that can automatically calculate this, please let me know, and we can call that function. Otherwise, I can assist you in creating a logic to find the next available slots manually. Would you like to proceed with a function call or shall we discuss a manual approach to solve this issue?
You can continue this conversation by mentioning me in the message.
u
@Vapi What Additions can i make to my make.com function to solve this then?
v
@UC-BEN To enhance your make.com function for appointment scheduling, consider implementing the following additions: 1. **Date and Time Validation**: Ensure that the function checks for the current date and time, and only proposes future appointments. 2. **Weekday Filtering**: Incorporate logic to filter out weekends, so the function only suggests appointments from Monday to Friday. 3. **Working Hours Restriction**: Add a constraint that limits appointment suggestions to the hours between 09:00 and 18:00. 4. **Duration and Overlap Check**: Include a check for the 45-minute duration of appointments and ensure that new appointments do not overlap with existing bookings. 5. **Public Holiday Recognition**: Integrate a calendar of German public holidays to avoid scheduling appointments on these dates. 6. **Algorithm for Finding Slots**: Develop an algorithm that iterates through potential time slots, applying the above filters, to find available appointments. 7. **Priority Sorting**: Sort the available slots by proximity to the desired appointment date and time to prioritize them accordingly. 8. **Output Formatting**: Format the output to clearly present the three proposed appointment options to the user. 9. **Error Handling**: Implement robust error handling to manage cases where no slots are available or other issues arise. 10. **User Preferences**: If possible, add functionality to take user preferences into account, such as preferred times of day or days of the week. By incorporating these features, your make.com function should be able to more effectively find and propose suitable appointment times that adhere to the specified conditions. If you need assistance with the specific implementation details or coding these features, please consult the make.com documentation or reach out to their support for more tailored guidance.
u
@Vapi and why cant i do this by prompt, seeing as some of those seem impossible in make
s
@UC-BEN let's connect and resolve it.
check dm.
s
Marking as complete because of no response.