Chatbot Overview
Conversational Bots
Intents & Entities
Intelligent Bots
Kore.ai's Approach
Kore.ai Conversational Platform
Bot Concepts and Terminology
Natural Language Processing (NLP)
Bot Types
Bot Tasks
Starting with Kore.ai Platform
How to Access Bot Builder
Working with Kore.ai Bot Builder
Building your first Bot
Getting Started with Building Bots
Using the Dialog Builder Tool
Creating a Simple Bot
Release Notes
Latest Updates
Older Releases
Bot Builder
Creating a Bot
Design
Develop
Dialog Task
Working with User Intent & Dialog Node
Working with Entity Node
Supported Entity Types
Working with Composite Entities
Supported Time Zones
Supported Colors
Supported Company Names
Working with Message & Confirmation Nodes
Working with Service Node
Implementing Custom Authentication
Enabling 2-way SSL for Service nodes
Working with Script Node
Working with Agent Transfer Node
Working with WebHook Node
Defining Connections & Transitions
Managing Dialogs
Prompt Editor
Action & Information Task
Working with Action Tasks
Working with Information Tasks
Establishing Flows
Alert Tasks
Working with Alert Tasks
Managing Ignore Words and Field Memory
Knowledge Tasks
Building Knowledge Graph
Importing and Exporting Bot Ontology
Knowledge Extraction
Natural Language
Overview
Machine Learning
ML Model
Fundamental Meaning
Knowledge Graph Training
Traits
Ranking and Resolver
NLP Detection
NLP Settings and Guidelines
Bot Intelligence
Overview
Dialog Management
Sub-Intents and Follow-Up Intents
Amend Entity
Multi-Intent Detection
Context Management
Session and Context Variables
Context Object
Sentiment Management
Tone Analysis
Sentiment Management
Default Conversations
Default Standard Responses
Channel Enablement
Test & Debug
Talking to Bot
Utterance Testing
Batch Testing
Recording Conversations
Publishing your Bot
Analyzing your Bot
Overview
Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
Universal Bots
Defining
Creating
Customizing
Enabling Languages
Smart Bots
Defining
Sample Bots
Github
Asana
Travel Planning
Flight Search
Event Based Bot Actions
Bot Settings
Bot Functions
General Settings
PII Settings
Customizing Error Messages
Bot Management
Using Bot Variables
API Guide
API Overview
API List
SDKs
SDK Overview
SDK Configuration
SDK Security
SDK App Registration
Kore.ai Web SDK Tutorial
Message Formatting and Templates
Mobile SDK Push Notification
Using the BotKit SDK
Installing the BotKit SDK
Events for the BotKit SDK
Functions for the BotKit SDK
BotKit SDK Tutorial – Agent Transfer
BotKit SDK Tutorial – Flight Search Sample Bot
Using an External NLP Engine
Web Socket Connect & RTM
Bot Administration
Bots Admin Console
User Management
Managing Users
Managing Groups
Managing Role
Bots Management
Enrollment
Inviting Users
Sending Bulk Invites to Enroll Users
Importing Users and User Data
Synchronizing Users from Active Directory
Security & Compliance
Overview
Using Single Sign-On
Cloud Connector
Analytics
Billing
Bot Store
Overview
Creating a Kore.ai Bot Account
Adding a Kore.ai Bot
Choosing a Channel for a Bot
Interacting with a Kore.ai Bot
Setting Up Web Service Alerts
Setting Up RSS Alerts
Setting Up the Kore.ai Webhook Bot
Custom Kore.ai Bots
Bots for your Customers FAQs
Bots for your Workforce FAQs
Adding Bots
Contacting Kore.ai Support
Setting Up Filters
Bot Store Settings
  1. Home
  2. Docs
  3. Bots
  4. Bot Building
  5. Dialog Task
  6. Working with the User Intent & Dialog Node

Working with the User Intent & Dialog Node

The first steps in a Bot building process are to establish the User Intent and define Dialog Tasks. Combination of these nodes set the  Bot in the direction of serving the user intent. This article talks about how both these nodes can be established in Kore.ai Bot Builder.

Working with the User Intent Node

As a bot developer, you typically create a task to resolve one primary user intent. Yet, user conversations can branch into related intents (follow-up or sub-intents) as a part of the primary intent.

Let’s take a look this sample conversation for a Book Flights bot:

