WhatsApp Bots: How to Build a Chatbot in 7 Steps

With WhatsApp growing into a serious customer channel, support volumes are quickly rising. Chatbots are here to help your team and engage your customers. But how do you actually build one?

WhatsApp bots offer a lot of potential but launching one can also be intimidating. Today’s customer messaging solutions and chatbot providers make it simple for anyone to get started with chatbot support on WhatsApp. With little to no coding, you can create a chatbot that can help your customers with simple tasks and ease your agents’ workload.

What is a WhatsApp bot

Short for chat robot, a chatbot is an artificial intelligence program (AI) that can simulate human conversations by replicating the pattern of human communication. It interacts with users through various messaging applications, websites, mobile apps or telephone.

The Ultimate Guide to Chatbots in Business

Learn how chatbots work, what they can do, how to build one – and whether they will end up stealing your job.

Read more

While bots are already established on some digital channels, such as Facebook Messenger and website chat , they’re still rather new to WhatsApp. Commercial use creeping into the personal space clashes with the app’s original purpose (“talking to friends and family”), posing the risk of negatively affecting its global popularity. Since WhatsApp Business was launched in 2018, new features for business communication have only cautiously been introduced to WhatsApp.

Bots are supported on WhatsApp and can be integrated with various third-party chabot providers . However, there are some restrictions in place to ensure the responsible use of chatbots and to avoid spam:

  • Chatbots are only available in the WhatsApp Business API .
  • Customers need to initiate the conversation with a business on WhatsApp.
  • Chatbots can only be used when responding within the 24-hour “customer service Window”.
  • A direct chatbot-to-human escalation path must be available.

We’ll discuss these points in more detail and what they mean for you throughout the post.

Benefits of using a WhatsApp bot

WhatsApp chatbots combine two dominating trends: WhatsApp + chatbots.

With more than 2 billion users around the globe and across generations, WhatsApp is the leading messaging app. And it’s becoming a relevant channel for customer communication, too. In 2020, WhatsApp Business reported more than 50 million users, a tenfold-growth from the year before.

Likewise, chatbots are clearly on the rise. According to Gartner , virtual customer assistants already help organizations reduce call, chat and email inquiries by 70%. And they’re not just beneficial for businesses.

In a Userlike survey , 68% of the respondents stated that they like that chatbots are immediately available and respond quickly. To find out more about what chatbots have to offer, take a look at our post “ 10 Important Chatbot Benefits for Businesses and Customers ”.

7 steps for creating a WhatsApp bot

Introducing a chatbot to your WhatsApp Business account allows you to juggle high support volumes and scale your customer messaging process on this new channel. Here are the most important steps you need to know to get started with WhatsApp bots.

  1. Define the bot’s purpose
  2. Get access to the WhatsApp API
  3. Find a chatbot partner
  4. Create a chatbot persona
  5. Start building your bot
  6. Test and tweak
  7. Promote the bot

1
Define the bot’s purpose

Bots are popular, they look nifty on apps like WhatsApp and they’re a feasible option for boosting customer engagement.

If you have a use for them.

But, just because there's a lot of hype around them right now doesn’t mean you should jump on the bot-wagon. Chatbots that lack a purpose are often frustrating to users and can even harm your business’s reputation.

A screenshot of a chatbot fail with the Poncho weather bot.
Chatbot fails : A chatbot that’s lacking purpose is worse than no chatbot.

Your chatbot needs a purpose so it doesn’t become a talking accessory. So before you start creating a bot for WhatsApp, ask yourself this one question: Do I really need one? Our checklist “ 8 Ways to Know if You Need a Chatbot For Your Business ” guides you through the decision process.

With a clear vision and careful planning, you can build a chatbot that effortlessly assists your agents and customers across channels. This can range from sending reminders to helping customers with simple tasks. Create a list of everything you want your chatbot to achieve and break it down to what’s viable for your budget, time and customer base.

2
Get access to the WhatsApp API

Once you know how a chatbot will help your business, you need to connect it to WhatsApp to use it professionally. WhatsApp offers two solutions for businesses: the WhatsApp Business App and the API. We cover them in detail in our post “ Your WhatsApp Business account ”. In a nutshell, the biggest differentiators are company size and costs .

