Skip to main content

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:

  1. Add the Conditions block when getting client data with the help of the $rawRequest system variable.

  2. 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"
  3. For each channel, configure script branches.

Channel types

Possible values of the $channelType system variable:

Channel$channelType
Aimyboxzenbox
Aliceyandex
Bitrix24bitrix
Chat APIchatapi
Chat widgetchatwidget
edna.chatCenterthreads
JivoChatincoming_jivosite
LiveTexinbound_livetex
Marusiamarusia
Microsoft Teamsazure
Sber Salutsber
Telegramtelegram
Telephonyresterisk
Viberviber
VKvk
Vonagenexmo
Wazzupwazzup
Webim (External Bot API 2.0)incoming_webim2
WeChatwechat
WhatsAppwhatsapp
WhatsApp (via i-Digital)i_digital