Prerequisites
- A published agent deployed to a website or Twilio number.
- An HTTPS API for availability lookup and booking creation or change.
- A safe way to identify the customer, if the booking belongs to an account.
Implement
- Add a read-only availability tool with explicit inputs such as service, location, date, and time zone. Return slot IDs, not just display strings.
- Add a booking tool that takes a selected slot ID and an idempotency key. Your backend checks availability again, atomically reserves it, and returns a booking ID or a clear conflict.
- Instruct the agent to repeat the proposed time and ask for confirmation before calling the booking tool. Speak success only after the backend returns a booking ID.
- Test unavailable slots, changed user preference, duplicate tool calls, interrupted speech, and booking API failure. Check the final booking in the customer’s system of record.