Phase 5 — Omnichannel Communication
Unified inbox for SMS, WhatsApp, and email — with automated appointment reminders, missed-call follow-ups, and customisable message templates.
What It Does
KaiVox brings all customer conversations into one inbox. Inbound SMS and WhatsApp messages from Twilio arrive in real time. Outbound messages can be sent manually from the CRM or automatically triggered by the scheduler (reminders, follow-ups). Message templates are fully customisable per tenant.
Key Routes
| URL | Description |
|---|---|
GET /messages | Unified inbox — all conversations |
GET /messages/{customerId} | Per-customer message thread |
POST /messages/send | Send manual SMS/WhatsApp from inbox |
POST /api/twilio/{slug}/sms | Inbound SMS webhook |
POST /api/twilio/{slug}/whatsapp | Inbound WhatsApp webhook |
GET /settings/notifications | Notification settings + template editor |
PUT /settings/notifications | Save notification settings |
PUT /settings/message-templates/{id} | Update a message template |
Key Files
| Type | Path |
|---|---|
| Service | app/Services/SmsService.php |
| Service | app/Services/WhatsAppService.php |
| Service | app/Services/NotificationService.php |
| Service | app/Services/MessagingConfigService.php |
| Model | app/Models/Message.php |
| Model | app/Models/MessageTemplate.php |
| Controller | app/Http/Controllers/MessagesController.php |
| Command | app/Console/Commands/SendAppointmentReminders.php — runs hourly |
| Command | app/Console/Commands/SendMissedCallFollowUps.php — runs every 15 min |
| Table | messages — tenant_id, customer_id, channel (sms/whatsapp/email), direction (inbound/outbound), body, sent_at |
| Table | message_templates — tenant_id, type, channel, subject, body |
Automated Notifications
| Notification | When | Channel | Scheduler |
|---|---|---|---|
| Booking confirmation | Appointment created | SMS | Immediately (via NotificationService) |
| Appointment reminder | 24 hours before appointment | SMS | Hourly scheduler |
| Missed-call follow-up | After a missed call | SMS | Every 15 minutes |
| Review request | Manual trigger from customer profile | SMS | On demand |
Message Templates
Default templates are created for each tenant on onboarding. Tenants can edit them at Settings → Notifications. Variables available in templates:
{{customer_name}}— customer's first name{{business_name}}— tenant's business name{{appointment_date}}— formatted appointment date{{appointment_time}}— appointment time{{service_name}}— booked service name{{staff_name}}— assigned staff member's name
What's Complete
- Unified inbox UI: conversation list + per-customer thread view
- Message model supporting SMS, email, WhatsApp channels
- Channel stats in inbox (total/today/per-channel counts)
- SMS sending via Twilio (SmsService)
- WhatsApp sending via Twilio (WhatsAppService)
- Inbound SMS webhook (stored, triggers automation)
- Inbound WhatsApp webhook (stored, triggers automation)
- MessagingConfigService: platform health checks with tenant-friendly error messages
- NotificationService: booking confirmations, reminders, missed-call follow-ups
- Message Templates: DB-backed, per-tenant customisable
- Notification Settings: toggle auto-send per type, set reminder hours, edit templates
- Auto-reminder scheduler (hourly — sends 24h-before reminders)
- Missed-call follow-up scheduler (every 15 min)
- Email: Laravel Mail configured — SMTP set (deferred until Hostinger deploy)
What's Deferred
- Facebook Messenger integration
- Instagram DM integration
- Google Business Messages integration
- Live chat widget (embeddable JS snippet for tenant websites)
- Cross-channel customer memory (unified context across channels)
- Real email delivery (blocked locally — works on Hostinger server)