Phase 3 — Scheduling
Full appointment scheduling system — calendar, staff management, service catalog, available slot API, holiday blackouts, multi-location support, and one-way Google Calendar sync.
What It Does
Tenants manage their complete appointment workflow: add services with durations and prices, add staff with working hours, set holidays and emergency closures, and view all bookings on a monthly calendar. The AI uses this data in real time to check available slots and book appointments during calls. Google Calendar sync keeps the owner's Google Calendar up to date automatically.
Key Routes
| URL | Description |
|---|---|
GET /appointments | Calendar view (monthly) |
GET /appointments/create | Create appointment form |
POST /appointments | Store new appointment (fires automation + Google Calendar sync) |
GET /appointments/{id}/edit | Edit appointment |
PUT /appointments/{id} | Update appointment |
POST /appointments/{id}/cancel | Cancel appointment (fires automation + deletes Google Calendar event) |
POST /appointments/{id}/complete | Mark as completed |
GET /appointments/slots | Available slots API (used by AI during calls) |
GET /staff | Staff list |
GET /services | Services catalog |
GET /locations | Business locations |
GET /settings/holidays | Holiday blackout dates |
GET /settings/google-calendar/connect | Start Google Calendar OAuth |
Key Files
| Type | Path |
|---|---|
| Controller | app/Http/Controllers/AppointmentsController.php |
| Controller | app/Http/Controllers/StaffController.php |
| Controller | app/Http/Controllers/ServicesController.php |
| Controller | app/Http/Controllers/LocationsController.php |
| Service | app/Services/GoogleCalendarService.php |
| Model | app/Models/Appointment.php |
| Model | app/Models/Staff.php |
| Model | app/Models/Service.php |
| Model | app/Models/Location.php |
| Model | app/Models/WorkingHour.php |
| Table | appointments — customer_id, staff_id, service_id, date, time, status, source, notes |
| Table | staff — name, specialty, is_active, google_calendar_id |
| Table | services — name, duration_minutes, price, sort_order, is_active |
| Table | working_hours — staff_id, day_of_week, start_time, end_time |
| Table | holidays — tenant_id, date, name, type (holiday/closure) |
| Table | locations — name, address, phone, is_primary |
What's Complete
- Appointment CRUD: create, edit, update status, cancel, complete, show
- Calendar view (monthly) with today's agenda panel
- Available slots API: checks working hours, existing appointments, holiday blackouts
- Staff management: CRUD, profile photo, specialty, active/inactive toggle
- Working hours per staff (per day, start/end time)
- Holiday blackout dates (full-day closures)
- Emergency closures (ad-hoc same-day closures)
- Services catalog: name, duration, price, sort order, active toggle
- Multi-location support: add branches, mark primary location
- Google Calendar one-way sync (KaiVox → Google) via pure Guzzle REST
- OAuth2 connect/disconnect UI in Settings → Integrations tab
- Auto-sync on appointment create, update, cancel
- Token refresh logic with expiry detection
- Event delete on appointment cancellation
What's Deferred
- Google Calendar two-way sync (Google → KaiVox via push notifications)
- Outlook / Microsoft Calendar integration
- Waitlists + deposits (when slot is full, hold booking)
- Queue management / walk-in token system (built in Phase 12 Front Desk instead)
- Smart slot optimization (AI suggests best available times)