Site Visits Schedule
Configure physical tour schedules requested by buyers. Route assignments to sales representatives, update calendar slots, and automate WhatsApp appointment confirmation templates.
The Site Visit Workflow
Physical property viewings are the primary transition point from online lead generation to closed sales. Through the WhatsApp channel, users can request tours by calling the book_site_visit AI function tool.
Once created, the appointment appears in the Site Visits dashboard. Administrators review the booking, assign a sales representative, and dispatch an automated template containing verification details, meeting times, and landmarks.
1. Visit Status Indicators
Schedule details are tracked using four top-level counters:
Total Bookings
Sum of all scheduled property tour requests.
Pending Approval
Visits awaiting agent verification and agent allocation.
Active Visits
Tours validated with assigned agent, time, and date.
Tours Conducted
Successful property viewings completed by sales team.
2. Site Visit Database Schema
Site visit bookings coordinate properties, leads, and representatives. Database schemas are structured below:
| Entity Field | Database Column | Type | Description |
|---|---|---|---|
| Property Reference | property_id | UUID (Required) | Foreign key matching the inventory property table. Matches maps, locality, and title. |
| Client Phone | customer_phone | Text (Required) | Clean international phone number of the buyer receiving notification updates. |
| Client Name | customer_name | Text | Null | Contact's public name. |
| Tour Date & Time | visit_datevisit_time | Date / Time | Scheduled calendar day and exact slot time (HH:MM formats). |
| Lifecycle Status | status | Enum | States: requested, reschedule_requested, confirmed, rescheduled, cancelled, completed, no_show. |
| Assigned Agent | assigned_agent_nameassigned_agent_phone | Text | Null | Sales representative's name and contact number dispatched to the customer during confirmation. |
| Internal Notes | notes | Text | Handoff directions, specific buyer requests, meeting locations, or pickup points. |
3. Confirmation API & WhatsApp Automation
Confirming or rescheduling a tour triggers automated template notifications sent to the buyer's phone:
Automated confirmation template dispatch API
When an agent clicks Confirm (or Reschedule) in the dashboard, the system initiates a POST request to:
/api/whatsapp/real-estate/site-visits/[id]/confirmThis endpoint compiles variables (property name, date, time slot, agent name, phone, and coordinates) and queries the WhatsApp template engine to dispatch a pre-approved utility message template.
Dispatch Flow Architecture
- Trigger: Status transitions to
confirmedorrescheduled. - Compilation: Gathers location mapping variables from the property link and agent details.
- Dispatch: Submits transaction details to the Meta WhatsApp Cloud API.
- Feedback: Dashboard displays a toast notification confirming if the WhatsApp template was sent successfully.
Agent Allocations & Handshakes
Direct representative routing workflows
To ensure high conversion, bookings include agent parameters. This links the online intake process with physical viewings:
Coordination Parameters:
- Representative Assignment: Assigning an agent name and phone binds them to the site visit row.
- WhatsApp Notification: The confirmation message shares the assigned agent's phone and name directly with the client, enabling them to initiate contact if delayed.
- Cancellation Safe Handling: If status changes to
cancelled, notifications are stopped. The dashboard logs the cancellation event to keep the pipeline clean.