WhatsApp allows you to send users a push message called a template message. A template message is message initiated by the business that is sent out to the user. Because this is a push message, WhatsApp imposes a number restrictions on template messages to avoid companies spamming users.
Meya uses Twilio to implement the WhatsApp business API integration. Once you've setup your WhatsApp number with Twilio and followed the Meya WhatsApp setup guide, you can then follow the Twilio WhatsApp template messages guide to be able to sent push messages to your users.
Once your WhatsApp templates are approved you can configure your Meya bot to respond to the Twilio webhooks when you've sent a notification to the user. This allows your bot to prompt the user if they require any further assistance e.g. speak to an agent.
To enable processing of the template message webhook, you will need to enable
extra_sms_status_events property in your integration settings, and specify the
sent status types.
Here is an example:
extra_sms_status_events: - sent
When correctly setup, your bot will receive the
meya.whatsapp.event.message.template.sent event. You can then setup an event trigger to run a specific flow.
Here is an example flow:
triggers: - event_type: meya.whatsapp.event.message.template.sent steps: - say: Is there anything else I can help you with? quick_replies: - text: Check my balance action: flow: flow.balance_check - text: Talk to an agent action: button_id: escalate_agent
Updated about 1 year ago