Skip to end of banner
Go to start of banner

How to configure сhatbots in x-bees

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This document explains how to configure chatbots in x-bees, integrating Webhook, AWS SQS, Dialogflow CX or OpenAI Assistant.

Developer documentation: https://docs.wildix.com/

Created: August 2024

Permalink:


Introduction

Chatbots are powerful tools for managing customer interactions, designed to efficiently handle a wide range of requests and tasks. You can integrate the following chatbots with x-bees:

  • Webhooks provide real-time communication by sending HTTP POST requests to a specified URL when certain events occur. This allows for immediate processing and response, making it ideal for time-sensitive interactions
  • AWS SQS offers a reliable and scalable solution for message queuing, ensuring that even high volumes of chat events are handled efficiently. It decouples the processing of events, allowing your chatbot to manage requests asynchronously and at scale
  • Dialogflow CX enhances the natural language understanding (NLU) of your chatbot, enabling complex and multi-turn conversations with users. This integration is well-suited for advanced dialog management and contextual responses
  • OpenAI Assistant brings sophisticated natural language processing (NLP) capabilities. This integration is ideal for creating more human-like and contextually aware interactions

Notes:

  • Chatbots with Webhook and AWS SQS only work in group conversations with more than 2 members

  • Chatbots with Dialogflow CX and OpenAI Assistant only work in 1-on-1 conversations

Bot creation

It is possible to set up to 50 chatbots per organization.

To create a chatbot, proceed with the following steps:

  • Navigate to WMS -> PBX -> Integrations -> Cloud integrations
     

  • Select Chat Bots and click Add new Chatbot


  • Enter a name for your chatbot
  • Upload a picture (optional)
  • Select the integration type for processing chat events:
    • Webhook
    • AWS SQS
    • Dialogflow CX
    • OpenAI Assistant
  • Enable Allow users to find the bot using search checkbox to let users interact with the bot

  • Click Add to save and activate your chatbot

Webhook

When configuring a Webhook as the integration type, you need to specify the following fields:

  1. Target:

    • Enter the URL that the Webhook will use to send POST requests

      This URL should be publicly accessible and secured with a valid HTTPS certificate. It should be designed to accept HTTP POST requests with JSON payloads and respond with status codes in the 200-299 range as quickly as possible.

      It's important to ensure that your Webhook endpoint can handle multiple identical calls in case of retries due to network or server failures. Chatbot platforms may attempt to redeliver event payloads up to 3 times if the initial delivery is unsuccessful.

  2. Secret:

    • The secret ensures that only requests from the Wildix system are accepted, preventing unauthorized access or potential security breaches. The secret key is included in the headers of each POST request sent by the Webhook. Your server should validate this key to ensure the request is legitimate before processing the event data
  3. After creating the bot, click on Manage API keys to create API key:

    • Click Create new API Key
    • Enter a name for identification
    • Click Create and copy the secret using the Click to reveal button

AWS SQS


When configuring AWS SQS as the integration type, you need to specify the following fields to establish the connection between x-bees and your AWS SQS queue:

  1. Target:

    • Enter the URL of your SQS queue. This is where the chat events are sent, for example, https://sqs.amazonaws.com/11111/wildix-events-queue
  2. Key:

    • Enter your AWS Access Key ID here. This key is used to sign the request that x-bees sends to AWS SQS
  3. Secret:

    • Enter your AWS Secret Access Key. This secret is paired with your AWS Key to securely sign the requests


  4. After creating the bot, click on Manage API keys to create API key:

    • Click Create new API Key
    • Enter a name for identification
    • Click Create and copy the secret using the Click to reveal button

Dialogflow CX


To configure Dialogflow CX as the integration type, you'll need to provide specific information to establish the connection between x-bees and your Dialogflow CX agent. The fields you need to fill in are as follows:

  1. Private Key:

    • Upload the private key file associated with your Google Cloud service account
  2. Location:

    • Enter the region where your Dialogflow CX agent is deployed. This is typically a region-specific identifier, for example, us-central1, europe-west1
  3. Language:

    • Specify the language that your Dialogflow CX agent will use to understand and respond to user inputs. The language code should match the languages supported by your Dialogflow CX agent, for example, en for English, es for Spanish
  4. Agent ID:

    • Enter the unique identifier of your Dialogflow CX agent. This ID links your x-bees chatbot to the specific Dialogflow CX agent that you’ve configured in Google Cloud

OpenAI Assistant

When configuring OpenAI Assistant as the integration type, you need to specify the following fields to enable the connection between x-bees and OpenAI's API:

  1. API Key:

    • The OpenAI API Key is a unique identifier that allows x-bees to authenticate with OpenAI's services. It grants access to the OpenAI API, enabling you to send requests and receive responses from the Assistant

      Requirements for API Key:

      • Resource: Threads
      • Restriction: write

      This means that to successfully use the OpenAI Assistant, your API key must have access to the "Threads" resource with write permissions. 

  2. Assistant ID:

    • The OpeAI Assistant ID s a unique identifier of a specific OpenAI Assistant you created. It is used to direct the chatbot's requests to the correct OpenAI Assistant

Bot application

Once you set up a bot, you can configure a website widget to enable customer interaction with the bot:

  1. Under your x-bees user settings, select Kite Settings and navigate to Website Widgets tab
  2. Select an existing widget or create a new one
  3. Under Create widget to, select A bot option and choose a specific bot from the list
  4. Click Save to apply the settings
  5. Embed the widget on your website



  • No labels