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 chat widget and Facebook, add the following conditions:
    • $channelType === "chatwidget"
    • $channelType === "facebook"
  3. For each channel, configure script branches.

Channel types

Possible values of the $channelType system variable:

Channel$channelType
Chat APIchatapi
Chat widgetchatwidget
Facebookfacebook
Instagraminstagram
JivoChatincoming_jivosite
Microsoft Teamsazure
Telegramtelegram
Telephonyresterisk
Viberviber
Vonagenexmo
WeChatwechat
WhatsAppwhatsapp