AI replies on WhatsApp that don't annoy your customers
Most WhatsApp bots make customers work harder, not less. Here's how we build AI-driven WhatsApp flows — auto-replies, lead qualification, order updates — that answer like a good employee and know when to hand over to a real one.
The problem: two bad defaults
If your business runs on WhatsApp — and in India, most do — you've probably experienced both failure modes.
The first is answering everything manually. It works right up until it doesn't. Replies are fast at 11am and nonexistent at 11pm, which is exactly when a serious buyer is comparing you to three competitors. Leads that message on a Saturday get answered on Monday, by which point they've bought elsewhere. The person doing the replying burns hours a day on the same five questions: price, availability, delivery time, opening hours, "is this still available?"
The second failure mode is the menu bot. Somebody bolts on a rules-based chatbot, and now every customer is greeted with "Press 1 for Sales, Press 2 for Support." Ask it anything that isn't on the menu and it repeats the menu. Customers learn to type "agent" or "human" or just "9" repeatedly, like rattling a locked door. The bot didn't reduce work; it added a hostile gatekeeper in front of the work.
Both defaults share a root cause: neither one actually understands what the customer wrote. One routes messages to a human's attention span, the other routes them to a decision tree. There's now a third option — putting a language model in the loop — and done carefully, it's dramatically better than either.
The principle: AI in the reply loop, human in the decision loop
The mistake teams make with LLMs on WhatsApp is treating automation as all-or-nothing. The useful question isn't "can AI answer this?" — it usually can produce something — it's "what's the cost if it answers wrong?" That question splits every conversation into three tiers:
- Fully automate when the answer is factual and low-stakes: order status, business hours, delivery areas, catalog questions, return policy. The correct answer exists in your data, and a wrong answer is cheap to correct. This is the bulk of message volume, and it's where automation pays for itself.
- Draft for approval when the reply carries commitment: price quotes, custom requests, complaint responses. The AI reads the conversation, pulls the relevant history, and writes a proposed reply — but a human taps "send" (or edits first). The human does in ten seconds what used to take five minutes, and nothing goes out that the business didn't sign off on.
- Stand down entirely when a person is required: an angry customer, anything touching payments or refunds, legal threats, or plain ambiguity. The right move here is a fast, honest handoff — "I'm getting a person on this now" — not a bot doing improv on a sensitive topic.
This tiering is the whole design. Everything in the implementation exists to classify incoming messages into one of these three lanes reliably — and to fail toward the human lane whenever it's unsure.
How it's built
The architecture we've settled on across our WhatsApp automation prototypes is a pipeline behind a WhatsApp Business API webhook.
1. Webhook receives the message. Every inbound message hits an endpoint, gets logged, and is joined with the customer's conversation history and any business records tied to their number — past orders, open tickets, previous quotes. Context is not optional; "where's my order?" is unanswerable without knowing which order.
2. An LLM reads for intent, not keywords. The model sees the message plus that context and classifies what the customer actually wants, in whatever language and spelling they used. "Bhai order kab aayega" and "any update on delivery??" resolve to the same intent. This is the step menu bots can't do and the reason they fail.
3. Triage routes to one of three actions. Direct reply, drafted reply, or escalation — the three lanes above, decided by intent plus the model's own confidence.
result = llm.classify(message, context=customer.history) if result.intent in SAFE_INTENTS and result.confidence > 0.9: reply = kb.answer(result) # grounded in business data wa.send(reply, template=result.intent) elif result.intent in DRAFT_INTENTS: # quotes, complaints inbox.queue_draft(llm.draft_reply(message, context)) else: # angry, payments, unsure wa.send("Getting a person on this for you now.") inbox.escalate(message, priority="high") audit.log(message, result, action) # every decision, reviewable
4. Guardrails wrap everything. Automated replies are built from approved response templates filled with retrieved facts — the model chooses and populates, it doesn't freestyle. A confidence threshold decides whether the model is allowed to reply at all; below it, the message goes to a person. And every path has the same fallback: "I'll get a person for you." Never a dead end, never a loop back to a menu.
For lead qualification, the same pipeline runs in reverse gear: instead of answering, the AI asks. A new inquiry gets two or three natural follow-up questions — what they need, quantity or scope, timeline — and the human wakes up to a summarized, qualified lead instead of a bare "hi, price?"
Lessons if you're building this yourself
A few things we learned prototyping these flows that the tutorials skip:
- Grounding beats prompting. No system prompt makes a model reliably know your prices, stock, or delivery slots. Retrieval from your actual business data — a real knowledge base, a real orders table — does. Most "hallucination problems" in these systems are actually missing-retrieval problems.
- Eval on real transcripts. Before anything goes live, run the triage against exported real conversations and score its lane choices. Real customers write fragments, mix languages, and send four messages where one would do. If your test set is sentences you wrote yourself, you haven't tested it.
- Set a latency budget. WhatsApp is a chat medium; a reply that takes 40 seconds feels broken even if it's perfect. Budget end-to-end (webhook to send), keep the classification step small and fast, and send a typing indicator or acknowledgment when a slower retrieval is unavoidable.
- Log every decision. Every classification, confidence score, retrieved fact, and chosen lane goes into an audit log. It's how you debug the weird cases, how you tune thresholds with evidence instead of vibes, and how you answer "why did the bot say that?" with a record instead of a shrug.
What this means for your business
If you run a business on WhatsApp, the payoff is concrete. Inquiries that arrive at midnight get answered at midnight — and arrive in your morning inbox as qualified leads with a summary, not a cold "hello?" from eight hours ago. Every customer gets the same correct answer on prices, policies, and timings, whoever's on shift. Nothing sensitive goes out without a human tap. And because every conversation and every AI decision is logged, you have a full transcript trail for training, disputes, and improvement.
Most importantly, your customers never feel trapped in a bot. They ask in their own words, get a real answer or a real person, and the phrase "press 9 to talk to a human" never appears.
This is the kind of system we design and build at Anekant AI — see our AI Solutions for the LLM side and our WhatsApp automation services for the messaging side.