In this section we will see how to begin the designing of a WhatsApp bot, how to build the bot on the Conversation Studio tool of Haptik Platform and how to deploy the bot so users can start sending messages to your business.
Design the bot
Well, when it comes to creating a WhatsApp IVA, the first and foremost consideration is design. There are a lot of UX considerations to keep in mind while designing an automated experience for WhatsApp.
Some tips to start with -
WhatsApp is a user-focused platform, users have the power to block or report a business number.
Start small: Start with the burning customer issues which can be resolved in a transactional manner with a quick resolution on WhatsApp. These use cases will help maintain a high-quality rating from the users.
Design a conversational experience for the user. It’s WhatsApp, after all.
Enrich the customer experience by using media messages (photos, videos, etc.) to drive higher engagement
Ensure valid human escalation paths - Businesses without a valid human escalation path may become red in terms of quality rating and will see the phone number Status is Flagged. Valid escalation paths include human agent handoff in a thread, phone number, email, web support form or prompting the user for an in-store visit.
To start the Conversation Design process for WhatsApp bot, please read here.
Build the bot on Haptik Platform
Step 1: Create a New Bot
We will start by creating a new bot on the platform.
- Go to Conversation Studio
- Click on New Bot
- Provide a name, select the partner from dropdown and provide some additional details (these are optional)
- Click on Create Bot
Step 2: Create a Story and Sub Story
After creating a new bot, create a new Story within the bot. To know more about Story, click here.
Within the story, create a new sub story. Every Sub Story handles one use-case. To know more about Sub Story, click here.
Step 3: Create Nodes
Nodes are the interlinked building blocks of a bot. Each node acts like a gatekeeper which detects user inputs, sends out appropriate responses, and directs users to the next node.
Nodes are composed of several important sub-components, which house important pieces of information - User Says, Bot Says, Entities, and APIs.
To know more about Nodes, click here.
Step 4: Add User Says
User says are the inputs from the user that the agent needs to interpret the user’s goal. It is important to add and train the bot with a variety of different sample user says for each node, so that the bot can identify the correct intents and extract entities from the user utterance.
Whenever a user sends a message, we try to understand what the user is trying to say using various Machine Learning algorithms and find the corresponding node. One of the key modules which is used for node identification is Intent Detection module.
To know more about adding user says, click here.
Step 5: Add Bot Says
Bot Says is where a Node stores the replies that are sent in response to the user's message.
To know more about Bot Says, click here
Adding WhatsApp reply button and WhatsApp list
Because of the platform limitations, many HSL elements from the bot builder tool will not work on WhatsApp.
Here's the list of HSLs that are currently supported:
Buttons and Text + Quick Replies
- If you add 3 or less Button HSLs or Text + Quick Replies HSLs, they will automatically show up as WhatsApp reply buttons on WhatsApp.
- If you add more than 3 Button HSLs or Text + Quick Replies HSLs, they will automatically show up as items in a WhatsApp list on WhatsApp.
Any media type of file (image, video, or document) that you are sharing with the users, should be 10MB or less in size.
Step 6: Add Entities
An entity represents values which is collected from the user in a conversation. Depending on the context of the conversation, the required response can either be a single value or group of specific values.
On WhatsApp bot, majority flows are menu driven.
Therfore, on WhatsApp we make use of Words & Phrases entity. Words & Phrases is a dictionary entity, which is configured as follows -
As we want the user to select an option from the menu, we have created a dictionary entity, where the Words column represent the actual word which will get detected and in the Variants column we can add the different variations which users can type. If the user types 1, the bot capture the value as word, work, in this case.
For attachment type entity, WhatsApp can compress images and send compressed images to Haptik. Haptik stores the received image to S3.
You can fetch user's name and phone number from WhatsApp. There are system entity that can fetch these values from the user's profile. Use _completion_phone_number_ to fetch user's phone number and _username_ to fetch the user's profile name.
Add the entities on first node of the bot and mark them as non-mandatory. Read here to know more about entities.
Step 7: Create Connections
Connections represent the path a conversation takes from node to node. Depending on the response a user inputs to the bot, they traverse down a different connection to the appropriate next node. Bot builders must modify every connection they create to indicate which user inputs correspond to which nodes.
On WhatsApp we majorly use 2 types of connections -
- Connection using entity
We will use the entity detected from Step 6, to create further connections. To know more about using entity values on connection, click here.
- Self Connecting Nodes
When the bot breaks or if you are sending notifications to the user and want the user to start the conversation by clicking on the buttons present in the HSM, we make use of Self Connecting nodes.
When the suer taps on the HSM button, they will always be directed to the start of the flow.
Self connecting nodes also are helpful to restart the flow in case the bot breaks. You can ask the use to start the flow by typing Main Menu and it will again restart the flow from the start node.
How to create a self connecting node?
Create a Words & Phrases entity and add dictionary as shown below -
On the start node, go to the Connections tab and create a self connection as shown below -
Click on the new arrow, and create the connection on the basis of Entity.
Feedback module does not work on WhatsApp bot due to UI limitation.
Follow our Quality Assessment section to test the bot.
Once the bot is tested, we will deploy the bot on WhatsApp using Platform Deployment under Business Manager of Conversation Studio.