Find out how to set up a workflow that automatically handles a conversation between your brands and your magnews contacts.
It all starts with a conversation
There are two ways to start a conversation with your contacts via WhatsApp Business:
- Business-initiated: when you send a message using a pre-approved template, WhatsApp opens a conversation classified as Marketing or Utility, based on the content (for more information see the article How to send messages with the WhatsApp Business channel).
- User-initiated: the contact writes to the WhatsApp Business number to ask for information, opening a so-called 24-hour customer service window. During this time you can send the contact a free-form text message: WhatsApp opens a Service conversation. To use this mode, keep reading this article, in particular the section on the “WhatsApp - Send message” workflow node.
For more details on how WhatsApp conversations are opened and closed, read the related Meta documentation.
Meet the new WhatsApp custom nodes
To manage conversations, it is very important to catch and correctly handle the messages a contact sends to your WhatsApp Business number.
For this purpose, we have made five new workflow nodes available to manage a conversation with your contacts:
- WhatsApp - Incoming Message (entry)
- WhatsApp - Wait for Message (wait)
- WhatsApp - Check Message (decision)
- Q WhatsApp Catch (decision)
- WhatsApp - Send message (action)
WhatsApp - Incoming Message
This node makes the contact enter the workflow when a message is received from them.
Before you start, however, you need to define criteria to search for contacts on the platform. To start a workflow session, magnews must contain a contact that matches the person who wrote, by WhatsApp recipient or by Mobile number.
In App Center > WhatsApp Business > Settings, from the sender settings, select the database or databases where contacts are searched, sorting them by priority. If you have more than one contact with the same recipient, this helps you find the most relevant one to associate with the conversation.
If you do not need a specific search order, select Also search in other databases. The same applies if, after setting the priority among some databases, you are fine with searching for the contact in any other database.
From the same screen, you can also set a New contacts database, that is, a database where people who write to you and are not yet in magnews are added: this way you can start a welcome workflow for these new contacts too. The database must have the Username field as its key and the Allow contacts without recipient setting enabled, so that contacts who use a WhatsApp username and have no phone number are saved too.
In the entry node configuration, you can choose to start the session only if the message has specific content, for example if it starts with "Hello", contains "info" and does not contain "policy".
You can also add entry filters on contacts:
Keep in mind that the filters set in the workflow entry limits always take precedence over those set in the node.
WhatsApp - Wait for Message
The node waits for a message from the contact in a conversation that has already started, up to a maximum time set by the user.
WhatsApp - Check Message
This node lets you set up multiple outcomes based on the content of the message.
Each outcome is linked to one or more conditions on the message content, as for the filter on the entry node. For example, you can define an outcome called "Information" if the text contains the word “info” or “help”. Or you can set up an advanced validation that sends the contact through a specific outcome if the message contains a tax code.
In this case, the value extracted from the message sent by the contact (for example, the tax code) is saved in a dedicated session variable called _whatsappbusiness__messageresponse.
The _whatsappbusiness__messagetext session variable, which contains the full text of the received message, is still available.
The contact leaves through the first outcome whose conditions are met. If the message does not meet any of the defined outcomes, the contact leaves through the system outcome called “Other”.
Q WhatsApp Catch
Q WhatsApp Catch is a decision node that automatically analyzes the content of text messages sent by contacts on WhatsApp.
Thanks to magnews Q technology, the system can recognize patterns, detect emotions and identify topics or keywords in the message.
Q WhatsApp Catch interprets in real time what the contact writes and routes them along the most appropriate path, based on the meaning of the received text.
To use this feature, make sure you have accepted the magnews Q terms.
Configure the outcomes by defining, for each path:
- a clear label (for example Negative, Positive, Neutral)
- the categories, keywords or examples associated with that outcome
- an optional description, useful if the categories are not immediately clear
Make sure the text of each outcome is unique and easy to tell apart, and avoid outcomes with very similar content.
The node always includes an automatic outcome called “Other”. The session is routed here in the following cases:
- the reply cannot be classified, for example if the contact sends a message unrelated to the question
- an error occurs during processing
- your account has run out of Q credits
- the contact did not answer the question, because the question was not required or was not visible due to the display conditions set
Q credit usage
Each session that goes through this node uses one Q credit. Usage increases with:
- the number of outcomes defined in the node
- the length of the texts to classify
- the length of the descriptions associated with the outcomes
WhatsApp - Send message
Sends a free-form text message to the current contact, using as recipient the WhatsApp recipient contact field or, if it is empty, the Mobile field.
Besides text, in this node you can add quick reply buttons, a list of options or a link button, so the contact can reply with a single tap. Find out how in the guide Sending messages with buttons and lists from workflows.
On WhatsApp you can send a free-form message only within the customer service window, that is, if the contact has written to you in the last 24 hours.
To send template-based messages, use the Send message node and select the WhatsApp Business channel. See the page How to send messages with the WhatsApp Business channel.