GETTING STARTED
Kore.ai XO Platform
Virtual Assistants Overview
Natural Language Processing (NLP)
Concepts and Terminology
Quick Start Guide
Accessing the Platform
Navigating the Kore.ai XO Platform
Building a Virtual Assistant
Help & Learning Resources
Release Notes
Current Major Version
Recent Updates
Previous Versions
Deprecations
Request a Feature
CONCEPTS
Design
Storyboard
Overview
FAQs
Conversation Designer
Overview
Dialog Tasks
Mock Scenes
Dialog Tasks
Overview
Navigate Dialog Tasks
Build Dialog Tasks
Node Types
Overview
Intent Node
Dialog Node
Entity Node
Form Node
Confirmation Node
Message Nodes
Logic Node
Bot Action Node
Service Node
Webhook Node
Script Node
Process Node
Agent Transfer
Node Connections
Node Connections Setup
Sub-Intent Scoping
Entity Types
Entity Rules
User Prompts or Messages
Voice Call Properties
Knowledge AI
Introduction
Knowledge Graph
Introduction
Build a Knowledge Graph
Manage FAQs
Knowledge Extraction
Import or Export Knowledge Graph
Prepare Data for Import
Importing Knowledge Graph
Exporting Knowledge Graph
Auto-Generate Knowledge Graph
Knowledge Graph Analysis
Answer from Documents
Alert Tasks
Small Talk
Digital Skills
Overview
Digital Forms
Digital Views
Introduction
Widgets
Panels
Session and Context Variables
Context Object
Intent Discovery
Train
NLP Optimization
ML Engine
Overview
Model Validation
FM Engine
KG Engine
Traits Engine
Ranking and Resolver
Training Validations
NLP Configurations
NLP Guidelines
LLM and Generative AI
Intelligence
Introduction
Event Handlers
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Conversation Driven Dialog Builder
Sentinment Management
Tone Analysis
Default Standard Responses
Ignore Words & Field Memory
Test & Debug
Overview
Talk to Bot
Utterance Testing
Batch Testing
Conversation Testing
Conversation Testing Overview
Create a Test Suite
Test Editor
Test Case Assertion
Test Case Execution Summary
Glossary
Health and Monitoring
NLP Health
Flow Health
Integrations
Actions
Actions Overview
Azure OpenAI
Overview
Templates
BambooHR
Overview
Templates
Freshdesk
Overview
Templates
Freshservice
Overview
Templates
HubSpot
Overview
Templates
JIRA
Overview
Templates
Microsoft Graph
Overview
Templates
Open AI
Overview
Templates
Salesforce
Overview
Templates
ServiceNow
Overview
Templates
Stripe
Overview
Templates
Twilio
Overview
Templates
Agents
Agent Transfer Overview
Custom (BotKit)
Drift
Genesys
Intercom
NiceInContact
Salesforce
ServiceNow
Unblu
External NLU Adapters
Overview
Dialogflow Engine
Test and Debug
Deploy
Channels
Publishing
Versioning
Analyze
Introduction
Dashboard Filters
Overview Dashboard
Conversations Dashboard
Users Dashboard
Performance Dashboard
Custom Dashboards
Introduction
Custom Meta Tags
Create Custom Dashboard
Create Custom Dashboard Filters
NLP Insights
Conversations History
Conversation Flows
Conversation Insights
Feedback Analytics
Usage Metrics
Containment Metrics
Universal Bots
Introduction
Universal Bot Definition
Universal Bot Creation
Training a Universal Bot
Universal Bot Customizations
Enabling Languages
Store
Manage Assistant
Plan & Usage
Overview
Usage Plans
Support Plans
Invoices
Authorization
Multilingual Virtual Assistants
Get Started
Supported Components & Features
Manage Languages
Manage Translation Services
Multiingual Virtual Assistant Behavior
Feedback Survey
Masking PII Details
Variables
Collections
IVR Settings
General Settings
Assistant Management
Manage Namespace
Data
Overview
Data Table
Table Views
App Definitions
Data as Service
HOW TOs
Build a Travel Planning Assistant
Travel Assistant Overview
Create a Travel Virtual Assistant
Design Conversation Skills
Create an ‘Update Booking’ Task
Create a Change Flight Task
Build a Knowledge Graph
Schedule a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Train the Assistant
Use Traits
Use Patterns
Manage Context Switching
Deploy the Assistant
Use Bot Functions
Use Content Variables
Use Global Variables
Use Web SDK
Build a Banking Assistant
Design Conversation Skills
Create a Sample Banking Assistant
Create a Transfer Funds Task
Create a Update Balance Task
Create a Knowledge Graph
Set Up a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Add Data to Data Tables
Update Data in Data Tables
Add Data from Digital Forms
Train the Assistant
Composite Entities
Use Traits
Use Patterns for Intents & Entities
Manage Context Switching
Deploy the Assistant
Configure an Agent Transfer
Use Assistant Functions
Use Content Variables
Use Global Variables
Intent Scoping using Group Node
Analyze the Assistant
Create a Custom Dashboard
Use Custom Meta Tags in Filters
Migrate External Bots
Google Dialogflow Bot
APIs & SDKs
API Reference
API Introduction
API List
API Collection
koreUtil Libraries
SDK Reference
SDK Introduction
SDK Security
SDK Registration
Web Socket Connect and RTM
Installing the BotKit SDK
Using the BotKit SDK
SDK Events
Tutorials
BotKit - Blue Prism
BotKit - Flight Search Sample VA
BotKit - Agent Transfer
Widget SDK Tutorial
Web SDK Tutorial
ADMINISTRATION
Introduction to Admin Console
Administration Dashboard
User Management
Add Users
Manage Groups
Manage Roles
Data Tables and Views
Assistant Management
Enrollment
Invite Users
Send Bulk Invites
Import User Data
Synchronize Users from AD
Security & Control
Using Single-Sign On (SSO)
Two-Factor Authentication (2FA)
Security Settings
Cloud Connector
Analytics
Billing
  1. Home
  2. Docs
  3. Virtual Assistants
  4. How Tos
  5. Configuring Custom Agent Integration

