v1.0 Dashboard Public Profile GitHub
⏳ ~80% Complete Phase 5

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

URLDescription
GET /messagesUnified inbox — all conversations
GET /messages/{customerId}Per-customer message thread
POST /messages/sendSend manual SMS/WhatsApp from inbox
POST /api/twilio/{slug}/smsInbound SMS webhook
POST /api/twilio/{slug}/whatsappInbound WhatsApp webhook
GET /settings/notificationsNotification settings + template editor
PUT /settings/notificationsSave notification settings
PUT /settings/message-templates/{id}Update a message template

Key Files

TypePath
Serviceapp/Services/SmsService.php
Serviceapp/Services/WhatsAppService.php
Serviceapp/Services/NotificationService.php
Serviceapp/Services/MessagingConfigService.php
Modelapp/Models/Message.php
Modelapp/Models/MessageTemplate.php
Controllerapp/Http/Controllers/MessagesController.php
Commandapp/Console/Commands/SendAppointmentReminders.php — runs hourly
Commandapp/Console/Commands/SendMissedCallFollowUps.php — runs every 15 min
Tablemessages — tenant_id, customer_id, channel (sms/whatsapp/email), direction (inbound/outbound), body, sent_at
Tablemessage_templates — tenant_id, type, channel, subject, body

Automated Notifications

NotificationWhenChannelScheduler
Booking confirmationAppointment createdSMSImmediately (via NotificationService)
Appointment reminder24 hours before appointmentSMSHourly scheduler
Missed-call follow-upAfter a missed callSMSEvery 15 minutes
Review requestManual trigger from customer profileSMSOn 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)