Telegram for Business

Functions

Telegram for business enables the bot to respond on behalf of the user in private messages. Users who wrote to your personal account will follow the bot scenario that you enabled in the settings.

Telegram for business is available only to Premium users.

The components that work when you send private messages via the Telegram for business function are marked with a special Telegram Business icon.

When you use Buttons in Telegram Business, only Transition to the external URL will work. Other functions for buttons are not available in Telegram Business.

The bot will be able to respond on your behalf if the chat is active less than a day.

Setup

1. Open your Telegram account settings and go to Telegram Business.

2. Scroll down and open the ChatBots tab.

3. Add a bot that will respond to messages instead of you.

If you reconnect the bot to your account, Botmother will perceive the customers of this business chat who wrote before as new clients, since Telegram will replace the business chat ID

4. Select the chats where the bot will respond or add exception chats where the bot will not respond.

In the permissions for the bot, leave the Reply to messages setting active.

5. Click Done.

6. Go to the BotFather bot and send the /mybots command.

7. Select the bot that you want to connect to the Telegram for Business function from the list.

8. Click the Bot Settings button.

9. Then click Business mode.

10. Activate the function by clicking Turn On.

Done.

Send messages

The user can write from a regular account without the Premium function but the user who receives messages must setup Premium and Telegram for business for successful work.

After you send the message, a pinned notification that the bot has access to the messages will appear in your chat. By clicking the STOP button, you can interrupt dialogue with the bot.

Using the Recipient id field, you can address components to specific users. A business ID must be specified to send components to business chats.

Events for Telegram Business

Telegram Business Connected

Telegram Business Connected event is triggered when the bot connects to Telegram Business in the Telegram settings.

The event comes to the Telegram chat of the bot that was connected to Telegram Business.

Set up the event

1. Add and name the event in the settings of the bot that you are going to connect to Telegram Business.

2. In Type, select Telegram Business is enabled.

3. In Action, select the screen that will come to the bot after Telegram Business is enabled.

4. Save the changes

Telegram Business Disconnected

Telegram Business Disconnected event is triggered when the bot is disconnected from Telegram Business in the Telegram settings.

The event comes to the Telegram chat of the bot which was disconnected from Telegram Business.

Set up the event

1. Add and name the event in the settings of the bot that you are going to disconnect from Telegram Business.

2. In Type, select Telegram Business is disabled.

3. In Action, select the screen that will come to the bot after Telegram Business is disabled.

4. Save the changes.

Telegram Business messages have been deleted

The event Telegram Business messages have been deleted is triggered by deleting the message from the business chat.

If the event has been set up, and you or your interlocutor deletes the message, the components from the screen of the event selected in the settings will be executed into the chat.

Set up the event

1. Add and name the event.

2. In Type, select Messages in Telegram Business were deleted.

3. In Action, select the screen that will come to the chat if the message is deleted.

4. Save the changes.

Telegram Business message has been updated

Telegram Business Message has been updated event is triggered by editing a message from a business chat.

If the event has been set up, and you or your interlocutor edits the message, the components from the screen of the event selected in the settings will be executed into the chat.

Set up the event

1. Add and name the event.

2. In Type, select Telegram Business Message has been updated.

3. In Action, select the screen that will come to the chat in case of editing the message.

4. Save the changes.

Telegram Business Preferences

Telegram Business Preferences event is triggered when you click on the bot settings in the business chat.

The event comes to a bot that is connected to Telegram Business.

The components that can be used to control the bot should be added to the screen where the event will come to. For example, you can add buttons for changing the language, switching to paid sections of the bot, etc.

Set up the event

1. Add an event and give it a name.

2. In Type, select Telegram Business Preferences.

3. If necessary, add a variable to Properties. The ID of the user will be recorded to the variable. The event must have been triggered in the chat with this user.

4. In Action, select the screen that will appear when the event is triggered.

5. Save the changes.

Native request for Telegram Business

Telegram for Business supports Native request with the following methods:

If you need Native Request to work for a specific user, add the business_connection_id parameter with this user ID to Request Body.

Here there is an example of such a Request Body with the SendMessage method:

{
"business_connection_id": "123456789",
"text": "Greetings from the bot!"
}

In this case, 123456789 is the ID of the user the message will be sent to

If a Native request should work for everyone who reaches the screen with Native request via a business chat, you don’t need the business_connection_id parameter:

{
"text": "Greetings from the bot!"
}

To the beginning ↑