WHATSAPP · GUIDE
Multi-Client WhatsApp Portal: Tenant Isolation and Data Model
When AtServiceTech onboards multiple businesses, each client's Meta connection and WhatsApp data must be scoped to that client's organization. A shared SMS-style provider credential is not an appropriate WhatsApp tenant model.
Recommended portal sections
Create a separate WhatsApp area with a clear connection state and organization context. Each navigation item should operate only on the active AtServiceTech workspace and the Meta assets authorized for that workspace.
- Overview: connection status, business/account identifiers (non-secret), registered numbers, account health, and setup actions.
- Connect business: Embedded Signup launch, callback status, consent/authorization summary, and retry or reconnect controls.
- Phone numbers: display number, phone-number ID, verification/registration status, quality and messaging limit signals where available.
- Templates: template name, language, category, components, approval status, and rejection details.
- Inbox and message history: conversations, inbound/outbound messages, timestamps, delivery/read/failure state, and role-based access.
- Reports and usage: delivery outcomes, Meta usage estimates or billing data available to the customer, and AtServiceTech fees shown separately.
- Settings: team access, webhook/connection health, disconnect, data export, retention, and deletion request.
Design tenant-safe storage before coding
Every WhatsApp record should belong to an AtServiceTech organization and a connection record. Enforce organization scoping in server queries and background jobs, not only in the user interface.
- Connection: organization ID, connection state, Meta business/WhatsApp account IDs, messaging account ID, timestamps, granted capabilities, token reference, and last health check.
- Phone number: connection ID, Meta phone-number ID, normalized display number, registration state, and provider status.
- Template: connection/account ID, Meta template ID/name, locale, category, components, approval status, and last synchronization time.
- Message and webhook event: organization ID, connection/number IDs, provider message ID, direction, status, timestamps, and minimal payload fields required for support.
- Secrets: encrypted token reference with key version, expiry/rotation metadata where available, and revocation state. Never store tokens in frontend storage or plain-text application logs.
- Add database constraints and authorization tests that prove a member of organization A cannot query or mutate organization B's WhatsApp data.
Plan client roles and lifecycle
The client business owns its Meta assets and can manage them in Meta's own tools. AtServiceTech should be transparent about what access it receives, how it uses the assets, and what happens when the connection is revoked or the workspace is closed.
Steps
- Require an authorized workspace administrator to start onboarding and record who connected the account and when.
- Grant team members least-privilege roles for viewing conversations, replying, managing templates, and changing integrations.
- Provide a clear disconnect action that disables sends, revokes or deletes stored credentials as supported, and records the operation.
- Define data export, retention, erasure, backup expiry, and support access procedures before launch.
- Alert administrators when a token or account connection is revoked, permissions change, or a connected number becomes unavailable.