While it’s not possible to use chatbots on the free WhatsApp Business App, the integrated chat tools are a viable option to help you save time, like with an automatic greeting message, pre-set quick replies for frequent requests and away messages.

However, a real chatbot functionality is only available with the WhatsApp Business API. This API allows medium and large businesses to scale their customer support and to make use of WhatsApp for more flexible and complex setups.

To access the API you need a professional customer messaging platform, such as Userlike. Once you sign up for the Userlike WhatsApp Channel, our team will ask you to submit the required information and assist you with the application process. The entire approval process usually takes around one day.

Take a look at our how-to guide to learn more about the WhatsApp Business API.

WhatsApp Business: Privacy, examples and first steps

In this guide, you'll find all the important info you need for using WhatsApp in business.

Download for free

3
Find a chatbot partner

Most chatbot providers integrate seamlessly with messaging applications like WhatsApp and can be docked onto the Business API. Their focus is to make bot-building accessible. Some even offer visual no-code frameworks so you don’t need to code anything to create a chatbot.

An interface of the low-code chatbot provider Cognigy
Cognigy is a popular low-code software for conversational AI.

Customer messaging solutions like Userlike offer all you need for WhatsApp support out of one hand: access to the WhatsApp API, an integrated bot builder and an interface for combining bot and human support.

4
Create a chatbot persona

Now that you know how you want to use your bot and have sorted out the technical requirements, it’s time for the fun part: developing a personality for your bot.

Chatbots often give a first impression of your company. With a clever, memorable bot, you can set the right tone for a positive brand perception. Creating an identity modeled after your brand builds empathy with users and mirrors the personalized engagement they receive from your team.

A venn diagram showing bot persona as the intersection of users, purpose and brand.
A good chatbot persona connects your brand, target audience and the bot’s purpose.

WhatsApp bots are usually not as advanced as their website brethren. They mostly rely on simple commands and buttons, which is useful to steer the conversation but leaves less room to express the bot’s identity.

WhatsApp also won’t display a unique name and profile picture for your bot. This information will be drawn directly from your general business profile, which probably consists of your company name and logo.

Because of these visual and technical limitations, it’s even more critical that the user is aware they’re talking to a chatbot. But without a persona, a chatbot can seem empty and cold. Zhuzh it up a little so the interaction is not just effective but also feels engaging for the user. Give your bot a name and write the conversation flow in a way that lets its personality shine through. This adds a more individual touch to the customer experience.

For example, you could use the first message to introduce the bot to the user by letting it state its name and adding a fitting emoji, like the learning app HeyPatch is doing.


Turning a computer program into a likable character is easier said than done. We’ve compiled some useful resources that help you make the creative process a little easier:

5
Start building your bot