Bot: Hi, how may I help you today?
User: Hey, what flight options have I got from LA to NYC.
Bot: Sure, let me know the travel date.
User: Wait a minute, will it rain there this Sunday?

The primary intent of this conversation is to book flight tickets. But the user wants to know the weather forecast before completing the booking, which is a valid use case.

User intent nodes help you add root intent or follow-up (or sub-intents) to your dialog tasks. The flow for a follow-up intent is built within the same dialog task using transitions, and cannot be linked to external tasks. When the execution of a follow-up intent is completed, the conversation flow continues within the same dialog tasks based on the transitions you add.

Note: To start a new Dialog Task from an existing one, you can use the Dialog Task nodes.

Setting Up a User Intent Node

Setting up a User Intent node involves the following steps:

Step 1: Adding a User Intent Node to the Dialog Task

  1. Open the dialog task in which you want to add the User Intent node.
  2. Hover over a node next to which you want to add the User Intent.
  3. Click the Plus icon that appears after the node, and then select Intent > New user intent node.
  4. Enter a Name and Description (optional) for the node, and then click Create.
  5. You can also select an existing User Intent.
  6. The Component Properties panel for the node opens.

Step 2: Configuring the Component Properties

Note: The configurations you set up or edit in Component Properties panel are reflected in all the Dialog Tasks that use this node.
These settings are the same for Intent and Sub-intent nodes.

  1. Modify general Component Properties like Name and Description
  2. From the Connections tab set the Transition properties to determine which node in the dialog task to execute next. You can write the conditional statements based on the values of any Entity or Context Objects in the dialog task, or you can use intents for transitions.
    1. Select the Connections tab
    2. Click Add IF.
    3. Configure the conditional expression based on one of the following criteria:
      • Entity: Compare an Entity node in the dialog with a specific value:
        • Select the entity;
        • select an operator using the drop-down lists: Exists, equals to, greater than equals to, less than equals to, not equal to, greater than, and less than.
        • type the number in the Value box. Example: PassengerCount (entity) greater than (operator) 5 (specified value)
      • Context: Compare a context object in the dialog with a specific value using one of these operators: Exists, equals to, greater than equals to, less than equals to, not equal to, greater than, and less than. Example: Context.entity.PassengerCount (Context object) greater than (operator) 5 (specified value)
      • Intent: Select an intent that should match the next user utterance.
    4. In the Then go to drop-down list, select the next node to execute in the dialog flow if the conditional expression succeeds. For example, if the PassengerCount (entity) greater than (operator) 5 (specified value), Then go to Offers (sub-dialog).
    5. In the Else drop-down list, select the node to execute if the condition fails.
      Note: If you want to write multiple If conditions, click Add Else If below the last If conditional expression.
  3. From the NLP Properties tab
    • Machine Learning settings to provide user utterances to improve the detection for this intent.
    • Bot Synonyms or related phrases for this user intent.
    • Patterns & Rules to capture this intent if the user’s utterance contains these specific patterns.
    • Manage Context to better control the flow of conversation

Working with the Dialog Node

Dialog node lets you start a new Dialog task within an existing Dialog task if the user intent changes.

For example, let’s consider a travel bot that has the following three Dialog tasks: Flight Availability, Book a Flight, and Book a Hotel. You may want to invoke the Book a Flight Dialog task from the Flight Availability Dialog task.

Key features of Dialog nodes:

  • The ability to carry data from the current Dialog task to the target dialog task as entity pre-assignments described in the later section.
  • When a target Dialog task is invoked, the current Dialog flow begins at the root intent of the new Dialog task. If you write transitions for the Dialog node, then the flow returns to the source Dialog task after completing the Target. If you do not write transitions, the Dialog task ends after executing the target Dialog task. This differs from an optional User Intent node, where the dialog flow processes a related user intent and then continues in the same Dialog task thereafter.

Configuring a Dialog Node

Follow these steps to set up a Dialog Node to invoke a new Dialog Task:

Step 1: Adding a Dialog Node to the Dialog Task

  1. Open the Dialog Task in which you want to add the Dialog node.
  2. Hover over the node next to which you want to add the node, and click the Plus diydialogtaskplusicon icon.
  3. Go to Dialog Task and select the dialog task from the available list (Note you cannot create a new Dialog Task from within a Dialog like other nodes).
  4. The Component Properties panel opens.

