All Verticals · Voice Workflow
When book_appointment fires, the workflow offers live Cal.com availability, re-verifies the slot before booking it atomically, and texts a confirmation — with a graceful fallback if the slot was taken.
Workflow
How it runs, step by step
Tool call: book_appointment
The agent calls book_appointment when the caller wants to schedule.
Read caller
Load the caller's context from Zep.
Get availability
Fetch open slots from Cal.com for the requested service.
Offer times
Read the next available times back to the caller.
Slot chosen?
Branch on whether the caller picked a time.
Offer callback
Offer a callback or an alternate day when nothing fits.
Verify + book
Re-verify the slot is still open, then book it atomically to prevent double-booking.
End (no booking)
End without a booking; a follow-up is queued.
Booked?
Branch on the booking result.
Send confirmation
Text the caller the confirmed time and a calendar link via Twilio.
Apologize + take callback
If the slot was just taken, apologize and capture a callback.
Save to Zep
Persist the booking and context to memory.
Return tool result
Return the booking result to the agent.