How to configure the conversation flow for the WhatsApp and Athento integration

Tabla de contenidos

Athento allows receiving messages via WhatsApp, processing them automatically, and sending a response.

 

In general, the integration with WhatsApp works as follows:

  1. The external user sends a text message via WhatsApp to the number configured for the integration.
  2. Athento starts a session for that user and responds with a message requesting additional information (a text, selecting an option, or sending a file).
  3. Athento receives the information provided by the user, processes it, executes an action with the received data, and sends a new response requesting more information, if necessary.
  4. The previous step is repeated until Athento stops requesting information from the user.

To configure a WhatsApp conversation flow, there are 4 options available in advanced administration:

 

mceclip0.png

WhatsApp state

It allows defining a conversation state. The state is determined by the message that is sent to the user and by the type of response that is expected to be received.

From the states you can adjust the texts with which Athento responds to the user automatically.

 

mceclip1.png

In each state you can define:

  • Name: name of the state. There must obligatorily be a state called “Initial”, which contains the first response message that is sent to the user when initializing their session.
  • Message: message that is sent to the user.
  • User input type: type of response that is expected to be received from the user. There are several options:
    • Text: the user must respond with a text.
    • Option: the message defines different possible responses and the user must respond with one of those options (for example: “Reply with 1 to request help or with 2 to finish”).
    • File: the user must respond by sending a file.
    • Nothing: no response is expected from the user, or any type of response is valid.
  • User valid inputs: if User input type is Option, it allows defining which values are valid. Following the previous example, this field should include “1” and “2” to accept that the user responds with 1 or with 2.

WhatsApp Action

WhatsApp actions allow defining what to do with the information provided by the user. This facilitates implementing flows by storing information in Athento.

mceclip2.png

 

The configuration options for actions are:

  • Current state: state for which the user’s response is being awaited.
  • User Input: if the state requires an input of type Option, it allows defining the action to execute for a specific value (for example, one configuration for input “1” and another different one for input “2”).
  • Action: action to execute. It must be selected from a list that must be created by product or in some project. Consult your Athento agent for more information.

 

WhatsApp transition

Transitions allow defining the flow between states, taking into account the message received from the user and whether the executed action has finished successfully or with an error.

mceclip4.png

The configuration options for transitions are:

  • Current state: state for which a response from the user is expected.
  • User input: if the state requires an input of type Option, it allows defining the transition for a specific value (for example, a different transition for each available option).
  • Action outcome: defines whether the transition should be performed when the action finishes successfully or when it ends with an error.
  • Next state: new state to which the transition should occur.

WhatsApp Session

In this object, the different user sessions are recorded. It also allows manually updating its state when necessary.

mceclip5.png

 

IMPORTANT!

To use this first version of the integration, it is required:
- Obtain approval from Twilio and Whatsapp Business to proceed.
- Define and code the specific actions to be performed by the integration
(create files, check statuses, etc.)