WhatsApp Business — Channel Overview
Researched: May 2026
Why This Channel
WhatsApp is the dominant messaging platform in India (500M+ users), Southeast Asia, Latin America, the Middle East, and Africa — all primary markets for Leadmetrics clients. For local service businesses, clinics, restaurants, and retail shops, WhatsApp is how customers actually communicate — not email. A client getting 50 WhatsApp inquiries a day but only 3 email newsletter opens is a client who should be running WhatsApp campaigns, not email campaigns.
WhatsApp Business API enables:
- Broadcast campaigns — send templated messages to opt-in customer lists (the WhatsApp equivalent of email newsletters)
- Automated flows — respond to inbound messages with structured flows (appointment reminders, order confirmations)
- Two-way messaging — customer replies land in a unified inbox
For Leadmetrics, this is a publishing channel and a campaign channel. The Social Post Writer can generate WhatsApp message templates; the Activity Planner can schedule WhatsApp campaigns alongside social posts and blog content.
Auth Mechanism
API Key (Meta’s WhatsApp Business API, accessed through a registered Meta App).
- Provider: Meta Cloud API (free, no BSP required for up to 1,000 marketing messages/month on free tier)
- Registration: client registers a WhatsApp Business Account (WABA) + phone number in Meta Business Manager; Leadmetrics’ Meta App is granted WABA access
- Auth:
WABA_ID,PHONE_NUMBER_ID, and a permanentACCESS_TOKENfrom Meta - No OAuth popup — the client adds their phone number ID and access token directly (similar to API key auth)
Alternative: use a BSP (Business Solution Provider) like Twilio or 360dialog — simpler onboarding, no Meta App setup, but adds per-message cost. Recommended for v1 if Meta App registration is too complex for clients.
What It Enables
| Capability | Detail |
|---|---|
| Template campaigns | Send approved Message Templates to opted-in contacts; the only way to initiate conversations |
| Broadcast lists | Target contact segments (all customers, new leads, specific tags) |
| Campaign analytics | Delivery rate, read rate, reply rate, opt-outs per campaign |
| Appointment reminders | Scheduled templates for clinic, salon, or service booking reminders |
| Order confirmations | E-commerce: trigger order/delivery status messages via Shopify + WhatsApp integration |
| Insight worker | Campaign open rates; best message times; opt-out rate trend |
Message Template System
WhatsApp requires all outbound messages (outside a 24-hour customer-initiated window) to use pre-approved templates. Leadmetrics must:
- Generate template content via the
social-post-writer.worker.ts(new WhatsApp branch) - Submit the template to Meta for approval via
POST /v17.0/WABA_ID/message_templates - Wait for approval (usually 1–24 hours; Meta review is automated)
- Once approved (
status: APPROVED), schedule the campaign send
This adds an approval step unique to WhatsApp — it should surface in the DM Portal as a “Pending Template Approval” status before the campaign can be scheduled.
Workers Needed
| Worker | Queue | Trigger |
|---|---|---|
whatsapp-publisher.worker.ts (new) | agent__whatsapp-publisher | Campaign scheduled date/time |
whatsapp-template-submitter.worker.ts (new) | agent__whatsapp-template-submitter | After social-post-writer generates WhatsApp content |
whatsapp-insights.worker.ts (new) | agent__whatsapp-insights | Weekly |
Insight Worker Output (ChannelInsight)
- Total messages sent, delivered, read (last 30 days)
- Read rate and reply rate trend
- Opt-out rate (critical to monitor — high opt-out can get the number banned)
- Best day/time to send based on historical read rates
- Top performing message templates by read rate
- Suggested: next campaign topic based on highest-engagement templates
Channel Detail Page — WhatsAppChannelDetail.tsx
Tabs:
- Overview — phone number, WABA status, messages sent/read this month
- Campaigns — list of past campaigns with delivery/read/reply metrics
- Templates — list of approved templates; status of pending templates
- Insights — AI-generated performance summary
- Suggestions — action items from insight worker
Implementation Plan
Phase 1 — Connect + Template Submit + Manual Campaign
-
Create
packages/providers/whatsapp/src/index.ts:sendMessage(phoneNumberId, accessToken, to, templateName, languageCode, components)—POST /v17.0/{phone_number_id}/messagessubmitTemplate(wabaId, accessToken, template)—POST /v17.0/{wabaId}/message_templatesgetTemplates(wabaId, accessToken)—GET /v17.0/{wabaId}/message_templatesgetMessageAnalytics(wabaId, accessToken, dateRange)— analytics APIverify(phoneNumberId, accessToken)—GET /v17.0/{phone_number_id}
-
Connection flow (API Key auth, no OAuth popup):
- Add channel form collects:
Phone Number ID,WABA ID,Access Token POST /tenant/v1/channels→ store asbasicInfo: { phone_number_id, waba_id }+tokenInfo: { accessToken }
- Add channel form collects:
-
Add seed entry with
authenticationType: "ApiKey"(repurposed to collect the three fields) -
Create
whatsapp-template-submitter.worker.ts:- Triggered after
social-post-writergenerates WhatsApp content - Submits template to Meta; stores
templateName+status: pending_approvalon theSocialPost - Scheduler polls template status every 30 min until
APPROVEDorREJECTED
- Triggered after
-
Create
whatsapp-publisher.worker.ts:- Fires when campaign is scheduled + template is
APPROVED - Sends to contact list via batch
sendMessagecalls (rate limit: 1,000/day free tier)
- Fires when campaign is scheduled + template is
-
Create
WhatsAppChannelDetail.tsx
Phase 2 — Contact List Management
- Add
WhatsAppContactmodel:{ tenantId, phone, optedIn, tags, lastMessageAt } - Import contacts from Zoho CRM or HubSpot opt-in lists
- Segment contacts for targeted campaign sends
Phase 3 — Inbound Messaging
- WhatsApp webhook:
POST /tenant/v1/whatsapp/webhook— receive inbound messages - Unified inbox in DM Portal for replying to customer messages within the 24-hour window
Important Constraints
- Opt-in requirement: Contacts must have explicitly opted in to receive WhatsApp messages. Leadmetrics must surface this clearly in the campaign creation flow — sending to non-opted-in contacts violates Meta’s policy and risks WABA suspension.
- Quality rating: Meta assigns quality ratings (High/Medium/Low) based on opt-out and block rates. Low rating limits sending volume. The insight worker should alert when quality rating drops.
- Template approval time: 1–24 hours typically; automated review can be near-instant for standard templates.
Seed Entry
// packages/db/prisma/seed.ts — CHANNEL_CATALOGUE
{
type: "WhatsApp",
name: "WhatsApp Business",
iconKey: "whatsapp",
description: "Send templated campaigns and broadcast messages to opted-in customers via WhatsApp.",
authenticationType: "ApiKey", // repurposed: collects Phone Number ID + WABA ID + Access Token
requiresUrl: false,
isActive: true,
categories: ["communication", "social_media"],
},