GETTING STARTED
Kore.ai XO Platform
Virtual Assistants Overview
Natural Language Processing (NLP)
Concepts and Terminology
Quick Start Guide
Accessing the Platform
Working with the Builder
Building a Virtual Assistant
Using Workspaces
Release Notes
Current Version
Previous Versions
Deprecations

CONCEPTS
Design
Storyboard
Dialog Tasks
Overview
Dialog Builder
Node Types
Intent Node
Dialog Node
Entity Node
Form Node
Confirmation Node
Message Nodes
Logic Node
Bot Action Node
Service Node
Webhook Node
Script Node
Group Node
Agent Transfer
User Prompts
Voice Call Properties
Dialog Task Management
Connections & Transitions
Component Transition
Context Object
Event Handlers
Knowledge Graph
Introduction
Knowledge Extraction
Build Knowledge Graph
Add Knowledge Graph to Bot
Create the Graph
Build Knowledge Graph
Add FAQs
Run a Task
Build FAQs from an Existing Source
Traits, Synonyms, and Stop Words
Manage Variable Namespaces
Update
Move Question and Answers Between Nodes
Edit and Delete Terms
Edit Questions and Responses
Knowledge Graph Training
Knowledge Graph Analysis
Knowledge Graph Import and Export
Importing Knowledge Graph
Exporting Knowledge Graph
Creating a Knowledge Graph
From a CSV File
From a JSON file
Auto-Generate Knowledge Graph
Alert Tasks
Small Talk
Digital Skills
Digital Forms
Views
Introduction
Panels
Widgets
Feedback Survey
Train
Introduction
ML Engine
Introduction
Model Validation
FM Engine
KG Engine
Traits Engine
Ranking and Resolver
NLP Configurations
NLP Guidelines
Intelligence
Introduction
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Sentinment Management
Tone Analysis
Test & Debug
Talk to Bot
Utterence Testing
Batch Testing
Conversation Testing
Deploy
Channels
Publish
Analyze
Introduction
Conversations Dashboard
Performance Dashboard
Custom Dashboards
Introduction
Meta Tags
Dashboards and Widgets
Conversations History
Conversation Flows
Feedback Analytics
NLP Metrics
Containment Metrics
Usage Metrics
Smart Bots
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
Masking PII Details
Variables
IVR Settings
General Settings
Assistant Management
Data Table
Table Views
App Definitions
Sharing Data Tables or Views

HOW TOs
Build a Flight Status 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
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
Web SDK Tutorial
Widget SDK Tutorial
Analyze the Assistant
Create a Custom Dashboard
Use Custom Meta Tags in Filters

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
Using the BotKit SDK
BotKit SDK Tutorial - Blue Prism

ADMINISTRATION
Introduction
Assistant Admin Console
Administration Dashboard
User Management
Add Users
Manage Groups
Manage Roles
Assistant Management
Enrollment
Invite Users
Send Bulk Invites
Import User Data
Synchronize Users from AD
Security & Compliance
Using Single-Sign On
Security Settings
Cloud Connector
Analytics
Billing
  1. Home
  2. Docs
  3. Virtual Assistants
  4. Channel Enablement
  5. Adding the Unblu Channel9 min read

Adding the Unblu Channel9 min read

Unblu is a Conversational Platform for Financial Services.

To setup Unblu as a channel, you will need to create an External Integration bot in Unblu, create a ‘Named Area’ and map this Named Area to your Kore.ai bot.

Channel Integration

Step 1: Create a Named Area

Named Areas in Unblu are used to identify the origins of the chat requests from your website. The Kore.ai bot should be associated with a Named Area to ensure that it responds to users only when the chat has originated from the sections of your website associated with this Named Area. This mapping is optional if you are enabling the Unblu channel for a single kore.ai bot alone. 

  1. Login to your Unblu Account Administration.
  2. Under the Named Areas module, select the ‘New named area’ option.
  3. Provide all the requested information.
  4. Make a note of the name of the Named Area you have created.

Step 2: Create Unblu Bot

A bot should be created in your Unblu account for integrating it with your current Kore.ai bot.

