AI Agents & Practical AI

Putting an AI Assistant on WhatsApp Business: What Works and Where It Breaks

What Meta's rules allow, how the 24-hour window shapes the design, the jobs an AI assistant handles well on WhatsApp, and the failure points to build around before launch.

17 November 2026 · 8 min read · TOSS
TOSS illustration for Putting an AI Assistant on WhatsApp Business: What Works and Where It Breaks

In the UAE, a lot of enquiries never touch your website form. They arrive on WhatsApp at 11pm, as a voice note, asking “how much?” with no context. So the request we hear most often is simple: put AI on our WhatsApp so nobody waits until morning.

It can work well. It can also produce the worst version of customer service: a bot that answers confidently, misunderstands the question, and keeps talking after your salesperson has stepped in. The difference is almost never the AI model. It is the rules of the platform and the plumbing around the model.

What Meta allows in 2026

Since 15 January 2026, the WhatsApp Business Solution terms have barred “AI providers” from the platform when AI is the primary functionality being offered. That rule was aimed at general-purpose assistants (the kind of chatbot you would chat with about anything). Meta told TechCrunch the change does not affect businesses using AI to serve their own customers, and gave a travel company’s customer service bot as an example of what remains allowed.

For a business, the practical reading is this. An assistant that answers questions about your services, books appointments and checks order status is fine. An open “ask me anything” bot running on your business number is the thing the terms were written to stop, and it is a bad idea for other reasons anyway. Keep the assistant’s scope tied to your business and say so in its instructions.

This applies to the WhatsApp Business Platform (the API, usually through a provider or Meta’s Cloud API). The free WhatsApp Business app on a phone has no official way to plug in an AI, and unofficial tools that automate the app put your number at risk.

The 24-hour window decides most of the design

When a customer messages you, a 24-hour customer service window opens. Inside it, you can send normal free-form messages, and Meta’s pricing page states that all non-template messages are free. Utility templates sent inside an open window are also free.

Once 24 hours pass without a new message from the customer, the window closes. From then on you can only send pre-approved template messages, which are charged per message by category (marketing, utility, authentication). If someone arrives from a Click to WhatsApp ad and you reply within 24 hours, a free entry point window opens for 72 hours, during which any message type is free.

This has direct consequences for an AI assistant:

  • The AI cannot freely chase leads. It can reply inside the window. A follow-up three days later must be a template your team wrote and Meta approved, sent by a workflow, not generated on the fly.
  • Speed inside the window matters. If the AI collects everything it needs in the first exchange, your team has the rest of the window to respond in free-form.
  • Track the window per contact. Store the time of the customer’s last inbound message. If your system tries a free-form reply after the window closes, the API rejects it, and a naive build fails silently.

Prices and rules on the rate card change during the year, so check the current figures in your Meta Business account before budgeting.

Jobs it does well

The assistants that hold up in production have a narrow job and access to the right data. Good first jobs:

  1. Answering from a fixed knowledge set. Opening hours, locations, documents needed for a visa or licence application, what is included in each package. The AI answers only from content you maintain, and says “let me get someone” when the answer is not there.
  2. Collecting qualification details. Service needed, budget range, timeline, emirate, company or personal. The AI asks for what is missing and writes the answers into CRM fields, so the salesperson starts with a filled record instead of a chat log.
  3. Booking. Offering real free slots from a calendar and confirming one. This needs a live calendar connection, not a list of times in the prompt.
  4. Status lookups. “Where is my application?” answered from the CRM or order system after checking the sender’s number matches the record.

Each of these maps to data you already own. That is the test: if the answer lives in a system the AI can read, it is a good job. If it lives in someone’s head, it is not ready.

Where it breaks

Voice notes and images. Plenty of customers send a voice note or a photo of a document. The webhook gives you a media ID, not text. Either transcribe and read it (more cost, more failure points) or reply asking for text and flag the conversation for a person. Decide this upfront.

Language switching. Customers move between English and Arabic in one thread, sometimes writing Arabic in Latin letters. Test with real messages from your own inbox in both languages before launch, and set a rule for which language the assistant replies in.

The human takes over and the bot keeps going. This is the most common complaint we see. A salesperson replies from the inbox, then the AI answers the next customer message as well. You need an explicit ownership flag on the conversation that the AI checks before every reply.

