Notifications & CRM Specification
Status: Canonical Last Updated: 2026-05-11 Source: Schema tables,
packages/backend/convex/domains/notifications.ts,packages/backend/convex/domains/crm.ts
Related specs
- Tech Stack — External integrations (email, WhatsApp, Zoho)
- Data Model — notifications, notificationLogs, zohoSyncLogs tables
- Booking Flow — Confirmation triggers notification
- Payments — Payment success triggers notifications
- Admin Dashboard — Notification bell in admin dashboard
- Staff POS — ORDER_READY notifications for kitchen
- User Stories — US-S05 covers staff notifications
Notification Types
| Type | Channel | Trigger |
|---|---|---|
| EMAIL_CONFIRMATION | Payment success | |
| EMAIL_CANCELLATION | Reservation cancelled | |
| WHATSAPP_CONFIRMATION | Payment success | |
| EMAIL_ADMIN_NEW_BOOKING | New reservation created |
Notification Flow
1. Event occurs (payment, booking, etc.)
2. Create notification record in notifications table
3. notificationLogs tracks delivery
4. Email/WhatsApp sent via integrations
5. Status updated: SUCCESS or FAILEDEmail Integration
Configuration
npx convex env set SMTP_HOST your-smtp-host
npx convex env set SMTP_PORT 587
npx convex env set SMTP_USER your-user
npx convex env set SMTP_PASSWORD your-passwordEmail Templates
- Confirmation: Booking details, QR code, add to calendar
- Cancellation: Refund info, cancellation confirmation
- Admin alert: New booking notification
Template Variables
- {{customerName}}
- {{showTitle}}
- {{eventDate}}
- {{eventTime}}
- {{ticketType}}
- {{quantity}}
- {{totalAmount}}
- {{qrCodeUrl}}
WhatsApp Integration
Configuration
npx convex env set WHATSAPP_API_KEY your-api-key
npx convex env set WHATSAPP_PHONE_NUMBER your-phoneMessage Templates
- Booking confirmation with date/time
- Reminder (24h before event)
- Cancellation confirmation
Zoho CRM Integration
Purpose
- Create contact on booking
- Create deal linked to contact
- Create invoice on payment
Configuration
npx convex env set ZOHO_CLIENT_ID your-client-id
npx convex env set ZOHO_CLIENT_SECRET your-secret
npx convex env set ZOHO_REFRESH_TOKEN your-refresh-token
npx convex env set ZOHO_ORGANIZATION_ID your-org-idSync Log
All Zoho operations logged in zohoSyncLogs table:
- CONTACT_UPSERT
- DEAL_CREATE
- INVOICE_CREATE
- INVOICE_MARK_PAID
Staff Notifications
In-App
Displayed in dashboard notification bell:
- ORDER_READY: Kitchen order complete
- NEW_RESERVATION: New booking
- EXPERIENCE_REMINDER: Tomorrow's event
- ALERT: Attention needed
Notification Card
- Type icon
- Title
- Message
- Timestamp
- Read/unread state
Admin Dashboard Notifications
Bell Icon
- Shows unread count
- Dropdown list of recent
- Click → mark as read
Types Displayed
- New reservations
- Order ready alerts
- System alerts
- Challenge submissions