Blog

How a WhatsApp chatbot for business works

How a WhatsApp chatbot is built on the WhatsApp Business Platform: the 24-hour window, message templates, per-message pricing and adding an AI agent.

By Rokibul Hasan7 min read

  • WhatsApp
  • Chatbots
  • AI

Your customers already message businesses on WhatsApp. They ask about prices, opening hours, delivery and order status, and they expect a reply the way they get one from a friend: quickly. A WhatsApp chatbot answers the repetitive questions instantly, at any hour, and passes the rest to your team with the details already collected.

This guide explains how a WhatsApp chatbot for business actually works on Meta's official platform — the rules, the costs, the parts you need and the mistakes to avoid — so you can plan one properly or have a sensible conversation with whoever builds it. I build WhatsApp and Telegram bots, with or without an AI agent behind them, and this is the ground worth covering before anyone writes code.

The WhatsApp Business app vs the WhatsApp Business Platform

There are two very different products with similar names.

The WhatsApp Business app is the free app you install on a phone. It gives you a business profile, quick replies, labels and simple automated greetings. It is built for a person replying by hand, and it works well for a small shop with a manageable number of chats.

The WhatsApp Business Platform, often called the WhatsApp Business API, is what you need for a real chatbot. There is no app to install: your own software sends and receives messages through Meta's Cloud API. That is what lets a bot answer automatically, connect to your booking or order system, and hand conversations to a shared team inbox.

Stay away from unofficial tools that automate the regular app by pretending to be a phone. They break the rules, and numbers using them get banned.

What you need to get started

Setting up on the platform takes some paperwork before any code:

  • A Meta business account for your company, which is where the WhatsApp setup lives.
  • A phone number for the bot. It should be a number you control for the long term, because it becomes your business identity on WhatsApp. If you want to reuse a number already active in the WhatsApp app, check Meta's current migration options first.
  • A display name that matches your business. Meta reviews it.
  • Business verification, which Meta may require before you can message larger numbers of people.

Some businesses go through a Business Solution Provider — a company that resells access to the platform with its own dashboard and support. Others connect to Meta's Cloud API directly. Both are legitimate; direct access avoids a middleman fee, while a provider can be convenient if you also want their inbox tools.

How a WhatsApp bot works

The moving parts are simpler than they sound:

  1. A customer sends your number a message.
  2. Meta delivers it to your server through a webhook — a web address on your system that Meta calls with each new message.
  3. Your server decides what to do: look up an order, check availability, ask a follow-up question, or pass the message to an AI model with your business information.
  4. Your server replies through the Cloud API.
  5. If the bot cannot help, the conversation goes to a person, with everything said so far attached.

Your server also keeps track of where each conversation is — for example, that this customer is halfway through booking a table for four on Friday — so that replies make sense in context.

The 24-hour customer service window

The rule that shapes everything on WhatsApp is the customer service window. When a customer messages you, a 24-hour window opens. Inside it, your business can reply freely with normal messages: text, images, buttons, lists. Every new message from the customer restarts the 24 hours.

Outside that window you cannot send a normal message. You can only send an approved message template.

This is deliberate. WhatsApp protects its users from being spammed by businesses, and it is the main reason WhatsApp messages from businesses still get read. Design your bot around it: answer while the customer is engaged, and use templates only for messages the customer genuinely expects.

Message templates

A template is a pre-written message, with placeholders for details such as a name or an order number, that Meta has approved before you use it. Templates fall into three categories:

  • Utility — updates about something the customer already started: an order confirmation, a delivery update, an appointment reminder.
  • Authentication — one-time passcodes for logging in.
  • Marketing — anything promotional: offers, announcements, re-engagement.

Templates are reviewed, and they can be rejected or later re-categorised if the wording does not match the category. Write utility templates that are clearly about the customer's own transaction, and keep promotional language out of them.

What it costs, in plain terms