As we describe in our post “ How Chatbots Work (and Why They Sometimes Don't) ”, there are three different types of chatbots: decision tree (menu/buttons), keyword recognition and contextual. Which type is right for you depends on the purpose you’re looking to achieve with your bot – and the resources you’re willing to invest. Contextual bots are the most advanced form but require strategic planning and guidance.

Most WhatsApp bots follow a simple rule-based structure with a numbered menu and (basic) keyword recognition. This mix of keywords and decision trees is less reliant on identifying keywords in the user input, which can help them find their answer without running into dead ends. Although users are expected to choose between your predefined options, you can still add a unique spin to the conversation with your chatbot’s text and display options.

Gamescom : An example of a rule-based WhatsApp bot that uses a numbered menu and basic keyword recognition to analyze inputs.

Since WhatsApp is a relatively new customer channel, rule-based bots are a great way to experiment and gain some experience without facing the risk of a high initial investment. They’re cheaper to build, quicker to deploy and can still be useful, entertaining and educational.

These are the key pillars to get started:

  • Welcome message. On WhatsApp, users always need to send the first message to start a conversation with a business. But what happens next? Define how the conversation should be kicked off by the bot. We recommend sending a friendly greeting to the user and quickly getting to the point, explaining the bot’s capabilities and what it can do for the user.
  • Keywords and user intents. When the user types in a keyword, the chatbot recognizes the specific command and will give the next appropriate response according to its conversation map. Similar requests are categorized into “intents”, indicators of the user’s motivation behind a particular request. Predefining intents helps your chatbot properly respond to inputs. Keep in mind that customers will use various ways (“utterances”) to express the same objective, for example, when asking about your shipping costs. Make sure the bot recognizes the most common keywords.
  • Emoji & rich media. Chatbots are an innovative mode of communicating, which is why emoji, images and GIFs are widely accepted among its users. These visual cues help add meaning to written communication, make a message more positive and break up long paragraphs of text. Another benefit of emoji for WhatsApp bots is that they can also work as quick commands. This speeds up certain processes and increases the overall convenience for the user.
  • A screenshot of the World Health Organization WhatsApp chatbot.
    WhatsApp-exclusive WHO Health Alert chatbot : Using keyword and emoji commands, users can choose from several topic options to learn more about COVID-19.
  • Variables. A variable is a container of information that stores a specific piece of data the bot collected from the customer, like their name, city or customer ID. The bot can request this information from the user, and use it within the dialog to personalize its messages.
  • Conversation flow. Based on the bot’s purpose, you control which keywords the bot understands and how it should respond. Write the conversation possibilities down and organize everything into diagrams. You can either map this out by hand or use a visual bot builder tool such as Landbot . Solutions like Userlike allow you to delay the bot’s replies for some seconds so the interaction resembles human conversations more accurately.
  • A prototype of a chatbot conversation flow
  • Human handoff. Unlike other platforms, WhatsApp requires you to set up an easy chatbot-to-human handoff when a request becomes too complicated for the bot to handle. Examples for a direct escalation path include a handoff in the chat or noting down the customer’s contact details so an agent can get back to them later via phone or email. With Userlike , you can manage your bot and chat operators in one place. Define when a conversation should be forwarded to an agent and avoid customer frustration .

6
Test and tweak

Like in any software development, testing is an integral part when building a bot. Before you present your creation to your customers, you need to make sure it works and behaves like it’s supposed to.

Open the WhatsApp app on your phone or use the desktop version WhatsApp Web to start interacting with your bot. Testing on multiple devices helps uncover blind spots from the development process. For example, having to type in long commands can be tiresome when you’re using a phone. Check if you could replace the command with an emoji or other quick action instead.

To fight the curse of knowledge , include team members who weren’t involved in the creation process. Moreover, their input is helpful to assess if the chatbot fits in with your company culture. You can also ask your top clients if they’re interested in testing your chatbot before launch (we did this when our own chatbot feature was in beta ). It’s a great way to be transparent with your business and get honest feedback from a fresh perspective.

Make changes to the bot where necessary to improve its behavior. But keep in mind that maintaining the bot doesn’t end after its launch. It’s a constant process. Plan in performance measurements and be prepared to adjust the bot to optimize your customer experience.

Filtering for chatbot conversations with negative reviews in the Userlike Message Center
Userlike Message Center: Filter for bad reviews and investigate how you could improve.

You can do so by regularly going through the transcripts in your messaging solution to check which questions the bot wasn’t able to answer. This helps you uncover untapped potential for keywords that hadn’t been on your radar. Customer messaging solutions like Userlike also allow users to rate an interaction and leave written feedback at the end of each conversation.

7
Promote the bot

WhatsApp Business works differently than other customer channels . While your customers will immediately see a live chat window when they enter a website, messaging apps are not a natural part of the customer journey. And unlike Facebook Messenger or Telegram, users can’t search for a business on WhatsApp either. To make matters more complicated, you can’t reach out proactively, but users must initiate the conversation.

In order to be found on WhatsApp and for your bot to be a success, you need to communicate that you’re available on this channel. Add a WhatsApp contact button to your website or include your WhatsApp number in your email footer and other touchpoints.

An example of a WhatsApp button on the contact page.

You need to be more considerate with promoting your WhatsApp bot; however, there are many ways to spread awareness. We share nine ideas and best practices in our post “ Why and How to Guide Customers to Your Messaging Channels ”.

Take a look at our ultimate guide to chatbots to learn more about what chatbots are and how they function. And if you’re looking for a comprehensive solution for chatbot support on multiple channels, sign up for a free Userlike account and contact us about our chatbot services.