The Unblu Bot can be directly created from the Kore.ai Bots Platform.

  1. Create or Open the bot in the Kore.ai platform.
  2. From the left navigation menu, select Channels option.
  3. On the Channels page, click on Unblu to enable the same for the bot.
  4. Proceed to the Configurations tab and provide the following details for creating a bot in your Unblu account:
    • Unblu Host URL -the URL of your Unblu application. For example, use https://www.unblu.com/ for the Unblu cloud.
    • Unblu Account UsernameProvide your Unblu account username.
    • Unblu Account Password – Provide the password associated with your Unblu username.
    • Unblu Bot Name – Provide a name you would like to use for your Unblu bot
    • Unblu Bot DescriptionProvide a short description of your Unblu bot
    • Bot Person – Provide a Name to represent the Unblu bot to your users
    • Secret Key – Provide a confidential key to secure the communication between Unblu and Kore.ai bots
    • Named Area – Provide the Named Area you would like to associate with your Kore.ai bot. Kore.ai will respond only to the user chats that have originated in the Named Area that you have selected here. This field is optional if you are enabling Unblu channel for a single kore.ai bot alone. 
  5. Enable the channel.

Additional Instructions

For the seamless exchange of information from Unblu to Kore.ai, a few additional steps need to be performed.
For a detailed document on the implementation, refer here.

  • The host URL where the Unblu SDK would be hosted needs to be added to the Domain section of your Unblu Account.
  • From your Unblu Account, API Keys section, make a note of the API Key.
  • Configure the Unblu SDK to give access to Kore.ai Bot, following the steps given below.
  • Open the Unblu SDK HTML file. Ensure that the following attributes are set:
    • In the <head> the meta tag should look thus: <meta name="unblu:named-area" content="<your-namedArea-Id>" /> This is the named area that you created in Step 1 above.
    • Script tag to populate the visitor information needs point to the Unblu host: <script src="<your-unblu-host>/unblu/js-api/v2/visitor/visitor-api.min.js"></script>
    • Invoke the function setVisitorData to pass the visitor data to Kore.ai bot. Note that the visitorData should be in string format and if you need to pass an object use Stringify.
      • Locate the following section and populate the apiKey and serverUrl fields with the above-mentioned values.
        window.unblu.api
        .configure({
           apiKey: "<your-unblu-apikey>",
           serverUrl: "<your-unblu-host>"
          })
    • In the following Script tag, add Unblu host URL and the API key: <script type="text/javascript" defer="defer" src="<your-unblu-host>/unblu/visitor.js?x-unblu-apikey=<your-unblu-apikey>"></script>
    • The entire Unblu SDK HTML file would look like this:
      <!DOCTYPE html>
      <html>
      
      <head>
      
         <meta name="unblu:named-area" content="<your-namedArea-Id>" />
      
         <script src="https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js"></script>
         <script src="<your-unblu-host>/unblu/js-api/v2/visitor/visitor-api.min.js"></script>
      
       <script>
         function setVisitorData(engagementType, visitorData) { 
            return Promise.resolve(JSON.stringify({ name: "John", about: "Tester" })); 
             }
           window.unblu.api
            .configure({
               apiKey: "<your-unblu-apikey>",
               serverUrl: "<your-unblu-host>"
             })
            .initialize().then(function (api) {
              console.log("API initialized successfully!");
              api.setNewConversationInterceptor(setVisitorData);
       
                  }).catch(e => {
                      console.log("------error : ", e);
                      if (e.type === 'INITIALIZATION_TIMEOUT') {
                        //retry
                       } else if (e.type === 'UNSUPPORTED_BROWSER') {
                        // display unsupported browser dialog
                      } else {
                       // show generic error message
                       }
                 });
      
      </script>
      
      <script type="text/javascript" defer="defer"
      src="<your-unblu-host>/unblu/visitor.js?x-unblu-apikey=<your-unblu-apikey>"></script>
      </head>
      
      <body>
      </body>
      
      </html>
    • You can access the Visitor Data from the usercontext.customData  along with the user information for each message from Unblu,
    • Following is the structure of the usercontext.customData
      {
      "timestamp" : 1594113137065.0,
      "eventType" : "bot.dialog.opened",
      "accountId" : "wZvcAnbBSpOps9oteH-Oxw",
      "dialogToken" : "qG8dFE7ZQPW1p6qcI293hQ-c-QY7P7MNqTCuM6FHT-m-FSQ",
      "dialogType" : "ONBOARDING",
      "counterpartPerson" : {
         "type" : "PersonData",
         "id" : "xZHnVmhxQNKvyf5ybxyLoQ",
         "accountId" : "wZvcAnbBSpOps9oteH-Oxw",
         "personSource" : "VIRTUAL",
         "sourceId" : "awhFjUq1RQCvdMDoV5OW2Q",
         "sourceData" : null,
         "firstName" : null,
         "lastName" : null,
         "username" : null,
         "nickname" : null,
         "displayName" : "Visitor - xZHnV",
         "personType" : "VISITOR",
         "authorizationRole" : "ANONYMOUS_USER",
         "email" : null,
         "phone" : null,
         "teamId" : null,
         "teamName" : null,
         "avatar" : null
         },
      "conversation" : {
         "type" : "ConversationData",
         "id" : "qG8dFE7ZQPW1p6qcI293hQ",
         "accountId" : "wZvcAnbBSpOps9oteH-Oxw",
         "topic" : null,
         "recipient" : {
         "type" : "NamedAreaData", 
         "id" : "WkUGFqcORCCor3bxHa3I5A",
         "accountId" : "wZvcAnbBSpOps9oteH-Oxw",
         "displayName" : "testlocal",
         "avatar" : null
        },
      "participants" : [
       {
         "type" : "ParticipantData",
         "state" : "ACTIVE",
         "personId" : "yb8ALAiGQOWlCoBahUCfgQ",
         "connectedViaExternalMessenger" : false,
         "hidden" : true
       }
       ],
       "assigneePersonId" : null,
       "contextPersonId" : "xZHnVmhxQNKvyf5ybxyLoQ",
       "state" : "ONBOARDING",
       "initialEngagementType" : "CHAT_REQUEST",
       "locale" : "en",
       "tokboxSessionId" : null,
       "visitorData" : "{\"name\":\"John\",\"about\":\"Tester\"}",
       "conversationTemplateId" : "R6W3x2uzQ1KXzARnIqdNZw",
       "links" : [
       {
         "type" : "OPEN_IN_VISITOR_DESK",
         "url" : "https://kore.dev.unblu-test.com/unblu/visitordesk/#/conversation/qG8dFE7ZQPW1p6qcI293hQ"
       },
       {
        "type" : "OPEN_IN_AGENT_DESK",
        "url" : "https://kore.dev.unblu-test.com/unblu/desk/#/conversation/qG8dFE7ZQPW1p6qcI293hQ"
       },
      {
        "type" : "OPEN_IN_AGENT_SINGLE_VIEW",
        "url" : "https://kore.dev.unblu-test.com/unblu/single/#/conversation/qG8dFE7ZQPW1p6qcI293hQ"
       }
       ],
       "externalMessengerChannelId" : null,
       "sourceId" : null,
       "configuration" : null,
       "text" : null
      },
      "presencePersonInfo" : {
        "id" : "OuG04Q0WSFe3-iaIA1GlLw",
        "creationTimestamp" : 1594112743472.0,
        "modificationTimestamp" : 1594112743472.0,
        "accountId" : "wZvcAnbBSpOps9oteH-Oxw",
        "joinedTimestamp" : 1594112743472.0,
        "leftTimestamp" : null,
        "personId" : "xZHnVmhxQNKvyf5ybxyLoQ",
        "deviceInfo" : {
          "id" : "fx7Q8qZyQXmnf62xpoePWg",
          "creationTimestamp" : 1594112743454.0,
          "modificationTimestamp" : 1594112743454.0,
          "accountId" : "wZvcAnbBSpOps9oteH-Oxw",
          "osName" : "Ubuntu",
          "osVersion" : "Other",
          "browserName" : "Chromium",
          "browserVersion" : "81.0",
          "userAgent" : null,
          "screenWidth" : null,
          "screenHeight" : null,
          "screenPixelRatio" : null,
          "type" : "DESKTOP",
          "identifier" : "awhFjUq1RQCvdMDoV5OW2Q",
          "identifierSource" : "COOKIE",
          "pushToken" : null,
          "ownerPersonId" : "xZHnVmhxQNKvyf5ybxyLoQ"
        },
       "touchTimestamp" : 1594113153628.0,
       "impersonationType" : "NONE",
       "impersonatedFromUserId" : null,
       "impersonatedFromAccountId" : null,
       "additionalInfo" : null,
       "authInfo" : null,
       "propagated" : false
       }
      }

