# Telegram Customer Service Bot

{% hint style="success" %}
**Free Trial of Two‑Way Forwarding / Customer‑Service Bot**

Online trial steps:

{% stepper %}
{% step %}

#### Chat with the bot and send any message [@ForwardHubBOT](https://t.me/ForwardHubBOT)

* At this moment, in the conversation with the bot, <mark style="color:orange;">your role is a customer/user</mark>, sending messages to support.
  {% endstep %}

{% step %}

#### Join the group [@ForwardHubBotGroup](https://t.me/ForwardHubBotGroup)

* Right‑click the bot‑forwarded message in the group → **Reply**, and enter any content to reply;
* The bot will send your quoted reply in the group back to the customer/user as a private message;
* At this moment, in the group, <mark style="color:red;">your role is a support agent</mark>.
  {% endstep %}
  {% endstepper %}
  {% endhint %}

{% hint style="success" %}

#### Introduction to the Telegram Customer‑Service Bot <a href="#telegram-bot-intro" id="telegram-bot-intro"></a>

The Telegram customer‑service bot is **free forever**! It’s a great alternative to products like *livegram*.

Unlike [https://docs.nextcli.com/cloud/telegram-bot/telegram-group-management-bot](https://docs.nextcli.com/cloud/telegram-bot/telegram-group-management-bot "mention") and [https://docs.nextcli.com/cloud/telegram-bot/cryptocurrency-notification-bot](https://docs.nextcli.com/cloud/telegram-bot/cryptocurrency-notification-bot "mention"), this bot is designed to provide a **unified external support entry point** for individuals/companies/organizations/teams that are **two‑way messaging restricted** in Telegram!

Main capability: forward a user’s conversation with the bot to a specified **person** or **group**.

Main scenarios:

* ✅ A unified support account for a company/organization/team (multiple agents can reply to the forwarded customer messages in the group via quoted replies — convenient for shift handover and multi‑agent collaboration);
* ✅ For organizations/teams that want to **hide personal Telegram identities**.
  {% endhint %}

#### 🌟 Workflow of Two‑Way Forwarding / Customer‑Service Bot <a href="#workflow" id="workflow"></a>

<figure><img src="https://content.gitbook.com/content/0yNh555AjPkX6RVfxM67/blobs/cy0TYhtqRt5tevDoYZWf/Telegram%E5%AE%A2%E6%9C%8D%E6%9C%BA%E5%99%A8%E4%BA%BA%20by%20NextCLi.png" alt=""><figcaption><p>Telegram bot forwarding workflow (click to enlarge)</p></figcaption></figure>

{% hint style="success" %}

#### <mark style="color:purple;">Highlight Features</mark> <a href="#highlight-features" id="highlight-features"></a>

We proudly call it the <mark style="color:red;">**strongest support bot**</mark> — fully supports all Telegram message formats and **quote/reply chains** both ways! It also supports **two‑way message deletion**!

All these innovations come from our 5+ years of hands‑on experience operating Telegram forwarding‑style support.

1. **Support every message/resource type**

   1. Supports every message/resource type available on Telegram Desktop and Mobile Apps.
   2. Including: Text, Photos/Videos, Documents, Polls, Location, Wallet, Emoji (including Telegram Premium Emoji), Stickers, GIFs.
   3. Also supports almost all file formats like zip/rar/mp3/mp4/screen‑recorded videos, etc.

2. **Quoted replies and preserved quote chains**

   1. Supports quoted replies and preserves quote chains in both directions.
   2. Example: If user A sends *Text‑1* then replies by quoting that message with *Text‑B*, the BOT side will show that user A quoted *Text‑1* and replied *Text‑B*. Quotes from the support side are mirrored back to the user.

3. **Shows message edits**

   1. If user A sends *Text‑1* and later edits it to *Text‑A1*, the BOT will quote the original *Text‑1* and display the edited content *Text‑A1*.

4. **Two‑way deletion**

   1. Delete messages the support side sent to the user.
   2. Delete messages the user sent to the BOT, and the message will also be deleted on the user side.
   3. Delete **all** two‑way conversation history between the user and the support BOT.

5. Standalone send when quote missing

   1. If a message has no valid quote chain (e.g., the user deleted the referenced message on their side), the system will **attempt to send as a new standalone message**.

6. **Edited messages displayed with quote**

   1. When the user edits an already‑sent message, the support side will display the edited version using a quote.

7. **Attempt fallback when referenced message deleted**

   1. If the user has deleted the referenced message when the support tries to reply, the BOT will attempt a standalone send and return **success/failure status**.

8. **`/send` command (no quote)**

   1. Support the `/send message` command to send a message to the user **without quoting** previous context.

9. **Broadcast to all users**

   1. **Broadcast to all**: Send a message to **all users** who have ever chatted with the BOT (except those who blocked it).

10. **And more**
    1. And more… try it yourself!
       {% endhint %}

{% tabs fullWidth="false" %}
{% tab title="How to Use" %}
{% stepper %}
{% step %}

#### Create a BOT <a href="#step1" id="step1"></a>

Chat with [@BotFather](https://t.me/BotFather), send `/newbot` to create a new BOT, or use `/mybot` to pick an existing one. Get the API Token (example): 506853588:AAFr81Dfz2ZpMxAQpfMXGHAXM\_7Qo\_h\_xUX
{% endstep %}

{% step %}

#### Add the BOT in Cloud Platform <a href="#step2" id="step2"></a>

Add the BOT token here: [Cloud Platform – Customer‑Service BOT](https://cloud.nextcli.com/bot/csb/bot)

Set **Forward‑to Chat ID** to a **personal ID** or a **group ID** (see below).
{% endstep %}

{% step %}

#### Configure where the BOT forwards messages (to a person or to a group) <a href="#step3" id="step3"></a>

**Single‑Agent Mode**

When a customer chats with the BOT, the BOT forwards messages to the admin’s personal chat.

[<mark style="color:purple;">**Single‑Agent Tutorial >>**</mark>](#dan-ke-fu-pei-zhi-jiao-cheng)

**Multi‑Agent Mode**

* When a customer chats with the BOT, the BOT forwards messages to a **group**. Any group member can quote‑reply the forwarded customer message, and the BOT will relay it back to the user.
* You need to add your BOT to the group, set it as **Administrator**, and grant **all** admin permissions.
* In the group, use `/id` to get the **current Group ID** (⚠️Note: switching a private group to public may cause a [Group ID change](https://docs.nextcli.com/cloud/telegram-bot/telegram-customer-service-bot#note); please update it in the Cloud console in time).

[<mark style="color:purple;">**Multi‑Agent Tutorial >>**</mark>](#duo-ke-fu-pei-zhi-jiao-cheng)
{% endstep %}
{% endstepper %}

#### How to Get Chat ID <a href="#get-chatid" id="get-chatid"></a>

**Single‑Agent Mode: Personal ID**

Use your personal Telegram account to chat with the BOT, then send `/id` to retrieve it.

**Multi‑Agent Mode: Group ID**

After adding your BOT into a group, send `/id` to retrieve the **Group ID**.
{% endtab %}

{% tab title="Single‑Agent Tutorial" %}
**Introduction**

In single‑agent mode, the BOT forwards the customer’s messages to the **admin’s personal chat**.

**Configuration**

* Chat with [@BotFather](https://t.me/BotFather), send **`/newbot`** to create a bot, or **`/mybot`** to manage tokens, e.g., `506853588:AAFr81Dfz2ZpMxAQpfMXGHAXM_7Qo_h_xUX`
* On the [Add BOT](https://cloud.nextcli.com/bot/csb/bot) page, fill/edit the BOT Token. Set **Forward‑to Chat ID**. If you don’t have it yet, you can skip it for now.
* After saving the token, the Cloud platform takes over the BOT. Use your Telegram account to chat with the BOT and send **`/id`** to get your own **personal ID** (messages will be forwarded to your personal account). Then go back to the [Cloud Console](https://cloud.nextcli.com/bot/csb/bot) and fill it in **Forward‑to Chat ID**.

Done! From now on, the conversation between the customer and the BOT will be forwarded to the **admin’s personal chat**.

**Test**

* Customer simulation: send a message “123” to the BOT — the BOT forwards it to yourself.
* Support simulation: quote the forwarded customer message “123” and reply “456” — the BOT relays “456” to the customer (still yourself).

You can also test with another Telegram account for a more realistic flow.

**Notes**

You can clear the conversation history at any time, but **do not stop or block** the BOT.
{% endtab %}

{% tab title="Multi‑Agent Tutorial" %}
**Introduction**

In multi‑agent mode, the BOT forwards messages to a **group**. Anyone in the group can quote‑reply the forwarded customer message, and the BOT will relay it to the customer.

This enables scenarios like **support/tech/owner** co‑working in the same group, shift handovers, and transparent progress tracking.

**Configuration**

* Chat with [@BotFather](https://t.me/BotFather), send **`/newbot`** to create a bot, or **`/mybot`** to manage tokens, e.g., `506853588:AAFr81Dfz2ZpMxAQpfMXGHAXM_7Qo_h_xUX`
* On the [Add BOT](https://cloud.nextcli.com/bot/csb/bot) page, fill/edit the BOT Token. Set **Forward‑to Chat ID**. If you don’t have it yet, you can skip it for now.
* Create a **private group**, and add the support BOT into the group.
* Send **`/id`** to get the group ID, then go back to the [Cloud Console](https://cloud.nextcli.com/bot/csb/bot) and fill it in **Forward‑to Chat ID**.

Recommendation: set the group option “Can new members see chat history” to **Visible** so you can **copy message links** in the future (e.g., <https://t.me/nextcli/20>)

Done! From now on, the conversation between the customer and the BOT will be forwarded to the **group**.

**Test**

* Customer simulation: send a message “123” to the BOT — it will be forwarded to the group.
* Support simulation: quote the forwarded message “123” and reply “456” — the BOT relays “456” to the customer.

You can also test with another Telegram account for a more realistic flow.

**Notes**

You can clear the conversation history at any time, but **do not stop or block** the BOT.
{% endtab %}
{% endtabs %}

<table><thead><tr><th width="237.6953125">Command</th><th>Description</th></tr></thead><tbody><tr><td>/id</td><td><strong>Get Chat ID</strong> — can be used in a group or in private with the BOT</td></tr><tr><td>/ban</td><td>Ban a user: quote the user’s forwarded message and reply with /ban to block the user from chatting with the BOT</td></tr><tr><td>/unban</td><td>Unban a user: quote the user’s forwarded message and reply with /unban to allow chatting again</td></tr><tr><td>/send</td><td>Send a message to the user without quoting context</td></tr><tr><td>/delete</td><td>Two‑way delete the quoted message: quote a message and reply /delete to delete on both sides</td></tr><tr><td>/deleteall</td><td>Two‑way delete all conversation history with the user: quote a user message and reply /deleteall to delete all chats between the user and the BOT</td></tr><tr><td>More commands coming! 😊</td><td></td></tr></tbody></table>

{% hint style="info" %}

#### ⚠️ Important: Group IDs can change! <a href="#note" id="note"></a>

Changing group type can change the Group ID. If the BOT still forwards to the **old** ID, messages won’t reach the group.

1. If the group is created as **private**, its Group ID is usually short, e.g., **-4731660548** (not recommended);
2. After enabling “**history visible to new members**” or converting to a **public group** (careful: public groups expose messages via @username), the Group ID becomes longer, e.g., **-1002649557645** (recommended).

**Pre‑setup suggestion**

* After creating the group, first switch **Group Type** to **Public**, then back to **Private** — the Group ID will become **-10…** and remain stable.
* Once set to **Public**, new messages allow “**Copy Message Link**” for later sharing/locating.
* Recommend enabling **History visible to new members** (default is Hidden).
  {% endhint %}

For questions or feature requests, please contact [<mark style="color:purple;">**@NextCLiCloudBOT**</mark>](https://t.me/NextCLiCloudBOT)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nextcli.com/en/cloud/telegram-bot/telegram-customer-service-bot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
