Table of Contents
- How to Create a WhatsApp bot
- Best Practices to build WhatsApp bots
- Reply Buttons block (WhatsApp)
- Keyword Options block - Assign keywords to buttons
- Message sequence
- Capture the first user's input and use it to redirect the flow
- Direct a user through a different bot flow on their Second Visit
- Global Keywords
- Types of Content Supported:
- Features Compatibility with WhatsApp
- Session and fields
- Loops are banned
- Interacting with Users
- Contact users within 24h from their last contact with your bot
- Make sure to get the User's authorization (Opt-in) to be contacted
- Reach out to users using Templates and Campaigns
- Use Call-to-action buttons in your Message Templates
- Just Human Takeover?
- One bot at a time (Parent bot x New Parent Bot x Campaign bots)
- Add a Click-to-WhatsApp to your Web bot
- Analyze Metrics and Data
- Link a WhatsApp bot to a Channel
Build a WhatsApp Bot - Best Practices and User guide
- How to Create a WhatsApp bot
- Best Practices to build WhatsApp bots
- Reply Buttons block (WhatsApp)
- Keyword Options block - Assign keywords to buttons
- Message sequence
- Capture the first user's input and use it to redirect the flow
- Direct a user through a different bot flow on their Second Visit
- Global Keywords
- Types of Content Supported:
- Features Compatibility with WhatsApp
- Session and fields
- Loops are banned
- Interacting with Users
- Contact users within 24h from their last contact with your bot
- Make sure to get the User's authorization (Opt-in) to be contacted
- Reach out to users using Templates and Campaigns
- Use Call-to-action buttons in your Message Templates
- Just Human Takeover?
- One bot at a time (Parent bot x New Parent Bot x Campaign bots)
- Add a Click-to-WhatsApp to your Web bot
- Analyze Metrics and Data
- Link a WhatsApp bot to a Channel
Prefer watching than reading? No problem, we've got you covered 👇
How to Create a WhatsApp bot
To create a WhatsApp bot, click on the "Build a chatbot" option of your dashboard and select WhatsApp:


Once you select the WhatsApp bot will see that you can use our Build it for me feature, start from scratch (a new bot) or use a WhatsApp bot Template.

For more information on how to test your WhatsApp bot, please check this article 🚀
Best Practices to build WhatsApp bots
Reply Buttons block (WhatsApp)
The Reply Buttons block lets you add clickable buttons in your WhatsApp bot, making it easier for users to respond quickly and saving them time and effort.

Before using the Reply Buttons block, please keep in mind that:
- You can only add 3 buttons.
- Hyperlinks are not allowed.
- Users cannot select more than one option at the same time from the button message, but they can go back and re-open a previous message.
- The maximum number of characters in the button text must be 17, if the limit is passed, the block is not displayed in the flow.

Keyword Options block - Assign keywords to buttons
With the Keyword Options block, you can assign multiple keywords to the button, so that the user can write any of the keywords or the corresponding number of the chosen option:

Message sequence
When using Messages, the best practice is to:
- Add Text and Media in independent blocks:

- As a rule of thumb DO NOT have more than 2 message blocks without user input.

Capture the first user's input and use it to redirect the flow
Unlike Web bots, in WhatsApp, it is not mandatory to start the flow requesting an input from the user.
You can directly capture the first user's message and use it within your bot, or even redirect the flow depending on what the user has texted!
To capture the first user's input, you should start your flow with a Collect Intent block.

Direct a user through a different bot flow on their Second Visit
If you capture the first user's input, as explained above, you can also use it to direct a user through a different bot flow on their second visit!
All you need to do is to add a Conditions block where we will verify if this is the user's first time interacting with the bot with a field that would have been set in the first interaction with the bot.

Global Keywords
As WhatsApp has a fixed text input field, the users can type anything at any point in the bot flow.
To take advantage of that, you can use the Global Keywords block, and assign keywords that will be captured and triggered at any point in the bot flow.
For example, if the user type "Agent" at any point in the flow, you can interrupt the flow and direct them to a flow containing a Human Takeover block.