Configuring Custom Agent Integration

The Kore.ai XO Platform offers a Custom Integration using the BotKit to configure agent transfer integrations for any system.

NOTE: The Agent Transfer and BotKit features are moved from Deploy > Integrations menu to Build > Integrations > Agent Transfer menu. Kore.ai’s Botkit is now renamed to Custom Integration.

Custom Agent Transfer Integration refers to the process of integrating a custom-built agent (such as a virtual assistant) into a larger system or workflow. This typically involves connecting the agent to external APIs or databases and configuring it to interact with other systems or users in a specific way. The custom integration allows the custom agent to seamlessly interact with other components of the system and to provide a more complete and efficient solution for the end user.

This post provides the configuration steps to enable the Custom Agent integration. Use the configurations provided below as general guidelines as there could be some differences based on the version of the Intercom that you are using.

The source code for the Agent Transfer is available at Kore.ai GitHub repo: https://github.com/Koredotcom/BotKit.

Overview

Let’s understand how the custom agent can be integrated and how it can improve business processes by providing a more efficient and seamless user experience.

Prerequisites

  • A fully functional Bot (we will be using a Banking Bot).
  • Download BotKit SDK from Kore’s GitHub.
  • Download and Install the Node.js(version 10 or above). The BotKit SDK requires node.js to run on the same server where the SDK is installed.
    1. Go to https://nodejs.org/en/download/ and select your OS as a .pkg file type for Mac and .msi file type for Windows.
    2. In a Terminal window, run the node -v command to verify installation and version, for example, v6.10.2.
  • A test callback server application. We will be using NGROK from https://dl.equinox.io/ngrok/ngrok/stable to simulate the callback server application. Following are the steps to install NGROK:
    1. Open https://dl.equinox.io/ngrok/ngrok/stable.
    2. Download and install the ngrok file for your operating system.
      • To download NGROK on Windows:
        1. Download the zip file for your Windows machine 32-bit or 64-bit.
        2. Unzip and run the ngrok.exe file to install ngrok.
      • To download NGROK on mac:
        1. Press Command+Space, type Terminal, and press enter/return key.
        2. Run in Terminal app:
          ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null and press enter/return key.
          If the screen prompts you to enter a password, enter your Mac’s user password to continue. When you type the password, it won’t be displayed on the screen, but the system would accept it. So just type your password and press ENTER/RETURN key. Then wait for the command to finish.
        3. Run brew cask install ngrok.
  • A live agent software. We will be using LiveChatInc.com. You can use your LiveChat subscription or set up a free 30-day trial account at LiveChatInc.com by entering your business email in the Start using LiveChat now! Sign up and create an account.