Step 2: Define Component, Transition & NLP Properties

  1. Modify general Component Properties like Name and Description
  2. From the Connections tab set the Transition properties to determine which node in the dialog task to execute next. You can write the conditional statements based on the values of any Entity or Context Objects in the dialog task, or you can use intents for transitions. If you have defined the Transition Property as “End the current task“, then these settings will be ignored.
    1. Select the Connections tab
    2. Click Add IF.
    3. Configure the conditional expression based on one of the following criteria:
      • Entity: Compare an Entity node in the dialog with a specific value:
        • Select the entity;
        • select an operator using the drop-down lists: Exists, equals to, greater than equals to, less than equals to, not equal to, greater than, and less than.
        • type the number in the Value box. Example: PassengerCount (entity) greater than (operator) 5 (specified value)
      • Context: Compare a context object in the dialog with a specific value using one of these operators: Exists, equals to, greater than equals to, less than equals to, not equal to, greater than, and less than. Example: Context.entity.PassengerCount (Context object) greater than (operator) 5 (specified value)
      • Intent: Select an intent that should match the next user utterance.
    4. In the Then go to drop-down list, select the next node to execute in the dialog flow if the conditional expression succeeds. For example, if the PassengerCount (entity) greater than (operator) 5 (specified value), Then go to Offers (sub-dialog).
    5. In the Else drop-down list, select the node to execute if the condition fails.
      Note: If you want to write multiple If conditions, click Add Else If below the last If conditional expression.
  3. From the NLP Properties tab
    • Machine Learning settings to provide user utterances to improve the detection for this Node.
    • Bot Synonyms or related phrases for this Node.
    • Patterns to capture this Node if the user’s utterance contains these specific patterns.

Step 3: Define Instance Properties

Instance Properties include the settings for this instance of the Dialog.

  1. Click the Instance Properties icon on the Dialog node.
  2. Click the Advanced controls to set up these options:
    • Hold & Resume
      • Use the task level ‘Hold & Resume’ setting: The bot refers to the Hold & Resume settings set at the dialog task level.
      • Customize for this node option: You can customize the Hold & Resume settings for this node by selecting this option and configuring the same.  Read the Interruption Handling and Context Switching article for more information.
  3. Custom Tags defines tags to build custom profiles of your bot conversations. See here for more.

About Entity Pre-Assignments

You can pre-populate data for the destination Dialog task by:

  • adding values to the entity keys,
  • adding additional custom keys and values to pass data from the current Dialog task Context object to the destination Dialog task as needed.

By default, the Entity nodes defined in the target Dialog task are displayed as key/value pairs. You can then define values for associated entities or add custom keys and values as needed using session and context variables.

Transitioning from the source Dialog task to the destination Dialog task occurs at runtime when the user input matches one of any linked dialog tasks. When more than one dialog task must be mapped, you can define which dialog tasks are displayed to the end-users using conditional transitions.

When you call another dialog task, you may want to carry information from the first Dialog task, into the next Dialog task. For example, customer information collected in a Book a Flight dialog task could be passed to the Book a Hotel dialog task.

In the Bots Platform, you can use the mappedIntents variable in the Context object which holds the reference of the Intent nodes as well as the context of the source dialog task as shown in the following JSON syntax:
{ 'title': 'title of the link', 'link':' url for the link' ,'postbackpayload': 'system generated payload'}
For example, a link to GetEmail in the Context object can be:

{
   "title":"GetEmail",
   "link":"https://app.collab.ai/wf/1.1/market/users/bots/st-bb1eb3da-cfa7-5244-b241-b5042d333e76/dialogue/dg-15fd2927-219c-5795-b038-5b830718bea7/execute?nodeId=message2&contextId=dcx-f9bae173-4d69-53e4-9aa7-21e89aae776d&intent=GetEmail",
   "postbackpayload":"MappedDialog_dc-f7b42932-dc06-53ac-92c0-1db706794f91_dg-15fd2927-219c-5795-b038-5b830718bea7_dcx-f9bae173-4d69-53e4-9aa7-21e89aae776d"
}

You can access and present these variables in a prompt message to a user to display a list of mapped dialog tasks with the link, or as a list of choices. You can pass the source dialog context to the target dialog task even if the source Dialog task is no longer active using the Context object.

The value for the postbackpayload key is generated by the Bots Platform, and can be used in some channels, such a Facebook and Slack, which defines when a link or choice is made for a target Dialog task.

For more information, see Using Session and Context Variables in Tasks and the Context Object.

Menu