Quick start
Connect your Telegram bot and send your first notification in under 5 minutes.1
Create a bot with BotFather
Open @BotFather in Telegram, run
/newbot, and copy the bot token.2
Connect it to Shoppex
3
Share your deep link
The response includes a
deep_link_url. Share it with customers so they can opt in to notifications through Telegram.4
Send a broadcast
Once customers connect, you can send broadcasts, set up journeys, or enable the AI agent.
Bot response shape
When you connect a bot, Shoppex returns a grouped resource:Customer linking
Customers connect to your shop through the bot deep linkhttps://t.me/<bot_username>?start=shop:<shop_id>. Add context to the link for richer linking:
The bot response includes the merchant deep link pre-built under
connection.merchant_deep_link_url. It binds the Telegram chat to a Shoppex manager, so merchant-only agent flows route safely.
List linked users:
Notifications
Shoppex sends Telegram messages automatically for order confirmations, restock alerts, and promotional broadcasts. Each user’snotification_preferences object controls what they receive, and the defaults apply until you change them.
Update a single user:
Broadcasts
A broadcast sends a message to a filtered audience, right away or on a schedule. A broadcast request has three parts:URL buttons are automatically wrapped in Shoppex tracking links, so you get click-through rates and revenue attribution for free.
DRAFT → SCHEDULED → SENDING → COMPLETED / CANCELLED / FAILED.
For product-specific restocks, use the dedicated endpoint. Shoppex builds the message from the product data:
Saved segments
Save a repeated audience filter as a segment:audience.segment_ids: ["<segment_id>"]. Manage segments with GET, PUT, and DELETE on /dev/v1/telegram/bots/:botId/segments/:segmentId.
Analytics and click tracking
Shoppex tracks URL button clicks per broadcast and attributes completed orders back to the broadcast that drove them:- You send a broadcast with a product button.
- Shoppex rewrites the URL to a tracking link.
- The customer clicks, and Shoppex records the click before it redirects to the product page.
- If the customer completes an order inside the attribution window, the revenue counts back to that broadcast.
overview object reports:
Each entry in the
buttons array reports button_id, text, destination_url, unique_clicked_users, and click_count.
Track delivery and bot-level performance with:
GET /dev/v1/telegram/bots/:botId/broadcasts— list all broadcastsGET /dev/v1/telegram/bots/:botId/broadcasts/:id— a single broadcastGET /dev/v1/telegram/bots/:botId/broadcasts/:id/stats— delivery progressGET /dev/v1/telegram/bots/:botId/analytics— bot-level analytics
delivery: sent_count, failed_count, progress_percentage, estimated_time_remaining_seconds, and failure_reasons.
Journeys
Journeys are event-driven follow-up flows, such as a post-purchase drip or an abandoned-cart reminder. Shoppex sends each message on its own schedule, so you do not send them by hand.
Example post-purchase follow-up:
POST /dev/v1/telegram/bots/:botId/journeys/:journeyId/test.
Support commands and inbox
The bot doubles as a two-way support channel. Customer commands:
Merchant inbox endpoints:
GET /dev/v1/telegram/bots/:botId/inbox— list conversationsGET /dev/v1/telegram/bots/:botId/inbox/:conversationId— read a conversationPOST /dev/v1/telegram/bots/:botId/inbox/:conversationId/reply— send a replyPUT /dev/v1/telegram/bots/:botId/inbox/:conversationId/status— close or reopen
AI agent
The AI agent routes inbound Telegram messages through Shoppex commerce tools: product search, order lookup, coupon creation, and payment links.
Enable the agent:
calls, completed_calls, failed_calls, rate_limited_calls, conversations, total_tokens, estimated_cost_usd, average_response_time_ms, and last_run_at.
A customer asking “Do you have the hoodie in black?” gets a product search and a direct answer. A merchant saying “Create a 15% coupon for the hoodie” gets a coupon created through the Dev API. The estimated_cost_usd field tracks AI token costs, so there are no surprises on your bill.