How to use a bot in several channels
If one bot is published in several channels, it processes the data it gets in different ways. Depending on a particular channel, the bot uses different variables to process data, for example, information sent by the client.
In this case, you have to determine the channel type by placing a $channelType
system variable into the Conditions block:
Add the Conditions block when getting client data with the help of the
$rawRequest
system variable.Add a condition for each channel you have connected to your bot. For example, if you connect Telegram and VK, add the following conditions:
$channelType == "telegram"
$channelType == "vk"
For each channel, configure script branches.
Channel types
Possible values of the $channelType
system variable:
Channel | $channelType |
---|---|
Aimybox | zenbox |
Alice | yandex |
Bitrix24 | bitrix |
Chat API | chatapi |
Chat widget | chatwidget |
edna.chatCenter | threads |
Google Assistant | google |
JivoChat | incoming_jivosite |
LiveTex | inbound_livetex |
Marusia | marusia |
Microsoft Teams | azure |
Sber Salut | sber |
Telegram | telegram |
Telephony | resterisk |
Viber | viber |
VK | vk |
Vonage | nexmo |
Wazzup | wazzup |
Webim (External Bot API 2.0) | incoming_webim2 |
wechat | |
whatsapp | |
WhatsApp (via i-Digital) | i_digital |