Visit Scheduling
The bot automatically schedules visits by checking agent availability on Google Calendar.
Visit Scheduling
When a client shows interest in visiting a property, the bot can offer available time slots and confirm the appointment automatically, without human intervention. Everything syncs with Google Calendar.
How the flow works
The client requests a visit
The client sends a message like "I want to see the property", "Can I visit it tomorrow?" or "When can we schedule a visit?". The bot recognizes this as a schedule visit intent.
The bot finds the assigned agent
The bot checks if the conversation has an assigned agent. If no agent is assigned, the bot escalates the conversation to a human so an agent is assigned first.
Availability check
The bot checks the assigned agent's availability. It uses two sources of information:
- Google Calendar (if the agent has it connected): Queries Google's FreeBusy API to get the agent's busy blocks for the next 7 days
- Existing visits in Trochai: Checks visits already scheduled on the platform to avoid conflicts
Available slots are calculated based on the agent's business hours, configured visit duration (default 60 minutes), and buffer time between appointments (default 30 minutes).
Time slot presentation
The bot sends a WhatsApp interactive message with up to 3 buttons, each representing an available time slot. The buttons show the date and time in short format, for example: "Mon 3 Mar 10:00".
The client selects a time slot
The client taps one of the buttons to select their preferred time. They don't need to type anything.
Automatic confirmation
When a time is selected, the bot automatically:
- Creates a Google Calendar event on the agent's calendar with visit details
- Records the visit in Trochai with "confirmed" status
- Sends a confirmation message to the client with the date, time, and agent's name
- Tags the conversation as "visit scheduled" for easy follow-up
What information is included in the appointment
When the Google Calendar event is created, it includes:
- Title: "Visit - [Client name]"
- Description:
- Contact method: WhatsApp
- Client name and phone number
- Property of interest (if identified during the conversation)
- Organization name
- Duration: According to agent configuration (default 60 minutes)
- Time zone: America/Costa_Rica
- Attendees: The agent receives the calendar invitation
If the agent has Google Calendar connected, they will receive an automatic event notification. They don't need to check Trochai to learn about the appointment.
Prerequisites
For visit scheduling to work fully, you need:
1. An agent assigned to the conversation
The conversation must have an assigned agent. The bot checks that specific agent's availability. If no agent is assigned, the bot will escalate the conversation instead of attempting to schedule.
See Assignments for more information about agent assignment.
2. Google Calendar connected (recommended)
For the bot to access the agent's real availability, the agent must connect their Google Calendar account in their profile settings. This allows:
- Seeing the agent's actual busy blocks
- Creating events directly on their calendar
- Avoiding conflicts with existing meetings
3. Business hours configured
Each agent can configure their business hours in Trochai. The bot only offers time slots within these ranges. If not configured, default values are used:
| Day | Default hours |
|---|---|
| Monday to Friday | 9:00 AM - 5:00 PM |
| Saturday | Disabled |
| Sunday | Disabled |
4. Visit duration and buffer time
Each agent can configure:
- Visit duration: How much time is reserved for each visit (default: 60 minutes)
- Buffer time: Time between visits for travel (default: 30 minutes)
For example, with a 60-minute duration and 30-minute buffer, the bot will offer time slots separated by 90 minutes.
What happens if no time slots are available
If the bot cannot find available time slots in the next 7 days (for example, the agent's calendar is full), it automatically:
- Escalates the conversation to a human agent
- Includes the reason: "High-intent lead: schedule_visit (no calendar slots)"
- The human agent can coordinate the visit manually
What happens without Google Calendar
If the agent has not connected Google Calendar:
- The bot calculates availability based solely on configured business hours and existing visits in Trochai
- The visit is recorded in Trochai but no Google Calendar event is created
- The agent will need to check their pending visits in Trochai
We recommend that all agents connect their Google Calendar for a complete experience. Without Google Calendar, the bot cannot detect the agent's external meetings, which could cause scheduling conflicts.
Visit tracking
Visits scheduled by the bot can be viewed and managed from the Events page, accessible from the sidebar. There you can:
- Filter visits by tabs: upcoming, past, or all
- Filter by status using the dropdown selector
- Edit a visit: change the date, time, duration, or add notes
- Mark as completed or no-show directly from the table
- Cancel a visit with a confirmation dialog
The conversation is automatically tagged as "visit scheduled" for easy follow-up from the inbox.
Possible visit statuses are: pending, confirmed, completed, canceled, or no-show.
If the agent has Google Calendar connected, status changes (completed, canceled) are automatically synced with the calendar event.
Limitations
- The bot offers a maximum of 3 time slots per request (WhatsApp button limit)
- Time slots are offered within the next 7 days
- Button titles have a maximum of 20 characters (format: "Mon 3 Mar 10:00")
- If the client does not select a time slot, the request expires and the client must request a new visit
Next steps
- Escalation -- What happens when the bot cannot schedule
- Assignments -- How to assign agents to conversations
- Bot configuration -- General bot settings