Bidirectional WhatsApp messaging at ecosystem scale
An event-driven Laravel integration with WhatsApp Cloud API supporting 12+ media types, message templates, queue-based processing, and a Strategy Pattern for handling varied message shapes.
The brief
The Direct ecosystem needed a single WhatsApp pipeline that all of its products could plug into — outbound transactional messages, inbound customer replies, media handling, template approvals, the works. Building it once, well, beat reinventing it per product.
What we built
- Event-driven architecture — every product publishes domain events, the WhatsApp module subscribes and dispatches, and inbound replies become events the products can consume.
- Strategy Pattern for media types — text, audio, video, images, documents, contacts, locations, interactive buttons, list messages, reactions, stickers, voice notes — each with a typed handler.
- Repository pattern wrapping the Cloud API so business code never imports the SDK directly. Swapping providers (BSP migrations, Twilio fallback) becomes a one-config change.
- Queue-based processing with retry budgets, dead-letter queues, and a manual replay tool. Inbound webhooks are processed asynchronously so the WhatsApp ack-window is never a bottleneck.
- Template management — submission, approval status sync, locale-aware variant selection.
Outcome
Every product in the Direct ecosystem now talks to customers over WhatsApp through one pipeline. Throughput, observability, and template governance all live in one place; product teams ship features without re-learning the API.
Have a project like this?
Tell us about it. We respond within one working day with a written estimate or a calendar link.