How to build a WhatsApp chatbot
Most chatbots fail for design reasons, not technical ones. They try to do too much, ask questions people cannot answer in a chat, and offer no way out when the bot is wrong.
Before you start
- A connected number
- One specific job for the bot to do
- A person to escalate to
The steps
- 1
Pick one job, narrowly
Book an appointment. Qualify a lead. Track an order. A bot that "helps customers" helps nobody. Narrow bots finish; broad ones get abandoned halfway.
- 2
Write the conversation before you build it
On paper, as a script. You will find the questions that cannot be answered on a phone, and the branches nobody will ever take, before you spend an hour wiring them.
- 3
Use buttons instead of typing
Quick replies for up to three options, a list message for up to ten. A tapped button returns a known value your flow can branch on reliably; free text does not.
- 4
Keep it under four steps
Every extra question loses people. Ask only what changes what you do next — anything else can be asked by a human later, once they are engaged.
- 5
Give a way out at every step
A "talk to a person" route on every node. A bot with no exit gets a block instead of a handover.
- 6
Test the whole thing in a simulator
Walk every branch yourself before a customer meets it. Then run it in test mode against your own number for a day.
Where this usually goes wrong
-
Asking for information the customer does not have to hand
Order numbers and reference codes are the usual offenders. Look them up from the phone number instead.
-
A dead end with no handover
The most damaging single design error, and the easiest to fix.
-
Building a bot where an AI agent belongs
A flow is right when the path is fixed. If people ask things you cannot anticipate, that is an agent's job.
Read next