Complete Guide to WhatsApp Business API Integration
WhatsApp Business API enables enterprises to communicate with customers at scale. With Zavu, you can integrate WhatsApp alongside other channels through a single unified API.
Why WhatsApp Business API?
WhatsApp has over 2 billion active users worldwide, making it one of the most effective channels for customer communication:
- 98% open rate compared to 20% for email
- Rich media support including images, documents, and interactive buttons
- End-to-end encryption for secure communications
- Global reach with presence in 180+ countries
Setting Up WhatsApp with Zavu
Step 1: Business Verification
First, verify your business with Meta:
typescript// Check verification status"token keyword">const status = "token keyword">await zavu.whatsapp.getVerificationStatus()console.log('Business Name:', status.businessName)console.log('Verification Status:', status.verified)console.log('Quality Rating:', status.qualityRating)
Step 2: Configure Message Templates
WhatsApp requires pre-approved templates for outbound messages:
typescript// Create a "token keyword">new template"token keyword">const template = "token keyword">await zavu.whatsapp.templates.create({ name: 'order_confirmation', language: 'en', category: 'TRANSACTIONAL', components: [ { "token keyword">type: 'HEADER', format: 'TEXT', text: 'Order Confirmed! 🎉' }, { "token keyword">type: 'BODY', text: 'Hi {{1}}, your order #{{2}} has been confirmed. Expected delivery: {{3}}.' }, { "token keyword">type: 'FOOTER', text: 'Reply HELP for assistance' }, { "token keyword">type: 'BUTTONS', buttons: [ { "token keyword">type: 'URL', text: 'Track Order', url: 'https://track.example.com/{{1}}' }, { "token keyword">type: 'QUICK_REPLY', text: 'Contact Support' } ] } ]})
Step 3: Send Template Messages
Once approved, send template messages to customers:
typescript"token keyword">const message = "token keyword">await zavu.whatsapp.sendTemplate({ to: '+1234567890', template: 'order_confirmation', parameters: { body: ['John', 'ORD-12345', 'January 20, 2025'] }})
Interactive Messages
WhatsApp supports rich interactive messages:
typescript// Send a list message"token keyword">await zavu.whatsapp.sendInteractive({ to: '+1234567890', "token keyword">type: 'list', header: { "token keyword">type: 'text', text: 'Choose an option' }, body: { text: 'How can we help you today?' }, action: { button: 'View Options', sections: [ { title: 'Support', rows: [ { id: 'track_order', title: 'Track my order' }, { id: 'return_item', title: 'Return an item' }, { id: 'speak_agent', title: 'Speak to an agent' } ] } ] }})
Best Practices
Rate Limits and Pricing
| Tier | Messages/Day | Price/Message |
|---|
| Standard | 1,000 | $0.005 |
|---|---|---|
| Business | 10,000 | $0.004 |
| Enterprise | Unlimited | Custom |