How to configure сhatbots in x-bees
This document provides instructions for configuring chatbots in x-bees, with integrations available for Webhooks, AWS SQS, Dialogflow CX, and OpenAI Assistant.
Developer documentation: https://docs.wildix.com/.
Created: August 2024
Permalink: https://wildix.atlassian.net/wiki/x/4APOAQ
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
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:
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.
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
- 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
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
You can configure a test Webhook bot using these instructions: https://docs.wildix.com/guides/2024/07/20/chatbot-simple/.
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:
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
Key:
- Enter your AWS Access Key ID here. This key is used to sign the request that x-bees sends to AWS SQS
Secret:
- Enter your AWS Secret Access Key. This secret is paired with your AWS Key to securely sign the requests
- Enter your AWS Secret Access Key. This secret is paired with your AWS Key to securely sign the requests
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:
Private Key:
- Upload the private key file associated with your Google Cloud service account
Location:
- Enter the region where your Dialogflow CX agent is deployed. This is typically a region-specific identifier, for example, us-central1, europe-west1
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
- 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,
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:
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
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:
- Under your x-bees user settings, select Kite Settings and navigate to Website Widgets tab
- Select an existing widget or create a new one
- Under Create widget to, select A bot option and choose a specific bot from the list
- Click Save to apply the settings
- Embed the widget on your website