Notifications (SMS / WhatsApp / Email / Push)
A central, event-driven Notifications service: one place that turns domain events into messages across channels, with templates, localization, and tenant-configurable providers.
Channels & providers
| Channel | Typical India providers (pluggable) |
|---|---|
| SMS | MSG91, Gupshup, Kaleyra, Twilio |
| WhatsApp Business API via Gupshup/Meta/Twilio | |
| Email (transactional) | Amazon SES, SMTP |
| Email (bulk newsletter) | Listmonk (Newsletter) |
| Push | FCM / APNs (RN apps) |
Providers are abstracted behind a channel interface so a tenant swaps provider via config.
Architecture
- Subscribes to events (
order.placed,installation.completed,amc.due_soon,ticket.created,claim.approved, …). - Resolves a template by event + channel + locale (i18n).
- Applies preferences/opt-outs and quiet hours.
- Records delivery status; retries via BullMQ.
Event → notification matrix (sample)
| Event | Channels | To |
|---|---|---|
order.placed | SMS, Email, Push | customer |
order.delivered | SMS, WhatsApp | customer |
installation.completed | WhatsApp, Email | customer (+7d testimonial request) |
ticket.created | SMS, Push | customer; assigned technician |
technician en route | SMS, Push | customer (ETA) |
amc.due_soon | WhatsApp, SMS, Email | customer |
claim.approved | SMS, Email | customer |
dealer.target.updated | Push, Email | dealer |
Templates
- Stored per tenant, localized, brandable (logo/colors/contact from Tenant Config).
- WhatsApp templates pre-approved per Meta rules.
Tenant config
Provider keys (secret), enabled channels, sender IDs/numbers, template set, quiet hours, opt-out policy.
Relationship to Automation
For no-code fan-out (e.g. push an event to Slack/Sheets), use Zapier/Pabbly automation rather than hard-coding a provider here.
Open questions
- Primary SMS/WhatsApp provider for first tenant.
- Consolidated preference center in v1 vs v2.