Duplicate webhooks. Meta can deliver the same webhook more than once, for example when your endpoint is slow to respond. Without a check, the customer gets two different AI answers to one question.

Confident wrong answers on price. If pricing depends on variables, do not let the model calculate it. Give the AI a lookup it can call, or have it collect the variables and hand over.

The plumbing, in code

Here is the core of a webhook handler for the Cloud API in Node.js with Express. It verifies the request came from Meta, ignores duplicates, respects the handoff flag and the 24-hour window, and only then calls the AI. The db, ai and crm helpers stand in for your own storage, model call and CRM integration.

import express from 'express';
import crypto from 'node:crypto';

const app = express();
app.use(express.json({ verify: (req, _res, buf) => { req.rawBody = buf; } }));

// One-time webhook verification from Meta
app.get('/whatsapp', (req, res) => {
  if (req.query['hub.mode'] === 'subscribe' &&
      req.query['hub.verify_token'] === process.env.VERIFY_TOKEN) {
    return res.send(req.query['hub.challenge']);
  }
  res.sendStatus(403);
});

app.post('/whatsapp', async (req, res) => {
  // 1. Check the signature against your app secret
  const expected = 'sha256=' + crypto
    .createHmac('sha256', process.env.APP_SECRET)
    .update(req.rawBody)
    .digest('hex');
  const received = req.get('x-hub-signature-256') || '';
  if (received.length !== expected.length ||
      !crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected))) {
    return res.sendStatus(401);
  }

  res.sendStatus(200); // acknowledge fast, process after

  const msg = req.body.entry?.[0]?.changes?.[0]?.value?.messages?.[0];
  if (!msg) return; // status updates (sent, delivered, read) land here too

  // 2. Ignore duplicates: the message ID is unique
  if (!(await db.markProcessed(msg.id))) return;

  const convo = await db.touchConversation(msg.from, Number(msg.timestamp));

  // 3. A person owns this conversation: log it, do not reply
  if (convo.owner === 'human') return crm.logInbound(msg);

  // 4. Media goes to a person
  if (msg.type !== 'text') return crm.flagForTeam(msg, 'Media message');

  const reply = await ai.answer({ text: msg.text.body, contact: await crm.findByPhone(msg.from) });

  if (reply.handover) {
    await db.setOwner(msg.from, 'human');
    return crm.flagForTeam(msg, reply.reason);
  }
  await sendText(msg.from, reply.text);
});

async function sendText(to, body) {
  const url = `https://graph.facebook.com/${process.env.GRAPH_VERSION}/${process.env.PHONE_NUMBER_ID}/messages`;
  const r = await fetch(url, {
    method: 'POST',
    headers: { Authorization: `Bearer ${process.env.WA_TOKEN}`, 'Content-Type': 'application/json' },
    body: JSON.stringify({ messaging_product: 'whatsapp', to, type: 'text', text: { body } }),
  });
  if (!r.ok) throw new Error(`WhatsApp send failed: ${r.status} ${await r.text()}`);
}

app.listen(3000);

Since every reply here answers a message that just arrived, the window is open. Any workflow that sends later, such as a reminder or a follow-up, must check convo.lastInboundAt and switch to an approved template when 24 hours have passed. If you run this inside n8n instead of your own server, the same four checks apply, and failures should feed an alert like the one in our n8n error workflow guide.

Handoff rules to write down before launch

Situation What the assistant does
Customer asks for a person Hands over immediately, tells the customer someone will reply
Question outside the knowledge set Says it will check with the team, flags it
Complaint or refund Hands over without trying to resolve it
A team member replies from the inbox Stops replying until the owner is reset
Same question asked twice Hands over, the first answer did not help

The table matters more than the prompt. Your team should agree on it, and the AI should only be able to hand a conversation back to itself when a person releases it.

Where to start

Pick one job from the list above, usually qualification or the fixed knowledge set, and run it on real conversations with a person reviewing every AI reply for the first couple of weeks. Every reply that needed correcting becomes either a knowledge base fix or a new handoff rule. The CRM side matters as much as the chat side, so if your contact records are not clean yet, start with CRM implementation.

If you want an assistant built on the WhatsApp Business Platform with proper handoff, logging and CRM sync, see our AI automations service or request a quote.

Talk to TOSS

Turn the idea into a working system.

Start with the friction. We will help you find the right system.

Start a conversation →