Connect WhatsApp to an AI agent: what to copy, and the two settings that stop it
Connecting a WhatsApp Business number takes four values from your Meta app and two from Tansivo. This walks through each screen, shows what every value looks like, and points out the one switch that leaves a number connected, verified and silent.
Before you start
- A Meta app at developers.facebook.com with the WhatsApp product added, and a number on Meta’s Cloud API. Meta’s free test number is enough to try it out, though it only delivers to the recipients you list on API Setup.
- Admin access to the business that owns the app, in Business Settings, to create a permanent token.
- An agent in your Tansivo workspace, with the documents it should answer from.
Everything you will copy
Most of Meta’s ids are long numbers that look alike, so this is the list to check against. The numbers match the marks in the pictures below.
| Value | What it looks like | Where it is |
|---|---|---|
| 1Phone number ID | 15 or 16 digits, like 1234567890123456. Not your phone number. | Meta: WhatsApp › API Setup |
| 2WhatsApp Business Account ID | 15 or 16 digits, like 109876543210987 | Meta: WhatsApp › API Setup |
| 3Access token | Starts with EAA, usually about 200 letters and digits | Meta: Business Settings › System users |
| 4App secret | 32 characters, only 0 to 9 and a to f | Meta: App settings › Basic |
| 5Callback URL | https://tansivo.com/whatsapp/webhook/ then 32 characters | Tansivo: the connection’s Setup |
| 6Verify token | 32 random letters, digits, - and _ | Tansivo: the connection’s Setup |
Step 1: the phone number ID and account ID
In your Meta app, open WhatsApp › API Setup and choose your number under From. Underneath it are the two ids you need. The phone number itself is not one of them, and neither is the temporary token on this page: it stops working after 24 hours, and replies stop with it.
Step 2: a permanent access token
Open Business Settings › Users › System users. Add a system user if there is none, then use Assign assets to give it your app and your WhatsApp account, with full control. Then choose Generate new token.
Step 3: the app secret, from the same app
Back in your app, open App settings › Basic and choose Show beside the app secret. It has to be this app’s: the one you picked when generating the token. A business with several apps can easily copy the wrong one, and then every message Meta sends looks forged and is turned away. Tansivo checks this when you connect, and tells you which app the secret should come from.
Step 4: paste the four values into Tansivo
In Tansivo, open Connectors, choose Add more tools, then WhatsApp Business. Give the number a name, choose the agent that answers it, and paste values 1 to 4. Tansivo asks Meta about the number before saving anything, so a mistyped id or a token without access comes back straight away.
Step 5: give Meta the callback URL and verify token
The new connection shows two values under Setup. Copy them into your Meta app, under WhatsApp › Configuration: edit the webhook, paste both, and choose Verify and save. Meta calls the address once to check it answers. The callback URL stays the same afterwards, even when you replace the token.
Step 6: subscribe to messages, the step most often missed
Verifying only proves the address works. Meta sends a message there only for the webhook fields the app is subscribed to, and a new app starts subscribed to none. On the same Configuration page, under Webhook fields, subscribe to messages. Skip this and everything above looks right, Meta reports no error, and the agent never hears from your customers.
Step 7: check it, then send a message
Back on the connection in Tansivo, press Check setup. It asks Meta, there and then, whether the token works, whether the secret is the app’s, whether the webhook points at this connection and is subscribed to messages, and whether your WhatsApp account is subscribed to the app. Anything wrong is said in a sentence, with where to fix it. Then send your number a WhatsApp message.
The same check runs every 10 minutes. If something stops working later, the connection says why, and a banner appears across the console.
Several numbers on one Meta app
A Meta app has a single WhatsApp webhook, so every number on the app sends its messages to the same address. You can still give each number its own agent: each message is answered by the agent of the number it was sent to, from that number. A message for a number that is not one of yours on the same app is ignored.
What the agent can do once messages arrive
- Answer questions about your products, prices and policies from the documents you give it, at any hour, reading the conversation so far rather than each message on its own.
- Understand voice notes, photos, videos and PDF, Word or Excel files a customer sends, and answer a burst of messages with one reply.
- Book appointments in your Google Calendar, only within the booking hours you set for it, and change the booking rather than add a second one when the customer gives a new time or their email.
- Add each enquiry as a row in a Google Sheet, or look a customer up in one.
- Tell your team in a Slack channel when someone needs a person.
- Send a Stripe payment link for one of the items you have priced, and check whether it has been paid.
WhatsApp’s own rules still apply: the agent replies to people who have written to you, within 24 hours of their last message, and never starts a conversation. A plain reply is usually 1 credit, and a new workspace starts with 100 free credits.
The same steps without the pictures are in the WhatsApp setup guide, and what the agent does on WhatsApp is on the WhatsApp AI agent page.