はじめに
対話型AIプラットフォーム
チャットボットの概要
自然言語処理(NLP)
ボットの概念と用語
クイックスタートガイド
プラットフォームへのアクセス
ボットビルダーの操作
リリースノート
最新バージョン(英語)
以前のバージョン(英語)
コンセプト
設計
ストーリーボード
ダイアログタスク
ダイアログタスクとは
ダイアログビルダー
ノードタイプ
インテントノード
ダイアログノード
エンティティノード
フォームノード
確認ノード
ロジックノード
ボットアクションノード
サービスノード
Webhookノード
スクリプトノード
グループノード
エージェント転送ノード
ユーザープロンプト
音声通話プロパティ
イベント ハンドラー
ナレッジグラフ
ナレッジグラフの抽出
ナレッジグラフの構築
ボットにナレッジグラフを追加
グラフの作成
ナレッジグラフの構築
既存のソースからFAQを構築
通知タスク
スモールトーク
デジタルスキル
デジタルフォーム
デジタルビュー
デジタルビューとは
パネル
ウィジェット
トレーニング
トレーニングとは
機械学習
機械学習とは
モデル検証
ファンダメンタルミーニング
ナレッジグラフ
示唆
ランキングおよび解決
NLPの詳細設定
NLPのガイドライン
インテリジェンス
インテリジェンスとは
コンテキスト
コンテキストインテント
割り込み
複数インテントの検出
エンティティの変更
デフォルトの会話
センチメント管理
トーン分析
テストとデバッグ
ボットと会話
発話テスト
バッチテスト
会話テスト
デプロイ
チャネル
公開
LLM and Generative AI
Introduction
LLM Integration
Kore.ai XO GPT Module
Prompts & Requests Library
Co-Pilot Features
Dynamic Conversations Features
分析
ボットの分析
NLPメトリクス
会話フロー
Usage Metrics
封じ込め測定
カスタムダッシュボード
カスタムダッシュボードとは
メタタグ
カスタムダッシュボードとウィジェット
ユニバーサルボット
ユニバーサルボットとは
ユニバーサルボットの定義
ユニバーサルボットの作成
ユニバーサルボットのトレーニング
ユニバーサルボットのカスタマイズ
他言語の有効化
ストア
プラントと使用
Overview
Usage Plans
Support Plans
Invoices
管理
ボット認証
複数言語対応ボット
個人を特定できる情報の編集
ボット変数の使用
IVRのシステム連携
一般設定
ボット管理
ハウツー
Integrations
Actions
Actions Overview
Asana
Configure
Templates
Azure OpenAI
Configure
Templates
BambooHR
Configure
Templates
Bitly
Configure
Templates
Confluence
Configure
Templates
DHL
Configure
Templates
Freshdesk
Configure
Templates
Freshservice
Configure
Templates
Google Maps
Configure
Templates
Here
Configure
Templates
HubSpot
Configure
Templates
JIRA
Configure
Templates
Microsoft Graph
Configure
Templates
Open AI
Configure
Templates
Salesforce
Configure
Templates
ServiceNow
Configure
Templates
Stripe
Configure
Templates
Shopify
Configure
Templates
Twilio
Configure
Templates
Zendesk
Configure
Templates
Agents
Agent Transfer Overview
Custom (BotKit)
Drift
Genesys
Intercom
NiceInContact
NiceInContact(User Hub)
Salesforce
ServiceNow
Configure Tokyo and Lower versions
Configure Utah and Higher versions
Unblu
External NLU Adapters
Overview
Dialogflow Engine
Test and Debug
会話スキルの設計
バンキングボットを作成
バンキングボット – 資金の振り替え
バンキングボット – 残高を更新
ナレッジグラフを構築
スマートアラートの予約方法
デジタルスキルの設計
デジタルフォームの設定方法
デジタルビューの設定方法
データテーブルのデータの追加方法
データテーブルのデータの更新方法
Add Data from Digital Forms
ボットのトレーニング
示唆の使用方法
インテントとエンティティのパターンの使用方法
コンテキスト切り替えの管理方法
ボットのデプロイ
エージェント転送の設定方法
ボット関数の使用方法
コンテンツ変数の使用方法
グローバル変数の使用方法
ボットの分析
カスタムダッシュボードの作成方法
カスタムタグを使ってフィルタリング
Data
Overview
Data Table
Table Views
App Definitions
Data as Service
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
Migrate External Bots
Google Dialogflow Bot
APIs & SDKs
API Reference
API Introduction
Rate Limits
API List
koreUtil Libraries
SDK Reference
SDK Introduction
Web SDK
How the Web SDK Works
SDK Security
SDK Registration
Web Socket Connect and RTM
Tutorials
Widget SDK Tutorial
Web SDK Tutorial
BotKit SDK
BotKit SDK Deployment Guide
Installing the BotKit SDK
Using the BotKit SDK
SDK Events
SDK Functions
Tutorials
BotKit - Blue Prism
BotKit - Flight Search Sample VA
BotKit - Agent Transfer
  1. ホーム
  2. Docs
  3. Virtual Assistants
  4. How Tos
  5. Travel Planing Assistant
  6. Travel VA: Configuring Agent Transfer

Travel VA: Configuring Agent Transfer

One of the frequently asked questions is how to transfer a conversation to a human agent from a Virtual Assistant. This is especially necessary if your VA is in the space of customer service. Virtual Assistants are not meant to completely replace humans. Many times the assistant will fail to answer satisfactorily or the user would just want to talk/conversation to a human from the beginning. When this happens the assistant should transfer the conversation to a human agent.

In this article, we will provide an overview of how we can integrate a live conversation into our VA using Kore.ai Agent Transfer. The source code for the Agent Transfer is available at Kore.ai github repo: https://github.com/Koredotcom/BotKit.

Note: The configuration and steps listed on this page are guidelines only. The steps may have changed due to the changes introduced in the recent version of the third-party products, apps, or services. Contact support if the steps are not working for you.

The Role of the Virtual Assistant

Apart from performing business functionality, our VA would also act as a proxy between the user and agent.

  • Bot/VA: The Virtual Assistant that the Users interact with.
  • Users: Users are the customers who would be using this VA.
  • Agent: Agents are humans who would converse with the users. Agents will also need a conversation window. For this we will use LivePerson / LiveChat software.

Prerequisites

  1. A fully functional VA. See an example Travel Planning Assistant here.
  2. Download BotKit SDK from Kore’s github.
  3. 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..
  4. 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.
      1. 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.
      2. On MacOS:
        1. Press Command+Space and 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, please enter your Mac’s user password to continue. When you type the password, it won’t be displayed on the screen, but the system will accept it. So just type your password and press the ENTER/RETURN key. Then wait for the command to finish.
        3. Run brew cask install ngrok.
  5. A live agent software. We will be using LiveChatInc.com. You can use your own LiveChat subscription or set up a free 30-day trial account at LiveChatInc.com by entering your business email in the Start using LiveChat!. Sign up and create an account.

Design and Configuration

  1. Open the Kore.ai XO Platform – https://bots.kore.ai/botbuilder
  2. Select the VA 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 (LiveAgent) 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 be showing how to configure SDK, later in this article.
  6. From the XO Platform screen go 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.
  8. Make a note of the Bot ID, Client ID and Client Secret keys.
  9. 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.


  10. 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. You can select the Events required.
  11. Install any live agent software eg 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 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.
  12. Open the downloaded BotKit SDK folder and do the following:
    1. Edit livechatapi.js.
      1. Give the respective botId and botName of your VA, which you have copied earlier.
      2. This JS file contains 3 API’s of Kore – Initialization, Send Message, Get Message. If required, any new API’s written for human agent transfer should be put in here.
        Example: If closing connection is required, then close connection api written needs to go into livechatapi.js
        .
    2. Edit config.json.
      1. Client ID, 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.

    3. Edit LiveChat.js
      1. Give the respective botId and botName, which you have copied earlier and save.

    4. 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 for running the server successfully without any errors as shown below.
    Example, if error “method url-template, node-schedule are missing” is shown, then install the above modules using command.
    npm install <module-name> for windows, 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 conversation from the VA, it transfers the call to an agent and sends a message to the user.
  5. An 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 the User or the VA and transferring to Agent are outlined in LiveChat.JS.
  1. on_user_message event is triggered when a user sends a message and this message is sent to the VA using sendBotMessage method.
  2. on_bot_message is triggered when the VA sends a message and this message is sent to the user using SendUserMessage method.
  3. on_agent_transfer event is triggered when the service agentTransfer node is triggered in the VA. And this event connects to the agent using connectToAgent method, which internally calls initconversationAPI.
  4. gethistory method, gives the conversation history of the user with the VA 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 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 conversation with the user.

Travel VA: Configuring Agent Transfer

One of the frequently asked questions is how to transfer a conversation to a human agent from a Virtual Assistant. This is especially necessary if your VA is in the space of customer service. Virtual Assistants are not meant to completely replace humans. Many times the assistant will fail to answer satisfactorily or the user would just want to talk/conversation to a human from the beginning. When this happens the assistant should transfer the conversation to a human agent.

In this article, we will provide an overview of how we can integrate a live conversation into our VA using Kore.ai Agent Transfer. The source code for the Agent Transfer is available at Kore.ai github repo: https://github.com/Koredotcom/BotKit.

Note: The configuration and steps listed on this page are guidelines only. The steps may have changed due to the changes introduced in the recent version of the third-party products, apps, or services. Contact support if the steps are not working for you.

The Role of the Virtual Assistant

Apart from performing business functionality, our VA would also act as a proxy between the user and agent.

  • Bot/VA: The Virtual Assistant that the Users interact with.
  • Users: Users are the customers who would be using this VA.
  • Agent: Agents are humans who would converse with the users. Agents will also need a conversation window. For this we will use LivePerson / LiveChat software.

Prerequisites

  1. A fully functional VA. See an example Travel Planning Assistant here.
  2. Download BotKit SDK from Kore’s github.
  3. 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..
  4. 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.
      1. 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.
      2. On MacOS:
        1. Press Command+Space and 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, please enter your Mac’s user password to continue. When you type the password, it won’t be displayed on the screen, but the system will accept it. So just type your password and press the ENTER/RETURN key. Then wait for the command to finish.
        3. Run brew cask install ngrok.
  5. A live agent software. We will be using LiveChatInc.com. You can use your own LiveChat subscription or set up a free 30-day trial account at LiveChatInc.com by entering your business email in the Start using LiveChat!. Sign up and create an account.

Design and Configuration

  1. Open the Kore.ai XO Platform – https://bots.kore.ai/botbuilder
  2. Select the VA 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 (LiveAgent) 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 be showing how to configure SDK, later in this article.
  6. From the XO Platform screen go 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.
  8. Make a note of the Bot ID, Client ID and Client Secret keys.
  9. 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.


  10. 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. You can select the Events required.
  11. Install any live agent software eg 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 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.
  12. Open the downloaded BotKit SDK folder and do the following:
    1. Edit livechatapi.js.
      1. Give the respective botId and botName of your VA, which you have copied earlier.
      2. This JS file contains 3 API’s of Kore – Initialization, Send Message, Get Message. If required, any new API’s written for human agent transfer should be put in here.
        Example: If closing connection is required, then close connection api written needs to go into livechatapi.js
        .
    2. Edit config.json.
      1. Client ID, 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.

    3. Edit LiveChat.js
      1. Give the respective botId and botName, which you have copied earlier and save.

    4. 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 for running the server successfully without any errors as shown below.
    Example, if error “method url-template, node-schedule are missing” is shown, then install the above modules using command.
    npm install <module-name> for windows, 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 conversation from the VA, it transfers the call to an agent and sends a message to the user.
  5. An 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 the User or the VA and transferring to Agent are outlined in LiveChat.JS.
  1. on_user_message event is triggered when a user sends a message and this message is sent to the VA using sendBotMessage method.
  2. on_bot_message is triggered when the VA sends a message and this message is sent to the user using SendUserMessage method.
  3. on_agent_transfer event is triggered when the service agentTransfer node is triggered in the VA. And this event connects to the agent using connectToAgent method, which internally calls initconversationAPI.
  4. gethistory method, gives the conversation history of the user with the VA 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 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 conversation with the user.
メニュー