Overview of the calendar integration (Legacy)

Straight out of the box, using only the required webhook data points, the AI is not able to read a calendar or book appointments into it. If you try to use the AI to book in this instance, the AI will likely just make up times to try to do what you're asking it to do, but it will never be accurate.

Giving the AI Access to the Calendar

For the AI to actually have access to the calendar, you need to have a certain data point in the webhook. You have to have a data point with a key of "goal" and a value of "booking". If the webhook does not have this, the AI will not actually be able to read information from the calendar, even if you tell it to in the prompt! Bear in mind, though, if you have a webhook that fires in a situation where the AI will never need to have access to the calendar, it's best to not include this data point, as it requires tokens!

Letting the AI Book Appointments

If you want the AI to actually be able to book appointments rather than just offer them then hand off to a team member, you need to have both the booking goal data point and another data point with a key of "booking_action" and a value of "auto". When this is included, every conversation turn, our system check to see if the AI has confirmed an appointment. It does this by looking if the AI is about to say something along the lines of "Great! I have you booked for Friday, May 16th at 2:30 PM!" When the AI is about to say something like this, our system will read the date and time that the AI is saying, then attempt to book that into, by default, the calendar that is set in the Capri portal. For our system to properly get the date and time that's needed to be booked, the AI needs to fully say the date and time, rather than just saying something like, "Awesome, we have you booked!", as this would cause the booking function to fail, so it's important to not train this message out via the prompt or the emulator sessions! Our system will then prevent the AI from actually saying that final line, though, so if you want the customer to have a confirmation message, you'll need to set up a workflow that fires when an appointment is booked in the calendar that then sends them a message!

Once again, bear in mind that this feature uses many tokens, more than any other feature at around 1k tokens in fact, so don't include this step in a webhook unless you need to book an appointment with it. In fact, it's better to separate things out to where the booking action has its own, dedicated webhook!

Using Different Calendars

By default, both the calendar check and the booking function will use the calendar that you have set in the Capri portal. If you want to use a different one, however, say for instance you have multiple calendars for multiple situations, you can include a data point with a key of "calendar" and a value of the calendar ID that you want to use. You can find this calendar ID by copying the permanent link from the calendar, pasting this somewhere, like the address bar of your browser, and then copying the last part of the URL!

Last updated