Integrations · notifications · channel fallback
Multi-channel notifications with automatic fallback
Client:
NDA
Category: Integrations
Stack: PHP (custom backend), Firebase (push), Telegram Bot API, WhatsApp/SMS providers, PHPMailer
Timeline: 3–5 weeks
Problem
A booking platform needed to notify users and venues about order statuses, cancellations and events across several channels — with no message-queue broker and no manual sending.
Constraints
The stack had no ready message queue (Redis/RabbitMQ) — only a database and polling; some channels (WhatsApp) do not guarantee delivery and need a fallback channel.
What I did
- A unified notification domain layer: ~30 scenarios (orders, booking status, event cancellation, etc.) with channel selection
- A WhatsApp-to-SMS fallback chain: a failed WhatsApp send is automatically retried over SMS
- Push notifications via Firebase with auto-cleanup of invalid device tokens
- A Telegram bot as a separate interactive channel on top of the same event domain model
- Rate-limiting and dedup on sending, plus admin alerts on channel failures
Architecture
Domain event
→ Notification queue (DB)
→ Polling daemons
→ WhatsApp → SMS fallback
→ Push / Telegram / Email
Result
Notifications for 15+ business scenarios now go through a single point with automatic channel fallback and minimal manual upkeep.
What can be reused
Domain event → queue → polling daemon with channel fallback
Auto-cleanup of invalid push tokens
Rate-limiting for sensitive notifications (verification codes)