Meta charges for the WhatsApp Business Platform, and the pricing model changed in July 2025: Meta now bills per message rather than per conversation. In practice:

  • Normal replies inside the customer service window are free. Most of a chatbot's work — answering questions a customer just asked — falls here.
  • Utility templates sent inside an open window are free.
  • Template messages sent outside the window are charged per message, at a rate that depends on the category and the customer's country. Marketing templates generally cost the most.
  • Conversations that start from a click-to-WhatsApp ad open a free 72-hour entry window, during which messages are free.

Rates vary by country and change from time to time, so always check Meta's current pricing page for your markets. The shape of the model is what matters for design: a bot that mainly answers inbound questions costs very little in WhatsApp fees, while a bot that pushes outbound marketing pays for each message.

Remember the other running costs too: hosting your server, and any AI model you use to write replies. I covered those in what it costs to build an app.

Opt-in and quality

To message customers first, you need their permission — an opt-in they gave knowingly, for example by ticking a box at checkout or asking for updates on WhatsApp. Messaging people who never agreed is the fastest way to get blocked and reported.

Meta also tracks the quality of every business number based on how people react to its messages. Lots of blocks and reports lower that quality and can limit how many people you are allowed to message. The cure is simple: only send messages people asked for, and make them useful.

Designing the conversation

A good WhatsApp bot feels like a capable assistant, not a phone tree:

  • Use buttons and lists. WhatsApp supports reply buttons and list menus, which are faster to tap than typing and remove spelling problems.
  • Keep messages short. It is a chat, not an email. One idea per message.
  • Ask one question at a time when collecting details.
  • Always offer a person. A clear "talk to someone" option at any point builds more trust than the cleverest automation.
  • Remember the context. If a customer gave their order number two messages ago, do not ask again.
  • Handle the unexpected kindly. Photos, voice notes and stickers will arrive. Decide what the bot does with each.

Adding an AI agent

A rules-based bot handles the predictable paths: menus, order lookups, bookings. Adding an AI agent lets it handle the unpredictable ones — free-text questions phrased a hundred different ways — by answering from your own business information.

The same principles from AI agents for business apply. Ground the agent in your own documents so it does not invent policies. Let it answer and collect details on its own, but have a person approve anything that commits the business, such as refunds or special prices. And hand over to your team when it is unsure, instead of guessing.

The 24-hour window fits AI well: the agent works while the customer is in the conversation, which is exactly when an instant, informed answer matters most.

Common mistakes

  • Using an unofficial automation tool and losing the number to a ban.
  • Treating WhatsApp like email marketing. Bulk promotional templates to people who did not opt in damage the number's quality quickly.
  • No route to a human. Customers who get stuck in a loop leave, and they remember it.
  • Long, formal messages. Write the way a helpful person types.
  • Ignoring templates until launch week. Templates need approval. Write and submit them early.

A sensible first version

Like any product, a WhatsApp bot is best launched small. A strong first version usually includes:

  • Answers to your five to ten most common questions, with buttons for the obvious follow-ups.
  • One useful lookup, such as order status or available booking times.
  • Detail collection for everything else, so your team receives complete enquiries.
  • A clear "talk to a person" option at every step.
  • One or two utility templates, such as an order confirmation, submitted for approval early.

FAQ

Can I keep my existing business number?

Often, yes, but the steps depend on how the number is used today and on Meta's current options. Decide this early, because the number becomes your identity on WhatsApp.

Will Meta ban my number?

Not if you use the official platform, message people who opted in and keep your messages useful. Bans come from unofficial tools and spam.

Can the bot reply in Bangla or other languages?

Yes. A rules-based bot replies in whatever language you write its messages in, and an AI agent can understand and reply in many languages, including Bangla. Test with real customer messages, including the informal ones.

If you want a WhatsApp chatbot for your business, send me a short brief: what your customers message you about most, and what system holds the answers. You can see the service on the WhatsApp & Telegram bots section of my services page.