WhatsApp Business integration
In short
Send template and text messages to customers. Connect it on the Integrations page; your app then calls WhatsApp Business through Sapilon without ever holding a Meta credential.
Lets your app send WhatsApp template and text messages through a WhatsApp Business Cloud API phone number, and receive replies.
Connecting
On the Integrations page choose Connect on WhatsApp Business and fill in:
- Permanent access token — Business Settings → System users → Generate token (permission whatsapp_business_messaging).
- Phone number ID — WhatsApp Manager → API setup → Phone number ID.
- App secret (for incoming messages) (optional) — App dashboard → App settings → Basic → App secret.
Sapilon checks the key with the provider before it saves it, and stores it encrypted; it is never shown again.
- WhatsApp only lets you start a conversation with an approved template message.
What your app can do
Only these requests are available; anything else is refused.
POST /*/messages
Events
Your app can react to: messages. After connecting, open the connection and choose Show events URL, then add that address as a webhook in the provider’s dashboard. The URL is a secret — treat it like a password.
How the agent uses it
Use integrations.request('whatsapp-business', …); paths are relative to https://graph.facebook.com/v21.0.
POST /{phoneNumberId}/messages— send a message. Template:{ method: 'POST', path: '/1098765432101234/messages', body: { messaging_product: 'whatsapp', to: '4915112345678', type: 'template', template: { name: 'order_update', language: { code: 'en' } } } }. Free text (only inside a 24 h customer window):body: { messaging_product: 'whatsapp', to, type: 'text', text: { body: 'Hello' } }.
The phone number id is shown on the connection. Incoming messages: integrations.on('whatsapp-business', 'messages', handler).
More from Meta: https://developers.facebook.com/docs/whatsapp/cloud-api