Getting started
Connect your channels
reply-chain has two roles. The internal channel is your Telegram back-office, where enquiry briefs and the Quote / Take over / Decline buttons live. A customer channel — Telegram, WhatsApp, or both — is where the AI talks to customers. Connect the internal channel plus at least one customer channel.
How channels are split
On /settings the setup wizard has two channel stages:
| Stage | Role | Required? |
|---|---|---|
| Operator→ Internal channel | Your back-office. Enquiry briefs, action buttons, and per-customer topics all land here. Always Telegram. | Required |
| Customer channels | Where customers chat with the AI. Telegram customer bot and/or WhatsApp. | At least one |
1. Internal channel (Telegram)
The internal channel is a Telegram group with Topics enabled (a forum supergroup), plus a bot you promote to admin. New enquiries open a topic per customer; the briefs and Quote / Take over / Decline buttons post there.
- In BotFather, create a bot for internal use and copy its token, e.g.
987654:XYZ…. - In Telegram, create a group — not a channel; only groups support topics.
- Open the group settings and turn on Topics. This converts it to a forum supergroup. Converting changes the chat ID, so do it before you read the ID.
- Add your internal bot to the group and promote it to admin with Manage Topics.
Finding the internal chat ID
Open the group in web.telegram.org and read the address bar — the ID is the -100… value in the URL:
https://web.telegram.org/a/#-1001234567890Alternatively, send any message in the group and open this URL with your internal bot token:
https://api.telegram.org/bot<INTERNAL_BOT_TOKEN>/getUpdatesThe ID is at result[0].message.chat.id — a negative number starting -100. Paste the internal bot token and chat ID into the Operator stage and Save. reply-chain registers the internal webhook for you.
2. Customer channel — Telegram
The simplest customer channel: a second Telegram bot that customers message directly.
- In BotFather, create a second bot and copy its token, e.g.
123456:ABC-DEF…. - Paste it into the Telegram customer bot token field on the Customer channels stage.
- Save. reply-chain registers this bot's webhook automatically — no manual API calls.
3. Customer channel — WhatsApp
WhatsApp runs on the Meta WhatsApp Cloud API. You bring your own Meta app and paste its credentials — reply-chain routes each operator's webhook by a private per-operator token.
Get your Meta credentials
In the Meta for Developers console, create (or open) an app with the WhatsApp product added, then collect:
| Field | Where to find it |
|---|---|
| Phone number ID | WhatsApp → API Setup. The numeric ID of your sending number. |
| Access token | A permanent System User token with whatsapp_business_messaging. (Temporary tokens expire in 24h — use a permanent one for production.) |
| App secret | App settings → Basic → App Secret. Secures the inbound webhook signature. |
| WABA ID (optional) | Your WhatsApp Business Account ID. Informational. |
Paste these into the WhatsApp block on the Customer channels stage and Save. Saving a complete set mints a webhook callback URL and verify token, shown right below the form.
Point Meta at your webhook
Unlike Telegram, Meta's webhook is configured in your Meta app — it is not auto-registered. After saving, copy the two values reply-chain shows and, in your Meta app under WhatsApp → Configuration, set:
| Meta field | Value |
|---|---|
| Callback URL | https://your-app/api/whatsapp/webhook/<token> — copied from the form. |
| Verify token | The token string shown beside the callback URL. |
Click Verify and save in Meta, then subscribe the app to the messagesfield. The same token answers Meta's verification challenge and secures the callback URL.
What happens on save
Each stage Save does the wiring for you:
- Persists the channel credentials against your operator record.
- For Telegram bots, generates the secret webhook token and registers the webhook with Telegram.
- For a complete WhatsApp set, mints the callback URL + verify token you paste into Meta.
You activate once the internal channel and at least one customer channel are connected. Persistent failures are covered in Troubleshooting.