Skip to main content

Webim External Bot API 2.0

tip
Webim is an online consulting platform. Multiple channels can be used for communication: chat on the site, messengers, social media, chatbots, mobile applications and others. The platform also integrates with CRM and HelpDesk systems.

Webim on JAICP can be connected as either an inbound or an outbound channel. Connection of the Webim External Bot API 2.0 channel is covered in this article. Bots can be enabled via External Bot API 2.0 for this channel.

Webim External Bot API 2.0 configuration

Sign in to the Webim platform as administrator. Click Settings → Bots in the control panel.

Start creating your new bot by specifying the following:

  • Bot agent — select the agent to assign the bot to. We recommend creating separate agents for bots.
  • Bot type — select Smart bot
  • Sort order — defines the position of the bot in the bot list. The lower the number, the higher the priority.
  • Status — select bot status.
  • Version — select version 2.
  • External API reference — specify https://example.com. You will need to replace this link after you connect the channel on JAICP.

Click Save. Copy the authorization token: you will need it when you create your channel in JAICP.

Creating a channel

Click Channels → Inbound → Connect channel on the control panel. Select Webim (External Bot API 2.0) under Others.

Fill out the following fields:

  • Name — specify a name for the channel or keep the default one.
  • Access token — paste the previously copied token.
  • Email — specify the email address of the Webim service administrator account.
  • Password — specify the password of the Webim service administrator account.
tip
Administrator account credentials are only required to retrieve the list of agents.
  • Domain — specify the domain where the Webim service is being deployed. E.g., for https://examplecom.webim.ru the domain is examplecom.
  • Whether to send /start at the start of a conversation  — when enabled, the bot starts a conversation without waiting for a message from the client.
  • Branch — specify the project branch you want to deploy into the channel (master by default). You can also select a Git tag or enter a specific commit hash.
  • Deployment — select Automatic (whenever any change made to the project is saved) or Manual (using the Deploy button in the channel description line).
caution
You have to deploy a script before starting the bot. At this stage, the system builds the bot, checks the script syntax, and performs tests.

Click Create. Wait for a pop-up window with the deploy result to appear.

API Endpoint is generated after the channel is created. Open the channel for editing and copy the API Endpoint value. Then return to Webim and open the bot for editing. Replace the value of the External API reference with the API Endpoint you have copied.

Testing a bot

Open the bot dialog window in the connected messenger and send a welcome/activating phrase to it according to your script. Then a dialog with your bot should start.