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. Home
  2. Docs
  3. Virtual Assistants
  4. How Tos
  5. How to Configure Digital Forms

How to Configure Digital Forms

In this How-To, we will explore a scenario in a Banking Bot, where the user can create an additional account. We will see how Digital Forms can be used to gather all the required information from the user and create the account.

For details on what Digital Forms 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:

  1. An already registered user wants to open an additional account.
  2. There are three types of accounts that are available, each with further options:
    • Savings Account;
    • Checking Account with an option to opt for a Cash Card and set a Minumum Balance;
    • Credit Card with an option to choose the type of card to be Platinum, Gold, Silver or Basic

Pre-requisites

  • Bot building knowledge
  • A Banking Bot

Configurations

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

  1. Digital Form to gather input from the user;
  2. Dialog Task to:
    1. trigger the above Digital Form; and
    2. capture the user-entered account information.

Digital Form Configuration

Create a form to gather the following information:

  • Account Name – pre-populated with the user’s name with an option to change it;
  • Type of Account that the user wants to create, default selection to Savings Account;
  • Based on the type of account selected above the following details to be gathered:
    • Savings – no further information needed;
    • Checkings – whether Cash Card is required, if yes then the maximum withdrawal limit (range between $100 to $1000) to be enforced on that card;
    • Credit Card – the type of card required
      • Platinum card levies additional charge,
      • Gold,
      • Silver, or
      • Basic

Form Creation

  1. From the Kore.ai Bot Builder platform, open the Banking Bot.
  2. Select the Build tab from the top menu.
  3. From the left navigation menu, select Digital Skills -> Digital Forms to access the Digital Forms page.
  4. Click New Form and enter the following:
    1. Name – name to the form, say OpenAccount
    2. Display Name for the form, say Open an Account
    3. Description of the form.
  5. Save & Proceed to the next step.

Form Editor

  1. Form Editor opens with components on the left, and a blank form. You can drag and drop components to the form as per your requirement.
  2. By default, a Submit button is added to the form. This would trigger the submit event which would capture the user input and save in context object.
  3. Drag and drop a Text Field component onto the form.
  4. As soon as you drag and drop a component, its property settings panel will be displayed.
  5. In that panel set the following values:
    • Display Name say Name.
    • Name used for internal reference, say accountname.
    • Description of the field.
    • Placeholder value to be displayed in the field when blank, say, Enter the name of the account holder.
    • Scroll and locate Data Settings and for Default Value enter {{context.session.UserContext.firstName}}this would pre-populate the field with the user name as it appears in the user context based on the login credentials.

  1. Next, a selection box for the type of account to be opened.
  2. Drag and drop a Dropdown component onto the form and set the following values:
    • Display Name say Type.
    • Name used for internal reference, say accounttype.
    • Description of the field.
    • Placeholder value to be displayed in the field when blank, say, Select the type of account you want to open.
    • Scroll and locate Data Settings, deselect Multi Select option and against Dropdown values click Add Values to enter the values – Checkings, Savings, Credit Card. You can mark one value, Savings, as default. This would be selected by default at the time of execution

  1. Next, for the Cash Card option when the account type is selected to be a Checkings account.
  2. Drag and drop a Toggle component onto the form and set the following values:
    • Display Name say Cash Card.
    • Name used for internal reference, say cashcard.
    • Description of the field. In this case, the question, Want a cash card?
    • Value as Yes when selected and No when deselected.
    • Scroll and locate Visibility Settings. This component should be visible only when the account type is set to Checkings.
      • Add Visibility Rules – Rule 1 for the field to be Visible when, select, accounttype field, =(Equal To) operator, Value comparison with, Checkings value.

  1. If the user opts for cash card, then the withdrawal limit needs to be set on the same.
  2. Drag and drop a Range Slider component onto the form and set the following values:
    • Display Name say Withdrawal Limit.
    • Name used for internal reference, say withdrawallimit.
    • Description of the field.
    • Placeholder value to be displayed in the field when blank, say, Set the withdrawal limit.
    • Deselect Is Percentage
    • Value as 100 for Min and 1000 for Max.
    • Under Data Settings, you can set the Default Value to be 150, this would be pre-selected.
    • Visibility Rules would be a compound rule – account type is checkings and cash card is selected.
    • Scroll and locate Visibility Settings. This component should be visible only when the account type is set to Checkings and the Cash Card is opted.
      • Add Visibility Rules – Rule 1 field to be visible when, select, accounttype field, =(Equal To) operator, Value comparison with, Checkings value  AND selecting cashcard field, =(Equal To) operator, Value comparison with, Yes value.
      • You can switch to Advanced Mode to enter the visibility rules

  1. For the Credit Card option, the user needs to further select the type of card.
  2. Drag and drop a Radio Button component onto the form and set the following values:
    • Display Name say Card Type.
    • Name used for internal reference, say cardtype.
    • Description of the field.
    • Placeholder value to be displayed in the field when blank, say, Choose the type of credit card.
    • Under Data Settings, you can set the Radio values to be Platinum, Gold, Silver, and Basic.
    • Scroll and locate Visibility Settings. This component should be visible only when the account type is set to Credit Card.
      • Set Is visible flag to Yes
      • Add Visibility Rules – Rule 1 for the filed to be Visible when, select, accounttype field, =(Equal To) operator, Value comparison with, Credit Card value.

  1. Finally, the Pro-Tip, when user selects a Platinum card.
  2. Drag and drop a Pro Tip component onto the form and set the following values:
    • Display Name say Platinum Tip.
    • Name used for internal reference, say platinumtip.
    • Description would be the tip you want to display, say, Additional charges will apply.
    • Scroll and locate Visibility Settings. This component should be visible only when the account type is set to Credit Card.
      • Set Is visible flag to Yes
      • Add Visibility Rules – Rule 1 for the field to be Visible when, select, accounttype field, =(Equal To) operator, Value comparison with, Credit Card value AND selecting cardtype field, =(Equal To) operator, Value comparison with, Platinum value.

  1. Your form is ready.
  2. You can toggle between Desktop View and Mobile View to see how it looks in those devices.
  3. Use the Test button to see a preview.

