WhatsApp Actions

Methods

Messaging: Send a Message, Send a Media Message, Send a Template Message, Send a Location

Overview

One of the great things about Flow XO is that you can build bots that will work the same across multiple channels, such as Telegram, Facebook Messenger, or WhatsApp. To enable this "build once deploy anywhere" functionality, we must limit the capabilities of our core messaging tools to features that are shared by all of the channels we support. This is great if you're building for multiple channels, but it can be limiting if you want to take full advantage of a particular platform, such as WhatsApp.

User Friendly Access to the WhatsApp Business API

Flow XO has always allowed users to take advantage of most of each channels special features using our Custom Request action. This allows you to call a particular channel's API using raw JSON code. It works, but it requires some technical skill and makes it very easy to make mistakes. So while we still provide the option of sending a Custom Request for highly technical WhatsApp power users, we now offer a much more user friendly way to access WhatsApp features, the WhatsApp Actions integration. You can find this powerful tool under More Services, along with our third party integrations and chat utilities.

Filtering By Platform

Since the methods in this integration will ONLY work on WhatsApp, you can only use them in a flow that you only intend to deploy to WhatsApp OR you use a filter to only execute a WhatsApp task when the current channel is WhatsApp. Each trigger provides a 'Bot Platform' field that can be used for this purpose:

Available Actions

Send a Message

Send a message sends a simple text message to your user:

The "Preview URL" parameter lets you request that WhatsApp include a URL preview in the message. Whether or not WhatsApp will comply with the request depends on whether or not your user has added you into their contacts.


Send a Media Message

Send a media message to your users. You can choose to send an image, a video, an audio clip, a document or a sticker (webp). You can reference your media file either by URL, or by using a WhatsApp file identifier (which is available in metadata when Flow XO receives a file from WhatsApp, giving you an easy way to upload and reuse media).

Media Type: This is the type of media to send, such as video, image, document, etc.

Media Identifier: This should be the URL or the WhatsApp file ID of the media

Caption: An optional caption for your media


Send a Template Message

For more details on how to use WhatsApp template messages, see this article

General usage of the WhatsApp business API has a few signification restrictions. You may not contact a user after 24 hours has passed since their last interaction with your bot. There is also no way to send interactive elements, such as quick replies or call to action buttons. This is where Template Messages come in. Template Messages are pre-written, non-promotional messages that must be approved in advance by WhatsApp. They belong to a specific non-promotional category, like Issue Resolution or Purchase Update, and can be customized at the moment they are sent, similarly to how you write normal Flow XO messages. For example, your WhatsApp template message may have a 'header' element defined like this: 

{first_name}, your order was received!

When you send the message, you must supply the "first_name" variable.

Template Messages are far more flexible than normal "session messages" because 

1. They can be sent any time, not just within the 24 hour activity window

2. They can contain up to 3 quick reply buttons or 2 call to action buttons.

A "Quick Reply" button is simply a shortcut to allow your users to send a pre-defined message back to your bot. A "Call to Action" is a link to a URL or to initiate a phone call to a specific number on your device.

Sending template messages in WhatsApp costs money, however. Exact pricing depends on the country you are sending to.

Since template messages must be designed and approved before they can be use, and have several elements that need to be configured, we have a separate article discussing how to use them.


Send a Location

Send your users a location in the form of latitude/longitude coordinates and an optional address. The location will be plotted on a map.

Note: the address is only processed if you specify a name for your location.

That's it! If you have any questions/comments or other feedback, let us know at support@flowxo.com


Still need help? Contact Us Contact Us