Loading

Custom Telegram bot as a single channel for sales and communication with customers

How to get a base for direct communication without the need to collect contacts

#Chatbots

Home / Lanet CLICK сases / Case: Custom Telegram bot as a single channel for sales and communication with customers
Input data

Client: portable equipment store in Kyiv

Term: 70 working hours

Problem: The client needed to create a bot in which you can not only communicate with managers but also receive notifications about all current news and promotions of the company, as well as be able to place new orders, view the status of current ones, leave a request to the service department, etc. The bot had to integrate with the current CRM infrastructure and third-party services, so ready-made solutions on the designer were not suitable.

alt text
List of works and results

some alt text

1. Coordination of the technical task with the client and formation of the bot structure. This is the main stage at which a detailed vision of the bot's capabilities, the structure of its interface and the list of necessary third-party integrations or scripts are formed. After that, a «map» of the bot structure is formed, according to which the code is then written.

In our case, this is a bot that was supposed to implement the following client functions:

- a menu for interacting with a manager, where you can place an order, find out information about it, or contact customer service via live chat or through step-by-step requests to a third-party CRM system

- a help section where you can get information on frequently asked questions

- a section with information about current bonuses with authorization by phone number

- buttons for going to individual sections of the site

some alt text
some alt text

Since this is a custom bot, it implements a system for creating and sending messages to bot subscribers, which can replace or supplement email, SMS, and Viber newsletters. The main advantage is that such communication is relatively free (in fact, the fee is only for the server), so you can make as many interactions as you need. This system also integrates the ability to download statistics of these messages for further segmentation.

Management of these functions is carried out in a separate custom menu, available only to users with special access.

Also, thanks to its own server, the bot has the ability to send trigger messages based on actions on the site or changes in the CRM system.

some alt text
some alt text

2. Selection of tools. The main core of any custom Telegram bot is the server on which it will run. Any Linux server, whether VPS or physical, is suitable for this.

Depending on the planned load, a dual-core server with 4 GB of RAM and 25 GB of disk space may be enough. Nginx is configured on the server to work with external APIs or using the WebHook protocol, as well as a MySQL database server on the same or a separate server to store bot data.

The bot code can be written in Python, PHP, JavaScript, R, Go, and many others. We recommend using Python as the simplest implementation option.

3. Directly writing the bot code in Python. In addition to the main bot, two-way APIs were additionally written for interaction with third-party manager chat services, and CRM systems with information about orders, bonuses, and the source of triggers.

4. Testing on our own test server to identify bugs and coordinating the texts of interface, messages, etc.

5. Deploying the bot on a prepared server with further testing in full-fledged use mode.

some alt text
some alt text

Using the bot as the main channel for direct online interaction with managers allowed us to increase its base by 30,000+ contacts in a year and create over 1,000 chats with managers. Now, these contacts can be used for segmented and mass promotions or informational mailings.

In addition, collecting phone numbers during authorization in the bot allows you to set up omnichannel interaction not only in Telegram but also in other communication channels.

Additionally, integrating triggers into the bot allows you to save money on SMS or Viber triggers, which are now not sent if the client is subscribed to the bot and can receive messages there.

List of works and results

1. Coordination of the technical task with the client and formation of the bot structure. This is the main stage at which a detailed vision of the bot's capabilities, the structure of its interface and the list of necessary third-party integrations or scripts are formed. After that, a «map» of the bot structure is formed, according to which the code is then written.

In our case, this is a bot that was supposed to implement the following client functions:

- a menu for interacting with a manager, where you can place an order, find out information about it, or contact customer service via live chat or through step-by-step requests to a third-party CRM system

- a help section where you can get information on frequently asked questions

- a section with information about current bonuses with authorization by phone number

- buttons for going to individual sections of the site

Since this is a custom bot, it implements a system for creating and sending messages to bot subscribers, which can replace or supplement email, SMS, and Viber newsletters. The main advantage is that such communication is relatively free (in fact, the fee is only for the server), so you can make as many interactions as you need. This system also integrates the ability to download statistics of these messages for further segmentation.

Management of these functions is carried out in a separate custom menu, available only to users with special access.

Also, thanks to its own server, the bot has the ability to send trigger messages based on actions on the site or changes in the CRM system.

2. Selection of tools. The main core of any custom Telegram bot is the server on which it will run. Any Linux server, whether VPS or physical, is suitable for this.

Depending on the planned load, a dual-core server with 4 GB of RAM and 25 GB of disk space may be enough. Nginx is configured on the server to work with external APIs or using the WebHook protocol, as well as a MySQL database server on the same or a separate server to store bot data.

The bot code can be written in Python, PHP, JavaScript, R, Go, and many others. We recommend using Python as the simplest implementation option.

3. Directly writing the bot code in Python. In addition to the main bot, two-way APIs were additionally written for interaction with third-party manager chat services, and CRM systems with information about orders, bonuses, and the source of triggers.

4. Testing on our own test server to identify bugs and coordinating the texts of interface, messages, etc.

5. Deploying the bot on a prepared server with further testing in full-fledged use mode.

Using the bot as the main channel for direct online interaction with managers allowed us to increase its base by 30,000+ contacts in a year and create over 1,000 chats with managers. Now, these contacts can be used for segmented and mass promotions or informational mailings.

In addition, collecting phone numbers during authorization in the bot allows you to set up omnichannel interaction not only in Telegram but also in other communication channels.

Additionally, integrating triggers into the bot allows you to save money on SMS or Viber triggers, which are now not sent if the client is subscribed to the bot and can receive messages there.

Conclusions
A custom Telegram bot is the best option for implementing a full-fledged communication channel with clients without the need for ongoing costs for various services. It provides the most flexible opportunities for integration into the current infrastructure and implementation of the necessary list of functions, including multilingualism.

Do you want the same?

Order an individual consultation to discuss your project!

Order