Telegram Bot
Connect a Telegram bot to let customers submit warranty claims through chat. The AI evaluates each claim and responds directly in the conversation — no support queue needed.
Prerequisites
- A W-Scrut account (sign up free)
- A Telegram account
Step 1 — Create a Telegram bot
Open Telegram and search for @BotFather. Send:
/start /newbot
Follow the prompts to choose a name (e.g. "Acme Returns") and username (e.g. acme_returns_bot). BotFather will give you a bot token like:
1234567890:AAGx-someRandomString_here
Step 2 — Add the token in W-Scrut
In your dashboard, navigate to Settings → Channels → Telegram Bot. Paste the token and click Save changes.
Step 3 — Register the webhook
Run this command once (replace the placeholders):
curl -X POST "https://api.telegram.org/bot<YOUR_TOKEN>/setWebhook" \
-H "Content-Type: application/json" \
-d '{
"url": "https://api.wscrut.silnt.in/webhooks/telegram/<YOUR_TENANT_ID>",
"allowed_updates": ["message", "callback_query"]
}'A successful response looks like:
{"ok": true, "result": true, "description": "Webhook was set"}Step 4 — Configure your return policy
W-Scrut uses your per-SKU policy to decide whether to approve, reject, or escalate each claim. See the Policy Configuration guide for the file format.
Customer conversation flow
Customer
/start
Bot
👋 Welcome to Acme Returns! Please describe the defect in your own words.
Customer
The sole split apart after one day of use.
Bot
📝 Got it! Now please send a clear photo of the damaged area.
Customer
[sends photo]
Bot
🔍 Analyzing your claim with AI... (15 seconds)
Bot
✅ Claim Approved! Your return for Ticket #42 has been verified. 🔗 Return Label: ...
Commands
| Command | Description |
|---|---|
/start | Begin a new warranty claim |
/cancel | Cancel the current claim process |