TG-Staff 团队 avatar TG-Staff 团队

How to Generate TG Diversion Links: A Step-by-Step Tutorial for Creating and Binding Bots in the TG-Staff Console

tg-diversion-link Tutorial TG-Staff Diversion Link Telegram Bot

How to Generate TG Diversion Links? Step-by-Step Guide to Creating and Binding Bots in TG-Staff Console

When your Telegram Bot receives dozens or even hundreds of user messages daily, a real problem emerges: Where do these users come from? Are they from Google Ads campaigns or Twitter social media posts? Worse, during peak consultation times, users flood in, but agents don’t know who to handle first.

TG Diversion Link is a tool designed for these two scenarios. It is essentially a short link under the TG-Staff official domain (e.g., https://app.tg-staff.com/{code}). When users click it, their visitor information (IP, browser, URL parameters) is first captured, then they are automatically redirected to your Bot, where a human agent takes over. This way, you can both attribute ad sources and automatically divert traffic during consultation peaks.

This article will guide you step by step: how to create a diversion link in the TG-Staff console, bind it to a Bot, configure session diversion rules, and provide an actionable verification checklist.


Consider a typical scenario:

You run a cross-border customer service Bot, running ads on Google Ads and driving traffic from Twitter posts. Users click ads and enter the Bot to inquire about product prices. But your agents don’t know whether the user came from ads or social media, nor can they determine which channel has a higher conversion rate. Worse, if 5 users inquire simultaneously, agents can only handle them in order, which is inefficient.

The diversion link solves this by:

  1. Creating a unique diversion link for each channel (e.g., app.tg-staff.com/ad-google and app.tg-staff.com/twitter-post).
  2. User clicks the link → TG-Staff captures IP, User-Agent, URL parameters → User is redirected to Bot → Welcome message is triggered automatically → Human agent takes over.
  3. In the console’s user profile, you can see each user’s source channel, browser information, and even custom parameters (e.g., utm_source).

This way, you solve both “unknown user source” and “no one to handle peak queries” at once.


Before starting, ensure the following three points are met.

Check Plan Permissions

Diversion links are a feature of TG-Staff Standard Plan and above. You can try them during the free trial period (3 days), but after the trial ends, you need to subscribe to the Standard Plan (approx. 8.99/month) or Professional Plan (approx.16.99/month) to continue using them. For specific pricing, refer to the official pricing page.

Confirm Bot Is Connected to TG-Staff

In the console’s “Project Settings” page, ensure your Bot Token is correctly configured and the status shows Connected. If not yet connected, refer to the TG-Staff documentation to complete the Webhook configuration.

Tip: The diversion link is independent of the Bot Token

The diversion link is an independent short link generated by TG-Staff. No need to modify the Bot Token or BotFather settings. Just ensure the bot is connected to TG-Staff via Webhook.

Confirm Agent Account Creation

The distribution link ultimately assigns users to an agent. If you don’t have an agent account yet, first add at least one agent in Agent Management (the free version supports 3 agent slots). Otherwise, users may not be able to be handled manually after redirection.


Below are the complete steps. It’s recommended to follow along in the console.

  1. Log in to the TG-Staff Console.
  2. In the left project list, select the Bot project you want to configure.
  3. In the left menu bar, find “Distribution Links” and click to enter the management page.
  4. Click the “Create Distribution Link” button in the top-right corner.

In the creation popup, you need to fill in the following information:

FieldRequired/OptionalDescription
Link NameRequiredUsed for internal identification, visible only to you and agents, does not affect redirect behavior. It is recommended to name by channel, e.g., “Google Ads-2025Q1”
NotesOptionalCan record more information, such as campaign ID, launch time, budget, etc. For example, “Campaign ID: 123456, Budget $500”

After filling in, click “Generate”. The system will immediately return a short link in the format https://app.tg-staff.com/abc123. Click the Copy button to save it.


Here is a common misconception to clarify: The distribution link does not need to be “bound” inside the Bot.

You do not need to make any settings in BotFather or modify the Bot’s flow editor. The distribution link is an external traffic entry point. Once generated, it can be directly used in ads, social media, emails, and other channels. When users click the link, they will be automatically redirected to your Bot and trigger manual agent handling.

Note: Distribution Link ≠ Bot Command

A distribution link is an external traffic entry point, not a Bot internal command. No configuration is needed in BotFather or the flow editor. Once generated, the link is ready to use directly.

For example: you can directly place a diversion link in your Google Ads copy. When users click it, their information is captured first, then they are redirected to the bot. Or you can insert a diversion link in a Twitter post, and followers who click it will automatically enter a customer service conversation.


Configure Session Diversion Rules to Truly “Distribute” Users to Agents

The diversion link itself is just a “springboard”; what truly determines which agent a user is assigned to is the session diversion rule. If the rules are not configured properly, users may end up queuing indefinitely or be assigned to an unsuitable agent.

In the console, go to “Project Settings” → “Session Diversion” to configure the two core options below.

Set the Diversion Mode: Round Robin vs. Online First

ModeHow It WorksUse Case
Round Robin (default)Polls authorized agents in order, each agent receives new users sequentially. For example, agents A, B, C: user1→A, user2→B, user3→C, user4→A…Balanced load, suitable for teams with consistent agent workload
Online FirstPrioritizes currently online agents. If all agents are offline, it falls back to round robin.Instant response scenarios, e.g., you want users to get an immediate reply rather than waiting for an offline agent to come online

Choose the mode based on your team’s scheduling. If agents work in shifts, “Round Robin” is recommended; if agents are online sporadically but in variable numbers, “Online First” is recommended.

Specify the Eligible Agent Scope

By default, all agents in the project can handle users from diversion links. But if you want certain high-value channels (e.g., VIP customer ads) to be handled only by senior agents, you can configure here:

  • All Agents: Every agent can handle them.
  • Specified Agents: Only selected agent groups or individual agents can handle them.

Recommendation: Start with “All Agents” initially, then refine by channel value as your team grows.


After configuration, don’t go live immediately. Run a full verification using the checklist below.

  1. Test the link in an incognito browser: Open an incognito window (to avoid cache interference) and click the diversion link. Confirm the page redirects properly to your bot.
  2. Confirm the session appears in the console: After redirection, you should see a new session in the “Online Sessions” list, with the user name being the Telegram account you just tested.
  3. Check if user profile captured information: Enter the user profile for that session, and confirm the IP address, User-Agent, and URL parameters (if any) have been recorded.
  4. Check if diversion rules are effective: If you configured “Online First”, ensure online agents immediately receive the session; if you configured “Specified Agents”, confirm only those agents can see the session.
  5. Test distribution when multiple agents are online: Have two agents log in simultaneously, then use multiple Telegram accounts to click the diversion link. Check that each session is assigned to different agents according to the rules (round robin or online first).

FAQ

Q: What user information can the diversion link track?

A: The diversion link automatically captures the visitor’s IP address, browser type (User-Agent), and any custom parameters carried in the URL (such as utm_source, utm_campaign) before redirecting to the bot. This information is recorded in the user profile for ad attribution analysis.

Q: Can one bot create multiple diversion links?

A: Yes. TG-Staff supports creating multiple diversion links for the same bot project, each with its own name and notes to distinguish different channels (e.g., Google Ads, Twitter, Email Campaign, etc.).

Q: Do diversion links have an expiration date? Will they expire?

A: Diversion links generated by TG-Staff are valid permanently unless manually deleted by the user in the console. The only case where a link becomes invalid is if the bot project is deleted or the subscription expires without renewal.

Q: Can I use diversion links during the free trial?

A: Yes. During the 3-day free trial after registration, all standard features (including diversion links) are fully functional. After the trial ends, you need to subscribe to the Standard plan or above to continue using them.

Q: Do diversion links support opening directly from WeChat or a web browser?

A: Diversion links are short links under TG-Staff’s official domain (e.g., https://app.tg-staff.com/{code}) and only support opening within the Telegram client to redirect to the target bot. If a user clicks the link in a browser, they will be prompted to open it in Telegram. It is recommended to use them only for traffic generation within the Telegram ecosystem.


Now you know how to generate TG diversion links and configure them to truly work. If you haven’t started using TG-Staff yet, you can register for a 3-day free trial, add your bot project, and follow this tutorial to create your first diversion link. If you encounter any issues, feel free to contact customer service bot @tgstaff_robot or refer to the official documentation.