RAiN — Rivium AI Network
Back to Help

Answer customers on WhatsApp

A project can answer the messages customers send to a business's WhatsApp number. A customer writes, your Sequence runs, and the reply goes back in the same chat.

It runs on the business's own Meta app and number, not on RAiN's. The business keeps its number, its customers and its WhatsApp account. The project is what answers.

The quickest start: the WhatsApp AI Agent template

Choose Use template → WhatsApp AI Agent. You get a working Sequence:

  1. The trigger, When a WhatsApp message arrives.
  2. An agent that answers from the project's knowledge base, or replies HANDOVER when the knowledge doesn't cover the question, or the customer asks for a person, complains, or has a payment problem.
  3. A route, Can it be answered?
  4. Either Send the answer on WhatsApp, or Tell staff a customer needs a person by email, followed by Tell the customer a person will reply.

Before connecting anything:

  • Add the business's knowledge (prices, hours, delivery areas, policies). The agent answers only from it.
  • Point the staff email at a real inbox. The template ships with you@yourbusiness.com.
  • Press Use template once. Each copy is a separate project, with its own address for Meta. Delete any spare copies, so you don't paste the address of the wrong one.

The template's trigger is switched off, on purpose, until the number is connected.

What each run is given

Every message arrives as a row with three columns:

Column What it holds
{{row:phone}} The customer's WhatsApp number. Send the reply here
{{row:name}} The name on their WhatsApp profile
{{row:message}} What they wrote

The reply is an ordinary Action step, WhatsApp — send message, to {{row:phone}}. Because it's drawn on the canvas, a route can choose not to send it.

Agents remember the conversation. The recent messages with that customer, in both directions, reach the agents in every run. Each customer has their own thread.

Quick bursts are answered once. People text in pieces: "Hi", "I want to order", "2 bags of rice". Messages that arrive within a few seconds of each other are answered together, in one run.

One reply at a time per customer. If a customer writes again while their last message is still being answered, the new message waits its turn.

Try it first: Test chat

Press Test chat in the toolbar, or on the WhatsApp trigger. A chat opens beside the canvas. Type as the customer and watch each step light up as it runs. The reply appears marked would send.

  • Customer's number is who you're pretending to be. Each number has its own conversation. Leave it empty for a made-up one. Nothing is ever sent to it.
  • Their WhatsApp name fills {{row:name}}.
  • Start over forgets that number's conversation.

Test chat works before any number is connected, and on a practice workspace.

Connected apps really act in Test chat. RAiN's own sending tools (WhatsApp, email through a mail server, SMS, web posts) are held back. Integrations you've connected, such as Gmail, are not. If a test goes down the hand-over path and that step uses Gmail, the email really sends. Point it at your own address while testing.

Each test message is a real run, so it counts towards the day's WhatsApp allowance.

Connecting the business's number

Open the trigger. Choosing When a WhatsApp message arrives shows numbered steps, using the names of Meta's own screens. Two ticks at the bottom show progress: Meta verified and First message in. Check again refreshes them.

You need a Meta developer app with the WhatsApp use case, on the business's own Meta account.

1. Connect the business's WhatsApp number. In the Tools rail, connect WhatsApp — send message with an access token and the phone number ID. Then paste the App secret into the setup steps (Meta: App settings → Basic → App secret → Show). The secret proves a message really came from that app.

Use a System User token. The token Meta offers under Basic setup can stop working within about an hour, and replies then quietly stop. For anything meant to keep running, including a test longer than an hour, create a System User token in Meta's Business settings with no expiry.

2. Give Meta this address. In Meta: your app → Use cases → Customize → Connect on WhatsApp → Configure webhooks. Paste the Callback URL and Verify token from the steps, then press Verify and save. Meta verified ticks.

3. Subscribe to messages. On the same screen, under Webhook fields, switch on messages.

4. Subscribe the app to the WhatsApp Business Account. Verifying the address in step 2 does not do this, and without it Meta sends nothing at all. In Meta's Graph API Explorer, choose the app, use a token with WhatsApp permissions, and send a POST to {WABA_ID}/subscribed_apps. The answer is {"success": true}. A GET on the same path should now list your app. (The WhatsApp Business Account ID is on the app's API Setup screen.)

5. Publish the Meta app. Until it's published, Meta sends only the samples from its own Test button, not real customers and not even the app's admins. Publishing asks for a privacy policy URL, and may ask for terms, an icon and a category.

6. Switch the trigger on. Tick Switched on, save, and make sure the trigger is joined to its first step.

Then message the number from a phone. First message in ticks when it arrives.

The daily allowance

WhatsApp runs have their own daily allowance, separate from other runs, so a busy chat can't stop your scheduled work: 300 runs a day on a full workspace and 30 on a practice one. The setup steps show how many are used today. It resets at midnight UTC (1am in Lagos).

When it runs out, customers aren't met with silence. Each one who writes gets the trigger's busy reply, once that day, and their messages wait in the conversation for a person. Write the busy reply in the trigger's form. If you leave it empty, it says Thanks for your message. We'll get back to you as soon as we can.

When nothing happens

Problems RAiN can see are written on the trigger, in an amber note under the setup steps. Most of the silent ones are on Meta's side:

Messages never arrive, and there's no note. Nothing reached RAiN. In order, check: step 4 (the app isn't subscribed to the account), step 3 (messages isn't switched on), and step 5 (the app isn't published).

"No WhatsApp trigger is switched on and joined to a step." The message arrived but nothing ran. Tick Switched on, save, and join the trigger to its first step.

"The app secret isn't saved here" or "its signature doesn't match." Copy the App secret again from Meta (App settings → Basic) and save it in step 1.

"A message arrived for phone number ID 123456123…" That's the sample from Meta's Test button, which uses a made-up number. After a test it's expected, and nothing needs fixing.

Replies worked, then stopped. Almost always the access token expired. Meta first refuses sends with (#131005) Access denied, which looks like a permissions problem, then rejects the token outright. Replace it with a System User token.

The run shows "Accepted by WhatsApp", but the customer didn't get it. Accepted means Meta took the message, not that it arrived. Meta can take a message and drop it later. Delivery can also lag: a reply Meta marked read has shown on a phone minutes later. Wait a few minutes before deciding it failed.

Old messages weren't answered. A message that reaches RAiN more than six hours after it was sent is recorded but not answered, so a customer isn't answered for something they asked yesterday.

Questions people ask

Can the agent message a customer who hasn't written first? Not with a free-form message. WhatsApp only allows those within 24 hours of the customer's last message. To start a conversation, use WhatsApp — send template.

Does it work on RAiN's number? No. Each business connects its own Meta app and number, and the project answers on that number.

Can I have WhatsApp and a schedule in the same project? Yes. A project can have several triggers. See Trigger.


Related: Trigger · WhatsApp — send message · Action steps · Sequences