Dialog Task Configuration

We will be creating a dialog task and adding a form node to trigger the Digital Form created in the above step and use a service node to make a service call to add the new account from the form data.

Create Dialog Task

  1. Select the Build tab from the top menu
  2. From the left navigation menu, select Conversational Skills -> Dialog Tasks.
  3. Click the + against the Dialog Tasks to create a new Task
    • Enter IntentName, say, OpenAccount
    • Create & Proceed to open the dialog builder page.
  4. Retain the Intent Node default settings, and close the Intent Node.
  5. Click the + next to the intent node and select the Form option.
  6. From the dropdown list select the form (OpenAccount) we created earlier.
  7. You will be prompted to select the Form Experience. Kore.ai Bots platform allows you to gather user input both from the form and through conversation based on the channel.
  8. For this use case, let us select Only Form UI experience.
  9. A Form Node would be added, you can customize the form name, etc.
  10. We are changing the Name to OpenAccountForm and Display Name to Form to open account.
  11. Next, we will see how to capture the values returned by the Form Node using a Script node and displaying the same.
  1. Add a Message Node to the form node.
  2. Set the Name to FormMessage and Display Name to Form Message.
  3. Click the MANAGE RESPONSES to open the message editor.
  4. Select the JavaScript tab and enter the following code. This code would capture from the context object, the data submitted by the user in the Form and display it accordingly.
    var message;
    message = 'You have opened a '+context.forms.OpenAccount.accounttype+' account in the name of '+context.forms.OpenAccount.accountname;
    if (context.forms.OpenAccount.accounttype == 'Checkings' && context.forms.OpenAccount.cashcard == 'Yes')
      message = message + ' and opted for cash card with withdrawal limit set to '+ context.forms.OpenAccount.withdrawallimit;
    if (context.forms.OpenAccount.accounttype == 'Credit Card')
      message = message + ' and opted for a '+ context.forms.OpenAccount.cardtype+' card';
    print(message);

  5. Your dialog with form is ready
  6. Talk to bot and trigger the above dialog. The form will be displayed, enter the values and click Submit, the message would be displayed.
  7. You can use the context object as shown above it a Script or Service nodes for further processing.
  8. See here for how to add this data into data tables.

Conclusion

In this post, we have seen:

  • How to create a Digital Form;
  • Add components to the Form;
  • How to trigger the From from a Dialog;
  • How to capture the Form data from the Dialog post submission.
Menu
Kore.ai Named a Leader in 2022 Gartner® Magic Quadrant™ for Enterprise Conversational AI PlatformsGet the Report