WhatsApp Business API requires pre-approved message templates for business-initiated messages. Submit templates on Day 1 — approval takes 24-72 hours. Do not wait until everything else is set up.
- developers.facebook.com → Create App → Business
- Add WhatsApp product
- Go to WhatsApp → Getting Started
- Note your Phone Number ID and WhatsApp Business Account ID
Step 2 — Generate Permanent Access Token
- Meta Business Manager → System Users → Add System User
- Role: Admin
- Generate New Token → select your app
- Permissions:
whatsapp_business_messaging + whatsapp_business_management
- Copy the permanent token
Step 3 — Register Webhook
- WhatsApp → Configuration → Webhook
- Callback URL:
https://app.fincelo.app/api/webhooks/whatsapp
- Verify Token: choose any string → copy it
- Click Verify and Save
- Subscribe to: ✅ messages ✅ message_deliveries ✅ message_reads
Step 4 — Submit Message Templates
Fincelo uses 6 pre-built templates. Submit them for Meta approval:
| Template | Used For |
|---|
fincelo_usage_opportunity | Platinum/Good customers at usage threshold |
fincelo_usage_heads_up | Average customers approaching limit |
fincelo_usage_risk | Poor/Critical customers at risk |
fincelo_collections_personal | Overdue invoice (premium customers) |
fincelo_collections_urgent | Overdue invoice (at-risk customers) |
fincelo_escalation_notify | Escalation to manager/VP/CFO |
Submit via Fincelo: Settings → CSM Hub → WhatsApp → Submit Templates
- Fincelo → Settings → CSM Hub → Channel Config → WhatsApp
- Enter Phone Number ID + API Token
- Save ✅
Step 6 — Add CSM WhatsApp Numbers
- Settings → CSM Hub → CSM Roster → each CSM → WhatsApp Number
- Format:
+919876543210 (E.164 international format)
- Must be a number registered with WhatsApp
24-Hour Window Policy
Meta policy: you can only send free-form messages within 24 hours of the CSM messaging you. After 24 hours, Fincelo automatically uses approved templates. This is enforced by lib/whatsapp-session-manager.ts.