Design and Configuration

  1. As a Bot developer, open Kore.ai Bot Builder – https://bots.kore.ai/botbuilder.
  2. Select the Bot for which Agent Transfer needs to be configured.
  3. Open or create a dialog task (Support Call Back) and add an Agent transfer node.
    .
  4. Enter a Name (LiveChat) and Description and Save.
  5. You will see a message ‘SDK is not currently configured/Subscribed. Please go to API Extensions to configure the SDK.’. For now ignore this message as we will see how to configure SDK later in this article.
  6. From the Bot Builder screen traverse to Build > Integrations > Agent Transfer.
  7. In the App Name section, select an existing app from the list or use the Create App option to create a new app.

    Note: The Bot ID Client ID and Client Secret keys.

  8. Enter the Callback URL of your application to be invoked by BotKIt SDK events. Since we are using NGROK we will show how to obtain the callback URL:
    1. In a Terminal Window, start ngrok to monitor port 8003 using the following command: ngrok http 8003.
    2. Copy ngrok forwarding URL. It will be in the format – http://XXXXXXaa.ngrok.io.
      .
    3. Use this forwarding URL as the call-back URL and save.
      Note: The forwarding URL changes whenever the ngrok is restarted. Make sure you make the changes to the callback URL every time ngrok is restarted.
  9. The agent transfer is configured at the dialog level. You can open the dialog task and open the agent transfer node to see that the configuration is saved, as shown below. You can select the Events required (see below for details)..
  10. Install any live agent software e.g. Livechat, Liveperson, Concentrix, Vayusphere, etc., depending on your enterprise requirement and license availability. Since we are using LiveChat, we will should you how to obtain the license details needed for Agent Transfer:
    1. Sign in to your LiveChat account.
    2. Go to Settings from the left navigation and select the chat link.
    3. Copy the URL and note the license code. If the URL is https://lc.chat/now/104xx297/ and then the license code is 104xx297.
  11. Open the downloaded BotKit SDK folder and do the following:
    • Edit livechatapi.js:
      1. Give the respective botId and botName of your bot, which you have copied earlier.
      2. This JS file contains 3 APIs of Kore – Initialization, Send Message and Get Message. If required, any new APIs written for human agent transfer should be put in here.
        Example: If connection closing is required, then close connection API written needs to go into livechatapi.js.
        .
    • Edit config.json.
      1. Client ID and Client Secret key, respective server ports running, and liveagent license of the third-party server goes here.
      2. Client Id, Client Secret can be copied from Events and Extensions – Agent Transfer.
      3. ngrok forwarding url can be copied from ngrok running instance. It is the call-back URL. This should be the URL entry.
      4. Liveagentlicense is the code given in the chatlink of livechat.

    • Edit LiveChat.js.
      • Give the respective botId and botName of your bot, which you have copied earlier, and save.
    • Edit app.js.
      1. Add the following line sdk.registerBot(require('./LiveChat.js')).
      2. Delete any existing sdk.registerBot statements, if not needed..

Execution

  1. Open a terminal window and run the BotKit SDK by entering the command:
    node app.js.
  2. Please make sure to install all the missing modules to run the server successfully without any errors as shown below.
    For example, if error “method url-template, node-schedule are missing” is shown, then install the above modules using the command.
    npm install <module-name> for windows and sudo npm install <module-name> for mac.
  3. ngrok and node.js server will be running in different terminals.
  4. When a user initiates the chat from the bot, the bot transfers the call to an agent and sends a message to the user.
  5. Agent receives a notification about this on the livechat.
  6. Now, the connection between the agent and the user has been established, and the conversation continues.

Events

Note: The events and methods required for sending messages from User, bot, and transferring to Agent are outlined in LiveChat.JS.

  1. on_user_message event is triggered when a user sends a message. This message is sent to the bot using the sendBotMessage method.
  2. on_bot_message is triggered when bot sends a message. This message is sent to the user using the SendUserMessage method.
  3. on_agent_transfer event is triggered when the service agentTransfer node is triggered in bot. This event connects to the agent using the connectToAgent method, which internally calls the initChat API.
  4. gethistory method gives the chat history of the user with the bot to the transferred agent.
  5. scheduleJob is run for every 5 secs, and it polls for the pending messages from the Agent, which internally calls the getPendingMessages.
  6. getPendingMessages gets all the pending messages from Agent and delivers it to the User.
  7. chat_closed gets triggered when the agent closes the chat with the user.
Menu