Channels
Connect Meta WhatsApp Cloud API to Aysali Bot for business messaging in the unified inbox.
Configure under Settings → WhatsApp. Help links in that section point here.
Settings overview
| Section | Purpose |
|---|---|
| Cloud API | Secret key, Configuration URL, Synchronize now, Reconnect |
| Cloud API numbers | Phone number ID, Business Account ID, permanent token, department, tags |
| Cloud API template fallback | Template when free-form reply fails (24h window expired) |
| Text message fallback | Optional SMS fallback if templates fail |
| Calls | Call permission template, disable inbound/all calls |
| Order webhook | URL for WhatsApp shop orders |
| Catalogue details | Default catalog header/body for product messages |
| Disable chatbot | Agents only on WhatsApp |
| Clear flows | Regenerate built-in WhatsApp Flows |
Manual setup (Aysali Bot)
- •
Create a Meta app
Sign in at developers.facebook.com. Create an app with use case Connect with customers through WhatsApp and link your WhatsApp Business Account.
- •
Secret key and webhook
In Settings → WhatsApp → Cloud API, set Secret key (random verify token) and save.
In Meta → Use cases → WhatsApp → Customize → Configuration → Webhooks:
- Callback URL: Get configuration URL from Aysali Bot
- Verify token: same as Secret key
- Webhook fields:
messages,history,smb_app_state_sync,smb_message_echoes
- •
Test in Meta
Use API testing: add a test number, send a message, confirm it appears in Aysali Bot admin.
- •
Permanent token
In Meta Business Settings → Users → System users → create/select admin user → Generate token for your app with:
whatsapp_business_managementwhatsapp_business_messagingbusiness_management
Set expiration to Never. Paste into Cloud API numbers → Token.
- •
Phone number ID
Copy Phone number ID from Meta WhatsApp → API Setup into Cloud API numbers. Add Business Account ID for outbound templates to new users.
- •
Go live
Add a payment method in Meta. Submit App Review for required permissions. Add production numbers at business.facebook.com/wa/manage/phone-numbers.
Troubleshooting inbound messages
- Click Reconnect and repeat OAuth if webhooks stop.
- Confirm payment method in Meta Business Suite.
- Webhook URL must be HTTPS (not localhost).
- Do not use an agent/admin phone number for testing.
- Avoid assigning WhatsApp to a department that blocks routing during tests.
24-hour messaging window
WhatsApp allows free-form replies only within 24 hours of the user’s last message.
Outside that window — or for users who never messaged you — you must use an approved message template (or configured fallback).
Re-engagement errors mean the session expired; use a template.
Message templates
Configure Settings → WhatsApp → Cloud API template fallback.
Manage templates in WhatsApp Manager → WhatsApp accounts → Settings → WhatsApp Manager.
| Field | Usage |
|---|---|
| Template name | Approved template name |
| Template languages | Comma-separated codes (en, en_US, ar) — user language matched automatically |
| Header / Body / Button variables | Comma-separated; merge fields: \{conversation_url_parameter\}, \{recipient_name\}, \{recipient_email\} |
| Button variables | Static buttons: skip_parameter; quick replies: quick_reply_TEXT |
| Test template | Sends test from first configured number |
Templates must notify the user (e.g. link to your site chat) — not paste the full agent message into WhatsApp.
Proactive outreach
- Set Business Account ID on each number row.
- Open Users in admin → select users → WhatsApp icon (top right).
Text message fallback
Settings → WhatsApp → Text message fallback sends SMS when WhatsApp delivery fails. Requires SMS to be enabled on your platform.
WhatsApp calls
Voice/video calls from chat and admin (when enabled in WhatsApp Manager).
Settings → WhatsApp → Calls
- Create a Calling permissions request template in WhatsApp Manager.
- Enter Call permission template name in bot settings.
- Disable: inbound only or all calls.
Initiate calls from a user profile (phone/video icons). Payment method required in Meta.
WhatsApp Flows
Built-in flows (regenerate via Clear flows):
| Flow | When |
|---|---|
| Registration | First message when Require registration is on |
| Follow-up | Follow-up message active and user has no email |
Custom flow in a message:
{wa_flow id="FLOW_ID" header="Title" body="Body text" button="Open"}
WhatsApp shop
Merge fields in messages:
Single product:
{catalog id="CATALOG_ID" product_id="PRODUCT_ID" body="" footer=""}
Product list — group with section_1, product_id_1_1, product_id_1_2, … and required header / body.
Set Order webhook to receive order JSON. Default catalog text: Catalogue details.
Rich messages and AI
- Rich messages map to WhatsApp interactive messages; max 3 buttons on some layouts — use
whatsapp="Menu label"attribute for list menus with more options. - Queue & routing supported — Queue & routing
- Chatbot, human takeover, language detection, spelling correction, multilingual translation, Google search — OpenAI & AI
- Follow-up / offline messages work; timetable text is not sent on WhatsApp.