WhatsApp Coexistence & Two-Way Sync

WhatsApp Coexistence & Two-Way Sync A sequence diagram generated by Archify. client sends message POST webhook event INSERT into messages realtime broadcast smb_message_echoes hook INSERT outbound echo realtime update inbox POST reply message POST /messages Graph API deliver to client 200 OK + message_id Inbound Customer Message Staff Phone Reply Echo CRM Outbound Dispatch Customer · WhatsApp phone · Sequence participant Customer WhatsApp phone Meta Cloud API · Graph API & hooks · Sequence participant Meta Cloud API Graph API & hooks Webhook Fn · whatsapp-webhook · Sequence participant Webhook Fn whatsapp-webhook PostgreSQL · whatsapp_* tables · Sequence participant PostgreSQL whatsapp_* tables Flutter CRM · Comms inbox · Sequence participant Flutter CRM Comms inbox Sender Fn · send-whatsapp · Sequence participant Sender Fn send-whatsapp Legend request return security async trace default message

Two-Way Coexistence

  • • Brokers reply from either WhatsApp phone app or web CRM
  • • Meta smb_message_echoes keeps both surfaces in sync

Audited State Delivery

  • • Messages persist in PostgreSQL before UI presentation
  • • Realtime WebSocket channels update Flutter CRM instantly
Suite ↗