Special Notes

There are multiple functionalities that can be achieved by the integration of Unblu channel with Kore.ai bots

  • When mapping named area to a bot, multiple named areas can be mapped. This way a single Kore.ai bot has the ability to accept Unblu dialog offer requests from different origins like SDKs or namedAreas.
  • Also, the named area mapping is optional if you are enabling the Unblu channel for a single Kore.ai bot. 
  • You can redirect user conversations to agents by adding an agent transfer node in the dialog flow, note that you need not enable the Agent Transfer or BotKit specifically for this Channel. Having an agent transfer node is sufficient.
  • The user information for each message from Unblu is available in the usercontext.customData and you can use it for further processing. This information includes deviceInfo, authInfo, joinedTime of the user. See here for how to use context object.

Using Unblu supported message templates

By default, the following message templates are used – Button/multi-choice, List template. You can override templates like card message, List message, multi-choice/Button message.

Following is a code example for how to use the above mentioned templates, change it to suit your requirements:

  • Card Template:
    var unbluCardTemplate = {
        "$_type": "CardPostMessageData",
        "type": "CARD",
        "imageUrl": "data:image/png;base64,",
        "imageAltText": "test image",
        "title": "Title",
        "body": "This is the **body text** with markdown",
        "bodyTextType": "MARKDOWN",
        "actions": [
          {
            "$_type": "MessageAction",
            "actionType": "LINK_INTERNAL",
            "label": "Unblu homepage",
            "value": "https://unblu.com"
          },
          {
            "$_type": "MessageAction",
            "actionType": "LINK_EXTERNAL",
            "label": "Wikipedia",
            "value": "https://www.wikipedia.org/"
          },
          {
            "$_type": "MessageAction",
            "actionType": "REPLY_MESSAGE",
            "label": "More info",
            "value": "Could you provide me with more info?"
          }
        ]
      };
    
    print(JSON.stringify(unbluCardTemplate));
    
  • List Template:
    var unbluListTemplate = {
        "$_type": "ListPostMessageData",
        "type": "LIST",
        "header": {
          "$_type": "MessageHeader",
          "imageUrl": "data:image/png;base64,",
          "imageAltText": "test image",
          "title": "Title",
          "body": "This is the **body text** with markdown",
          "bodyTextType": "MARKDOWN"
        },
        "items": [
          {
            "$_type": "PostListMessageCardItemData",
            "imageUrl": "data:image/png;base64,",
            "imageAltText": "test image",
            "title": "Title",
            "body": "This is the **body text** with markdown",
            "bodyTextType": "MARKDOWN",
            "action": null
          },
          {
            "$_type": "PostListMessageCardItemData",
            "imageUrl": "data:image/png;base64,",
            "imageAltText": "test image",
            "title": "Title",
            "body": "This is the **body text** with markdown",
            "bodyTextType": "MARKDOWN",
            "action": {
              "$_type": "MessageAction",
              "actionType": "LINK_INTERNAL",
              "label": "Unblu homepage",
              "value": "https://unblu.com"
            }
          }
        ],
        "actions": [
          {
            "$_type": "MessageAction",
            "actionType": "LINK_INTERNAL",
            "label": "Unblu homepage",
            "value": "https://unblu.com"
          },
          {
            "$_type": "MessageAction",
            "actionType": "LINK_EXTERNAL",
            "label": "Wikipedia",
            "value": "https://www.wikipedia.org/"
          },
          {
            "$_type": "MessageAction",
            "actionType": "REPLY_MESSAGE",
            "label": "More info",
            "value": "Could you provide me with more info?"
          }
        ]
    }
    print(JSON.stringify(unbluListTemplate));
    
  • Multi Choice Template:
    var unbluMultiChoiceTemplate =  {
        "$_type": "MultichoiceQuestionPostMessageData",
        "type": "MULTICHOICE_QUESTION",
        "text": "Choose one of the options",
        "textType": "MARKDOWN",
        "options": [
          {
            "$_type": "MultichoiceQuestionOption",
            "label": "Option 1",
            "value": "1",
            "primary": true
          },
          {
            "$_type": "MultichoiceQuestionOption",
            "label": "Option 2",
            "value": "2",
            "primary": false
          }
        ]
      };
    print(JSON.stringify(unbluMultiChoiceTemplate));
    

Editing the Unblu Channel

To edit the Unblu channel, hover your mouse over the channel to modify, and then click the Settings icon to display the command menu . Select one of the following commands to modify the channel:

  • Disable/Enable – Click Disable to temporarily disable the use of the Unblu for your Bot. To enable the use of the Unblu channel, Click Enable.
  • Delete – Click Delete, and then click OK in the Delete Confirmation dialog to permanently delete the Bot channel configuration.
Warning: This operation is permanent, and cannot be undone.
Menu