WhatsApp Integration
Dynaris connects to WhatsApp via the Meta Business API (Cloud API). This enables your AI chat agent to engage prospects and customers on WhatsApp.
Overview
- Meta Business API -- Required for business messaging; On-Premises API has been sunset (October 2025)
- Template messages -- First contact with a user must use an approved template
- 24-hour window -- After a user replies, you can send free-form messages for 24 hours
- Dynaris -- Connects via Composio; uses
phone_number_id, bearer token, and app secret
Prerequisites
- Meta Business Suite account
- Meta for Developers app
- WhatsApp Business Account (WABA)
- Verified business (recommended for production)
- Phone number for WhatsApp Business (not used on WhatsApp consumer app)
Meta Business Developer Setup
Step 1: Create Meta Business Manager
- Go to business.facebook.com
- Create or access your Business Manager
- Complete business verification (required for production)
Step 2: Create WhatsApp Business Account
- In Meta Business Suite, go to WhatsApp > WhatsApp Accounts
- Create a new WhatsApp Business Account or add an existing one
- Register a phone number (new or migrated from another provider)
Step 3: Create a Meta App
- Go to developers.facebook.com
- Create an app (Business type)
- Add WhatsApp product to the app
- Configure WhatsApp Business API settings
Step 4: Get API Credentials
You will need:
- Phone Number ID -- From WhatsApp > API Setup
- WhatsApp Business Account ID -- From Meta Business Suite
- Access Token -- User or system token with
whatsapp_business_messagingandwhatsapp_business_managementpermissions - App Secret -- From App Settings
WhatsApp Template Messages
Meta requires approved templates for the first message to a user. Templates fall into three categories:
| Category | Use Case | Approval |
|---|---|---|
| Marketing | Promotions, offers, campaigns | Must follow Meta guidelines |
| Utility | Order confirmations, shipping, account updates | Transactional, informational |
| Authentication | One-time passwords, verification codes | OTP only |
Creating Templates
- In Meta Business Suite, go to WhatsApp > Message Templates
- Create a new template
- Choose category (Marketing, Utility, Authentication)
- Write the template text; use variables with
{{1}},{{2}}for dynamic content - Submit for review
Template Guidelines (Summary)
- No deceptive or misleading content
- No prohibited products (alcohol, tobacco, gambling, weapons)
- Clear opt-out for marketing
- Variables must map to real data for Utility templates
- Approval typically takes 5 minutes to 24 hours
After Approval
- Use the template name in your Dynaris/Composio WhatsApp configuration
- Dynaris sends the first message using the template; subsequent messages within 24 hours can be free-form
Connecting WhatsApp to Dynaris
- Complete Meta Business Developer setup (above)
- In Dynaris, open Connectors or go to the Chat Agent / WhatsApp section
- Connect via Composio WhatsApp integration
- Enter:
- Phone Number ID
- Bearer token (access token)
- App secret
- Save and verify connection
Flow: First Contact vs Within 24 Hours
| Scenario | Allowed |
|---|---|
| You initiate first contact | Must use approved template |
| User replies to your template | Free-form messages for 24 hours |
| 24 hours pass without user reply | Next message must use template again |
| User initiates contact | Free-form messages immediately |
Use Cases
- Lead engagement -- Send template to start conversation; agent continues in free-form
- Follow-up sequences -- Template to re-engage; agent qualifies and books meeting
- Customer support -- User messages in; agent responds with Knowledge Base
- Appointment reminders -- Utility template for reminders; agent handles rescheduling in chat
Troubleshooting
| Issue | Check |
|---|---|
| Template rejected | Review Meta template guidelines; fix and resubmit |
| Cannot send free-form | Ensure user replied within last 24 hours; otherwise use template |
| Connection fails | Verify Phone Number ID, token, app secret; check token permissions |
| Messages not delivered | Meta may rate-limit; check Meta Business Suite for delivery status |