Guide · WhatsApp
Connect WhatsApp to your agent
Your agent answers on your own WhatsApp Business number, through Meta’s WhatsApp Business Platform (Cloud API) and your own Meta app. You copy four values from Meta into Tansivo, and two from Tansivo back into Meta.
Before you start
- A Meta app at developers.facebook.com with the WhatsApp product added, and a number on it. Meta’s free test number works for trying it out, though it only delivers to the recipients you list on API Setup.
- An agent in your Tansivo workspace, with the documents it should answer from.
The four values from your Meta app
| Value | Where it is |
|---|---|
| Phone number ID | WhatsApp → API Setup. Not the phone number itself: Meta addresses numbers by this id. |
| WhatsApp Business Account ID | WhatsApp → API Setup. Recommended: with it, Tansivo subscribes your app to the account’s messages for you. |
| Access token | A permanent System User token, not the temporary one on API Setup, which expires in 24 hours. Business Settings → Users → System users: add one, assign it your app and WhatsApp account, then Generate token with whatsapp_business_messaging and whatsapp_business_management. |
| App secret | App settings → Basic → App secret, in the same app the token was generated for. It proves each message really came from Meta, and a secret from another app is refused. |
Steps
- In Tansivo, open Connectors, click Add more tools, and choose WhatsApp Business. Name the connection, choose the agent that answers, paste the four values, and connect. The token is checked with Meta first, and a token that is about to expire is flagged.
- In your Meta app, open WhatsApp → Configuration → Webhook → Edit. Paste the Callback URL and Verify token the connection shows you, then Verify and save.
- Still on Configuration, under Webhook fields, subscribe to messages.
- Back in Tansivo, press Check setup on the connection. It asks Meta whether the webhook points here and is subscribed to messages, and says what to fix if not.
- Send your number a WhatsApp message. The connection shows the time of the last message, and the conversation appears in your console.
Several numbers on one Meta app share its one webhook. Connect each to its own agent: every message is answered by the agent of the number it was sent to.
Keeping it working
- The access token and the app’s webhook are checked with Meta every 10 minutes. If either stops working, the connection says why and a banner appears on every console page.
- Replace an expired token with Update credentials. The callback URL stays the same, so nothing changes in Meta.
- Customers who wrote while it was broken are answered once it works again, if their message is under 23 hours old.
If messages are not answered
- Press Check setup. The two usual causes are a webhook verified but not subscribed to messages, and an app secret from a different app.
- Check the webhook is verified and subscribed to messages in your Meta app.
- Check the token is a permanent System User token, not the 24-hour one.
- Check your credit balance: with no credits left, messages are not answered, and the connection shows why.
What the agent does once connected, and what it costs: the WhatsApp AI agent. The longer version, with what each value is for: connect WhatsApp to an AI agent, and the two settings that stop it.