A Chat Booking Is Not Confirmed Until the Calendar Says So
The calendar record, not the chatbot’s wording, decides whether an appointment exists. A booking reply is a commit acknowledgement, not a writing task. If the calendar has not accepted the appointment, the chatbot cannot truthfully say it is booked. The failure is easy to create. A visitor asks for Tuesday afternoon. The assistant offers a time and writes, “You are booked.” Meanwhile the calendar…
An appointment exists only when the calendar confirms it, not when a chatbot tells a visitor it is booked. The chatbot’s response is merely an acknowledgement, not a record of the booking. A customer might request a time on a Tuesday afternoon, but the assistant may write back with “You are booked.” However, if the calendar request fails, the business cannot be certain the customer has a slot.
The assistant must separate the customer's choices from the final commitment. Gathering details like the service, location, preferred time, and contact information helps clarify the booking process. However, an offered time is not final until the calendar system accepts it. Availability can change between the time the assistant asks for a booking and when the calendar writes it down.
Make this transitional period clear by confirming availability before the actual write, and returning the confirmed time, time zone, and reference afterwards. If the write fails, inform the customer that the booking did not go through. If the outcome is uncertain, state that the booking is unconfirmed while the system checks. Never use the same confirmation sentence for all three possible states.
Both Google Calendar and Microsoft Graph create an event through an authenticated write, returning an event resource that serves as proof of the committed appointment. Do not blindly resend the create request after a timeout, as this could result in two bookings. Instead, give the customer a stable identity for their intent, check for an existing result, and let a retry continue the same attempt.
Both Google Calendar and Stripe recommend using idempotency keys to avoid duplicate bookings after ambiguous results. The key design requirement is that one customer request should lead to at most one committed reservation. If the booking provider cannot guarantee this, reconcile the calendar before speaking as if the retry succeeded.
Booking is a lifecycle process, not a single chat turn. Customers may reschedule or cancel, requiring the assistant to find the original reservation, check new conditions, commit the change, and report the resulting state. A "done" response without a changed record leaves the operator and customer with differing versions of the appointment.
Use this pattern in HoverBot: let the chat gather and explain the information, but let a durable booking record decide what can be confirmed. While this approach may slow down the conversation, it ensures the customer can clearly see where the business can view and modify their appointment. Test the various failure scenarios before relying on the successful one.
Simulate calendar write failures, let successful writes timeout, retry the same request, and ask to reschedule a booking that no longer exists. At each step, compare the conversation transcript with the durable record. If they do not match, the assistant must stop promising and direct the customer to a human operator.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to