# Operators in Telegram

> Link your company's group, then answer handed-off conversations in its topics, with shifts, work names and files.

Every conversation handed to a person becomes a topic in your company's own Telegram group. Operators answer right there, and the visitor reads the reply where they wrote from: the chat on your site or your own Telegram bot.

This page is about the group for operators. To let customers write to your own Telegram bot: [A Telegram bot for your customers](https://tolkly.io/docs/en/telegram-bot.md).

## Link the group
Only an owner or admin links the group, in the app under «Team and plan» › «Telegram».

1. In Telegram, create a group and turn on Topics (group settings → Topics).
2. Press «Get a link for the group». The link works once and only for a short time. «Get a new link» gives another.
3. Press «Open in Telegram» and choose that group. Our bot becomes an admin there that manages topics and deletes those of closed conversations.

The page updates by itself and shows «Linked to «…»». If the link does not open, add the bot to the group by hand, as an admin with «Manage topics» and «Delete messages». Then send the `/link` command the page shows into the group.

One group serves every project of the company. The bot writes in the group in the language your app was set to when you got the link.

## Each operator, once
1. **Sign in to the app with Telegram**, or connect Telegram on the account page. The bot knows operators by their Telegram account and their membership in your company, not by name. If anyone else writes in a topic, their message goes nowhere, and the bot asks them to sign in.
2. **Set a work name**: `/name Anna` (or on the account page, under «Work name»). That is the name visitors see. For pages in another language, add its form, as in `/name ru Анна`. By default, replies without a work name do not reach visitors. An owner or admin can change this on the team page, under «Work names»: one name for everyone, no name, or the account's own name.
3. **Start a shift**: `/shift on` ([Shifts](https://tolkly.io/docs/en/telegram.md#shift)).

`/name` and `/shift` work in the group and in a private chat with the bot. In a private chat they apply to every company you are a member of.

## A topic per conversation
When a conversation goes to people, the bot opens a topic and names it after the visitor's question. A card at the top of the topic shows:

- why it was handed over («Asked for a person», a topic of yours, «Sent a file the AI cannot see»…);
- the order number or transaction, if the visitor gave one;
- the question, what the AI answered and its sources;
- the whole conversation, folded;
- if your site said who the visitor is: their name, ID and fields, each marked verified or not. For a verified visitor, also links to their earlier topics ([Visitor identity](https://tolkly.io/docs/en/identity.md)).

The visitor's new messages arrive in the same topic. If the conversation goes to people again, its topic opens again with a new card.

## Closed topics
So the group keeps only live conversations, the bot deletes a closed conversation's topic 3 days after the close. The conversation stays in the [inbox](https://tolkly.io/docs/en/inbox.md). If the visitor writes again later, that is a new conversation with a new topic: its card links the earlier conversation and shows its last messages.

An owner or admin changes the delay on the company's «Telegram» page, under «Closed topics»: a day, 3, 7 or 30 days, or keep topics in the group. The bot needs the admin right «Delete messages» for this. Without it, the group's general topic and the page say so once.

## Answering
Write in the topic, and the visitor sees your reply in the chat. The card's buttons:

| Button | What it does |
|---|---|
| «Take» | The conversation is yours, and only you answer it. Replying in a waiting conversation takes it too |
| «Take over» | Takes a conversation a colleague holds |
| «Back to the bot» | The AI answers the visitor again; the topic closes |
| «Snooze» | For an answer that takes days. Pick a day, 3 days or a week: until then the conversation does not close by itself after a quiet day. When the time is up, the bot mentions whoever holds it in the topic. Press again to stop snoozing. The visitor sees nothing |
| «Close» | Ends the conversation. The topic closes, and the visitor is asked «Did we solve your question?» |

In the app, the same «Snooze» is in the conversation's «More actions» menu.

One person holds a conversation at a time, in the group and in the app alike. If you write in a conversation a colleague holds, your message does not reach the visitor, and the bot tells you so.

## Shifts
Tolkly cannot see who is online in Telegram, so it relies on shifts.

- If someone in your company is on shift, a handed-off visitor waits for an operator, even outside your working hours.
- If nobody is on shift, the chat asks the visitor to leave a contact. Outside your working hours it always does; within them, only if nobody has the inbox open in the app.

Send `/shift on` when you start and `/shift off` when you finish.

## Files
- A visitor's file comes into the topic as a photo or a document.
- A picture (PNG, JPEG, WebP, GIF, HEIC) or a PDF up to 10 MB that you post in the topic reaches the visitor as a file. Other files do not, and the bot says why.

## New domains
When the chat appears on a site for the first time, the bot posts about it in the group's general topic, not in a conversation's topic: «the chat appeared on brand38.shop», with a «Block» button. Only an owner or admin of the company can press it. More in [Domains and mirrors](https://tolkly.io/docs/en/domains.md).

The general topic also gets a message about each breakage, once per breakage:

- the chat has not been seen on your site for 7 days;
- the knowledge base could not be read again;
- `robots.txt` or your exclusions closed the home page.

From [Knowledge](https://tolkly.io/docs/en/knowledge.md), the same topic gets a mirror or a new site the domain rule found, and a run that waits for you.

## Unlink
The «Unlink» button on the company's «Telegram» page stops sending handed-off conversations to the group. Operators keep answering in the [inbox](https://tolkly.io/docs/en/inbox.md). You can link a group again at any time.

If someone removes the bot from the group, the page says «The bot was removed from the group on …» in red. Handed-off conversations wait in the inbox, and the owners and admins get an email. Link the group again on the same page.