Types of Content Supported:
You can send different types of content to your users, but please keep in mind that due to WhatsApp's user interface, not all features are displayed as they are in Web bots.

Features Compatibility with WhatsApp
Please keep in mind that some of the features available for Web bots are not fully compatible with WhatsApp bots - even if it possible to find them in your WhatsApp bot builder.
Session and fields

- A field can be set.
- A field's value can be changed within the flow or at the conversation in the Chats section (by your Human Chat Agents)
- A field can be unset.
- A value remains in the WhatsApp session, and will be overwritten if the user answers the same question with a different answer.
- WhatsApp automatically captures the name and phone number of the users, which are saved in fields by default. You can check or reuse these values at any time, using the fields @name and @phone.
Loops are banned
Loops without user input are not supported in the bot builder and cannot be created.
Loops are only allowed when a user input is part of the loop.

Interacting with Users
Contact users within 24h from their last contact with your bot
Once users have started a conversation with your WhatsApp bot, you can contact them through the Chats section without any limitations within a 24-hour window, counted from the last message sent by the user.
However, due to WhatsApp's policies to prevent spamming, after this 24-hour period you will need the user's authorization to contact them proactively (Opt-in).
If the users have Opted in, you can contact them proactively using templates pre-approved by WhatsApp (Message Templates).

Make sure to get the User's authorization (Opt-in) to be contacted
If the 24-hour window from the first contact has passed, you can only contact users proactively if they have given their consent.
This means only clients who have opted in can be reached.
For those users, you can send messages using WhatsApp-approved Message Templates.

Reach out to users using Templates and Campaigns
To contact proactively users that have made the Opt-in, you must restart the conversation by sending Message Templates, which must be approved by WhatsApp.
You can send Message Templates individually within a conversation in the Chats section, or for multiple users at the Campaigns section.

Use Call-to-action buttons in your Message Templates
Create an interactive template to reach out to your users on WhatsApp proactively, while also giving them the option to click a button to call you or visit your website.

Just Human Takeover?
If you just want to use your WhatsApp number to have your Human Chat Agents answering chats, you can create a bot specific for that, with a simple flow leading to the Human Takeover block.

One bot at a time (Parent bot x New Parent Bot x Campaign bots)
You must link a "main bot" to your WhatsApp number, which we call a Parent bot.
New Parent Bot:
If you change the Parent bot, the flow of the parent bot in conversations already started will not break.
The Parent bot will end first, and then the new Parent bot will start.
Bot Linked to Opt-in:
If you connect a bot to a Snippet for the Opt in, it will interrupt the flow of the Parent Bot.
Bot Linked to Opt-in or Campaign:
If you launch a Campaign with a bot, it will interrupt the flow of the Parent Bot.

Add a Click-to-WhatsApp to your Web bot
It is possible to add an option to your Web bot allowing users to send a message to your WhatsApp with a click 😎
You get the link in this option in your Growth tools:

Analyze Metrics and Data
Check the Metrics section
The data belongs to the same WhatsApp Channel (each number), not the bot.

The best practice to manage all the data related to a WhatsApp number is to use the Metrics section of your Landbot Account.
Choose the channel of the WhatsApp number you want to review, and you’ll be able to see all the data linked to that number.
If you want to see the data specific from one specific bot that is active in a WhatsApp number, you can also check the Analyze Section of that bot, where you’ll find both the Metrics and Flow Analytics tabs.
If you’ve used the Custom Goals feature, the Goals metrics are available under the Analyze > Metrics section of your bot.
Link a WhatsApp bot to a Channel
WhatsApp Testing
If you’re not yet using the official WhatsApp API integration, you can test your bot using the Test this bot feature. This lets you try out the full experience on your own WhatsApp number.

If you’re on a trial or WhatsApp Plan, and already have the WhatsApp Official integration with an approved number, you can link your bot to that channel and start testing live immediately.
