Table of contents
Official Content
  • This documentation is valid for:

Once you have created your first Flow in Globant Enterprise AI following the steps in How to create a Flow, you might want to integrate it with different communication platforms, including B2Chat, to manage agent overflow scenarios (Human-in-the-Loop).

Here is a step-by-step guide on how to connect a Flow through B2Chat.

Step 1: Get a username and password from B2Chat

Go to the URL https://app.b2chat.io and log in.

In the menu on the left, click on General Setting and then select Integrations.

HowToConnectFlowB2Chat_png

After accessing the Integrations section, select BotApi. There you will see the values corresponding to the username and password you will need.
HowToConnectFlowB2Chat1_png

Step 2: Create an application key

  1. Access the Flow you wish to expose. In the Side Navigation Menu, select Configuration and then Application Keys.
  2. Click on the Generate Key button.
    FlowInWeb
  3. In the Type field, select API and in Key Name, enter a name such as "B2ChatIntegration". Next, confirm the operation by clicking on Save.
    ConnectFlowB2Chat6_png
  4. Copy the generated key using the copy icon next to the key.
    ConnectFlowB2Chat7_png

Step 3: Get the Bot id

Go to the Side Navigation Menu, and click on the Overview option in the Overview section.

There you will see a summary of the Flow including the Bot id, along with other details such as the Flow's name and purpose.

The Bot id is the alphanumeric identifier that appears below the name of your Flow.

Capturadepantalla2024-09-24114736_png

Copy the Bot id.

Step 4: Configure the flow

Access the Side Navigation Menu > Configuration > Integrations > B2Chat and fill in the required data:

  • Endpoint: It is the B2Chat URL https://api.b2chat.io
  • B2Chat webhook: B2Chat uses this URL to answer messages and reach the bot. The URL format is:
    https://botbuilder.fluentlab.ai/fluentlab/b2chat/<bot-id>?x-api-key=<api>
    • <bot-id>: This is the identifier you obtained in Step 3: Get the Bot id
    • <api>: This is the application key you generated in Step 2: Create an application key.
  • B2Chat username
  • B2Chat password

Step 5: Configure interactions

Once you have configured B2Chat, click on Flow. When doing so, you will notice that now there is a new space available called B2Chat in the Interactions Section:

HowToConnectFlowB2Chat2_png

To create a basic agent escalation flow, you must drag the B2Chat Resolver component into the flow. This component is key because escalation to a human agent will take place at the point where it is inserted.
HowToConnectFlowB2Chat3_png

Step 6: Testing

To test the connection to B2Chat, use the Playground or one of the methods available in Flow (such as Run Flow, Open Testing Assistant, or Go to Demo Page).

HowToConnectFlowB2Chat4_20241230145424_1_png

Once the flow reaches the B2Chat Resolver, escalation to the human agent will take place. Then, in the B2Chat console, the conversation will appear in the "Chats" tab, and the agent will be able to respond from there.

For the conversation to end in the B2Chat console, the agent must click on "Close". By doing so, the flow will continue to run and activate the next nodes according to the selected configuration.

Last update: March 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant