OVERVIEW
Virtual Assistants
Kore.ai Platform
Key Concepts
Natural Language Processing (NLP)
Accessing Platform
VIRTUAL ASSISTANTS
Virtual Assistant Builder
Virtual Assistant Types
Getting Started
Creating a Simple Bot
SKILLS
Storyboard
Dialog Task
Introduction
Dialog Builder (New)
Dialog Builder (Legacy)
User Intent Node
Dialog Node
Entity Node
Supported Entity Types
Composite Entities
Supported Colors
Supported Company Names
Form Node
Logic Node
Message Nodes
Confirmation Nodes
Bot Action Node
Service Node
Custom Authentication
2-way SSL for Service nodes
Script Node
Agent Transfer Node
WebHook Node
Grouping Nodes
Connections & Transitions
Manage Dialogs
User Prompts
Knowledge Graph
Terminology
Building
Generation
Importing and Exporting
Analysis
Knowledge Extraction
Build
Alert Tasks
Introduction
Ignore Words and Field Memory
How to Schedule a Smart Alert
Small Talk
Digital Views
Overview
Configuring Digital Views
Digital Forms
Overview
How to Configure Digital Forms
NATURAL LANGUAGE
Overview
Machine Learning
Introduction
Model Validation
Fundamental Meaning
Introduction
NLP Guidelines
Knowledge Graph
Traits
Introduction
How to Use Traits
Ranking and Resolver
Advanced NLP Configurations
INTELLIGENCE
Overview
Context Management
Overview
Session and Context Variables
Context Object
How to Manage Context Switching
Manage Interruptions
Dialog Management
Sub-Intents & Follow-up Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Event Based Bot Actions
Default Conversations
Default Standard Responses
TEST & DEBUG
Talk to Bot
Utterance Testing
Batch Testing
Conversation Testing
CHANNELS
PUBLISH
ANALYZE
Overview
Dashboard
Custom Dashboard
Overview
How to Create Custom Dashboard
Conversation Flows
NLP Metrics
ADVANCED TOPICS
Universal Bots
Overview
Defining
Creating
Training
Customizing
Enabling Languages
Store
Smart Bots
Defining
koreUtil Libraries
SETTINGS
Authorization
Language Management
PII Settings
Variables
Functions
IVR Integration
General Settings
Management
Import & Export
Delete
Versioning
Collaborative Development
PLAN & USAGE
Overview
Usage Plans
Support Plans
Invoices
API GUIDE
API Overview
API List
API Collection
SDKs
SDK Overview
SDK Security
SDK App Registration
Web SDK Tutorial
Message Formatting and Templates
Mobile SDK Push Notification
Widget SDK Tutorial
Widget SDK – Message Formatting and Templates
Web Socket Connect & RTM
Using the BotKit SDK
Installing
Configuring
Events
Functions
BotKit SDK Tutorial – Agent Transfer
BotKit SDK Tutorial – Flight Search Sample Bot
Using an External NLP Engine
ADMINISTRATION
HOW TOs
Creating a Simple Bot
Creating a Banking Bot
Context Switching
Using Traits
Schedule a Smart Alert
Configure UI Forms
Add Form Data into Data Tables
Configuring Digital Views
Add Data to Data Tables
Update Data in Data Tables
Custom Dashboard
Custom Tags to filter Bot Metrics
Patterns for Intents & Entities
Build Knowledge Graph
Global Variables
Content Variables
Using Bot Functions
Configure Agent Transfer
Update Balance Task
Transfer Funds Task
RELEASE NOTES
  1. Docs
  2. Virtual Assistants
  3. How Tos
  4. How to Configure Panels & Widgets

How to Configure Panels & Widgets

In this How-To, we will explore a scenario in a Banking Bot, where with just one click user can view his/her account details. We will see how Widgets can be used to trigger Dialog Tasks and display appropriate messages and how Panel can be used to hold these Widgets.
We will also see how the Panel can be hosted on Web/Mobile Client using the Widget SDK.

For details on what Panels & Widgets are and how it is implemented in the Kore.ai Bots platform, refer here.

Problem Statement

Consider a Banking Bot trying to address the following scenarios:

This document gives a detailed step-by-step approach to achieving all the above-mentioned scenarios using – Panels, Widgets, Widget SDK and Web/Mobile Client.

Pre-requisites

  • Bot building knowledge
  • A Banking Bot with a dialog as mentioned below:
    • Get Balance – Dialog task prompting the user for their Account Number and Account Type and displaying the available balance in the account.

Configurations

Let us consider each of the following scenarios one by one:

  1. Dialog Task to display balance in a given account using Widget SDK channel.
  2. Widgets to trigger the above dialog task and a Panel set with the widgets.
  3. Panel to hold a widget displaying static JSON templace message.

Message Template

First, the Dialog task which would be triggered from the Widget should have a message definition for the Widget SDK channel.

We are using the following message to display the account details:

var output = 'The Balance in your' + context.entities.AccountType + ' account is ' + context.GetAccountBalance.response.body.Balance;
var message = {
    "elements": [
        {
            "title": "Account View",
            "sub_title": output,
            "icon": "https://kore.ai/wp-content/uploads/sites/22/banking-home.png",
        }
    ]
};
print(JSON.stringify(message));

Widgets Configuration

Dialog Task Widgets

We will be creating two Widgets to trigger a Dialog Task.

Current Account:

First, let us see how to configure a Widget to display balance from the current account of the user.

  • From the left navigation menu, under Bot Tasks open Panels & Widgets.
  • Click the Create Widget button.
  • Give a Widget Name and a Display Name.
  • Set the Source, we are triggering Dialog Task, hence select Dialog Task.
  • Select Dialog Task as Get Balance, as per our use case
  • In the Entity Assignment, set the following entities (you can select from the drop box that appears as you type) as per the Dialog Task requirement:
    • AccountType to current;
    • AccountNumber to 1.
      You can use the Open Dialog Task icon, next to the select Dialog Task drop down, to open the dialog and check the entities needed.

  • Save the widget.
  • Edit the widget and click Run & Preview to see the widget output.
  • Save as preview will set the output as the thumbnail against the widget.

Savings Account
Repeat the above steps for Account View from savings account of the same account number.

Panel Configuration

The Widgets thus created need to be attached to a Panel for runtime display and execution.

  1. Click the Create Panel button to create a Panel.
  2. In the New Panel widnow, enter Panel Name, Display Name and a URL for Icon.
  3. Click the Add Widget button to open the Panel Management window.
  4. Use the Add Widget to select and add the Widgets that we want to display, in this case Account Balance and Current Account widgets.
  5. Use the Test button to see the widgets in action.

Panel with JSON Widgets

We will see how to create Widgets with static JSON content. We will use a JSON to display a pie chart.

  1. Click on Create Panel to create a new panel and name it JSON Example.
  2. Use the more icon and select Panel Management, there you will find the option to Create Widget. Click on that.
  3. In the New Widget dialog, enter the Name, and set the source to JSON.
  4. Enter the following in the JavaScript Editor. This is a message template to display a pie chart with a break up for amounts spent under various heads like travel, food, and accommodation. For more on supported message templates, refer here.
    var message =
    {
          "templateType": "piechart",
          "pie_type": "regular",
          "title": "Summary",
          "description": "monthly report",
          "elements": [
            {
              "title": "Airlines",
              "value": "1264.0",
              "displayValue": "$ 1,234"
            },
            {
              "title": "Hotels",
              "value": "568.10",
              "displayValue": "$ 568"
            },
            {
              "title": "Food",
              "value": "324.50",
              "displayValue": "$ 324"
            }
          ]
        };
    print(JSON.stringify(message));
  5. Test the panel and you will see both the panel icons, click on each to see them in action.

Publish

To publish the Bot first enable channels:

  1. From left navigation menu, select Channel for publishing. For our use case we will select both Web/Mobile Client and Widget SDK channels.
  2. Select the channels and from Configurations tab, make a note of the Bot Name, Bot Id, Client Id and Client Secret.
  3. From left navigation menu, select Publish option. Under Tasks & languages section, ensure that the Widget and Panels we developed are selected for publication.
  4. Proceed with the Publish.

Hosting

We will be hosting the Panels in the web/mobile client. See here for more details on the Widget SDK usage.

  1. Download the Kore.ai Widget SDK, go to https://github.com/Koredotcom/web-kore-sdk, and then click Download.
  2. Extract all files to the …/SDKApp/sdk folder.
  3. Open the above SDK folder, and traverse to UI folder.
  4. Open the kore-config.js
  5. Configure your botOptions with the ‘web/mobile client’ channel configurations copied  in  above  section.
    • botOptions.botInfo
    • botOptions.clientId
    • botOptions.clientSecret

    Make other changes as per your requirements.

  6. Open the kore-widgets-config.js
  7. Configure your botOptionsWiz with the ‘Widget SDK’ channel configurations copied  in  above  section.
    • botOptionsWiz.botInfo
    • botOptionsWiz.clientId
    • botOptionsWiz.clientSecret

    Make other changes as per your requirements.

  8. Open the index_widgets_chat.html file in the browser and see the chat window along with the widgets.
  9. If you want to host the Panels individually use the index_widgets.html file. See the GitHub for hosting the same in your web site.
메뉴
Kore.ai Named a Leader in 2022 Gartner® Magic Quadrant™ for Enterprise Conversational AI PlatformsGet the Report