Telegram
XCALLY section | Plugins → Telegram |
On this page |
Overview
XCALLY Motion allows you to integrate Telegram Messenger as a New Channel through the Open Channel module.
Customer can send and receive direct messages from your Telegram Official Account.
Agent receive incoming messages in a dedicated Telegram Queue and can reply directly from the XCALLY Motion GUI.
Requirements
The XCALLY Motion instance must have a public address accessible via HTTPS. For security reasons we strongly recommend to use a Reverse Proxy
Access to a Telegram account
If your XCALLY service is hosted behind a firewall then please make sure that the HTTPS port is able to accept incoming requests from Telegram webhook server as described below (Configuring your firewall).
Telegram Account Configuration
The Telegram account must be configured creating a service (bot) and enabling its integration with XCALLY Motion. See the below steps:
Open your Telegram and find bots app: https://t.me/botfather
Type as message /newbot to create a new bot
Choose a name for your bot
Choose a username for your bot. It must end in bot.
Save the BOT token to access the HTTP API. We will need it to setup the Telegram plugin.
XCALLY Configuration
This section explains how to install and configure the XCALLY Motion Telegram Plugin interface, allowing your agents to interact with Telegram users.
To perform this configuration, you must log in to XCALLY Motion as an Admin.
1. Setup Telegram Account
Access the Open Channel Accounts section, under Open Channel menu
Create a new Open Channel Account clicking on the Add button
Fill the below fields:
Name: choose a name for your Telegram Account
Key: enter a specif key (it must different for each channel)
Reply URL:
http://localhost:3262/sendMessageThis URL is going to be used by Open Channel to answer to the interactions.List: Choose the List where the new contacts will be saved in the Contacts Manager. If a contact is already present in the List, the new interaction will be associated and reported in the Customer Journey.
Description: (Optional) Describe to which bot the channel is associate (for example, bot_sales or bot_support).
Find the Telegram Account, that you have just created, in the list of Openchannel Accounts
Click on the three dots button next to the Telegram account and select Edit.
Check the information and complete the Telegram Account configuration.
On the top of the screen, you can see the ID Account (the number that follows the # ).
Save the Open Channel Account ID – This will be required later during the Telegram plugin configuration.
Save the Token from the Advanced settings – This token is also needed for the Telegram plugin setup.
2. Setup Telegram Queue
To enable agents to receive notifications from the Telegram account and manage interactions, you must configure a specific Queue.
Create a new Open Channel Queue for Telegram.
Add agents or teams to the Telegram Queue.
Associate the Telegram Queue with the corresponding Telegram Account.
Please refer to the Open Channel Queues documentation.
3. Generate API Key
Plugins, such as Telegram, are connected to XCALLY Motion using the API Key.
To generate the API Key:
Go to the Staff section
Open the Users section
Select the User account of interest and press on the three dots button to Edit it.
Click on the API Key Manager Icon:
Generate the API KEY. If the API KEY has been already generated, you just need to copy it.
Copy the API Key. This will be required later during the Telegram plugin configuration.
4. Upload the Plugin to XCALLY
XCALLY Motion does not support two or more identical plugins, concurrently active. For more information, please contact us via Support Portal.
Follow the below steps to upload a new plugin:
Download the Telegram Plugin zip file: https://repository.xenialab.com/repository/plugins/telegram-plugin/telegram-plugin-v2.3.1.zip
Open the App Zone section → Plugins
Upload the Telegram Plugin clicking the plus button, choosing the zip file and clicking on Finish
After the upload, you will find the plugin in the list of the uploaded App Zone Plugins
To Install the plugin, click on the three dots button next to the plugin and click Install
Click on the three dots button next to the plugin and click Edit plugin.
In the Sidebar field, select how and to whom this integration should be displayed in the menu. (default value: Admin Only)
5. Configure the Plugin
To configure the Plugin for Telegram:
Access the Plugins section and select Telegram Openchannel.
Fill and check the fields:
Webhook (XCALLY Motion Omnichannel): http://localhost:9000/api/openchannel/accounts/ID-CHANNEL/notify , where the 'ID_CHANNEL' is the Openchannel Account ID previously saved (id number without # )
Admin user API Key: Insert the API Key previously saved
Plugin port: Choose a different port for each plugin
XCALLY Motion public URL: Enter the public XCALLY Motion URL
Proxy token: If necessary, insert the proxy token
Telegram Bot Token: Insert the Telegram token previously saved
Unsupported type of message text: Message that appears to your Customers in case of unsupported message
Message to show in case of network errors: Message that appears to your Agents in case of network fail
Message to show to the agent in case of failed upload: Message that appears to your Agents in case of file upload fail
Show custom reply keyboard for buttons: Show a reply keyboard for the buttons list instead of the buttons inside of the message
Remove custom reply keyboard on agent reply: Removes the reply keyboard created by the buttons list when the agent replies with a standard text
After the changes, remember to Restart the Plugin:
Go to the App Zone section
Find the Telegram plugin and click on the three dots button next to the plugin
Choose the Restart command.
The Telegram Integration is ready to be used!
Agent experience
The following screenshot illustrates the communication between:
Telegram User – Sends messages to the Telegram Bot you created.
Agent – Manages and replies to these messages directly from the XCALLY Omnidesktop Interface.
Note that:
The Integration allows you to exchange text or attachments. Each message could transfer a text message or a file a time.
File >20 MB are not allowed, due to Telegram’s bot limitations.
Telegram supports only PDF and ZIP files. DOC, DOCX, TXT are not supported, unless included in a zipped file.
MP3 and MP4 are supported, WAV format is blocked by Telegram.
Animated GIF are transformed into static picture. GIF can be sent by Customers as file and the Agents receive a MP4 file.
PNG images sent by Customers are converted into JPG format: PNG transparent parts are shown in black (color).
DDL, EXE, SH files sent by Customers are blocked by XCALLY Motion for safety reason.
Debugging and Troubleshooting
All of the log files for Telegram Messenger plugin events are available at:
/var/log/xcally/openchannel-interactions-combined.yyyy-mm-dd.log
/var/log/xcally/telegram-plugin-plugin.pm2.log