Aysali logo

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

SectionPurpose
Cloud APISecret key, Configuration URL, Synchronize now, Reconnect
Cloud API numbersPhone number ID, Business Account ID, permanent token, department, tags
Cloud API template fallbackTemplate when free-form reply fails (24h window expired)
Text message fallbackOptional SMS fallback if templates fail
CallsCall permission template, disable inbound/all calls
Order webhookURL for WhatsApp shop orders
Catalogue detailsDefault catalog header/body for product messages
Disable chatbotAgents only on WhatsApp
Clear flowsRegenerate built-in WhatsApp Flows

Manual setup (Aysali Bot)

  1. •

    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.

  2. •

    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
  3. •

    Test in Meta

    Use API testing: add a test number, send a message, confirm it appears in Aysali Bot admin.

  4. •

    Permanent token

    In Meta Business Settings → Users → System users → create/select admin user → Generate token for your app with:

    • whatsapp_business_management
    • whatsapp_business_messaging
    • business_management

    Set expiration to Never. Paste into Cloud API numbers → Token.

  5. •

    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.

  6. •

    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.

FieldUsage
Template nameApproved template name
Template languagesComma-separated codes (en, en_US, ar) — user language matched automatically
Header / Body / Button variablesComma-separated; merge fields: \{conversation_url_parameter\}, \{recipient_name\}, \{recipient_email\}
Button variablesStatic buttons: skip_parameter; quick replies: quick_reply_TEXT
Test templateSends 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

  1. Set Business Account ID on each number row.
  2. 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):

FlowWhen
RegistrationFirst message when Require registration is on
Follow-upFollow-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.