WhatsApp

Introduction

The purpose of this manual is to detail how to configure and integrate Qflow with Twilio to allow interaction between both platforms, thus allowing you to send messages through WhatsApp.

WhatsApp has the following actions:

See Actions for the description and content of each one.

Prerequisites

It is necessary to have a Twilio account and a WhatsApp number configured on the platform. This can be done from your Twilio console. Specifically to configure your number you can follow the steps detailed in the Twilio documentation.

Application parameter

To establish the connection it is necessary to have at least one application parameter (see Application Parameters) that allows communication to be established between Qflow and WhatsApp. This parameter can be created from the service task configuration in Qflow. (see Configuring Connectors from a Service Task)

To create a WhatsApp application parameter, the following steps are required as detailed below.

Application parameter using account sid, authentication token and phone number

This type of application parameter requires the following parameters:

  • Account Id

  • Authentication token

  • Phone number

To obtain them, you must configure a WhatsApp sender and then follow the following steps:

  1. Access your Twilio console. Here we will obtain our account identifier and our authentication token.

    _images/AccountInfo.png

    Fig. 859 Account Info in our Twilio console

  2. Select our enabled number associated with WhatsApp in the Twilio console.

    _images/ActiveNumber.png

    Fig. 860 Phone number selection view in Twilio

Once the previous steps have been completed, it will be possible to send messages through WhatsApp and check their status from Qflow.

Actions

The following actions can be performed with WhatsApp:

Send message with template

This action allows you to generate a new message to be sent on the Twilio platform. The body of the message that will be sent and its recipients must be provided. The body of the message supports WhatsApp text format and also supports the use of emoticons using unicode format.

Table 59 Inputs

Input

Description

Recipients

Required. Telephone numbers for which you wish to send the message.

Template identifier

Required. Twilio’s template identifier.

Template variables

Dictionary that maps variables associated with the selected template. These values can be text, text area, number or boolean. Example Telephone = Telephone number.

Table 60 Outputs

Output

Description

Result

Result of the executed operation.

Successfully sent messages identifiers

List of identifiers corresponding to successfully sent messages.

Destinatarios de los mensajes enviados con éxito

Recipients for whom Twilio successfully sent the message.

Error message recipients

Recipient numbers of the message sent with error.

The possible results returned by this action are:

  • Sent

  • PartiallySent

  • Error

Get message status

This action allows you to obtain the status of messages sent through Twilio. A list of identifiers for the messages for which you want to check the status must be provided.

Table 61 Inputs

Input

Description

Identifiers

Required. Identifiers of the sent messages for which the status is to be retrieved.

Table 62 Outputs

Output

Description

Status

Required. List of statuses corresponding to the queried messages. If multiple identifiers are provided, the statuses will appear in the same order.

Result

Result of the executed operation.

The possible results returned by this action are:

  • Ok

  • PartiallyOk

  • Error