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
Deprecations
Bot Builder
Creating a Bot
Design
Develop
Storyboard
Dialog Task
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
Service Node
Custom Authentication
2-way SSL for Service nodes
Script Node
Agent Transfer Node
WebHook Node
Grouping Nodes
Connections & Transitions
Managing Dialogs
User Prompts
Alert Tasks
Alert Tasks
Ignore Words and Field Memory
Digital Forms
Digital Views
Knowledge Graph
Terminology
Building
Generation
Importing and Exporting
Analysis
Knowledge Extraction
Small Talk
Action & Information Task
Action Tasks
Information Tasks
Establishing Flows
Natural Language
Overview
Machine Learning
Model Validation
Fundamental Meaning
NLP Settings and Guidelines
Knowledge Graph Training
Traits
Ranking and Resolver
NLP Detection
Advanced NLP Configurations
Bot Intelligence
Overview
Context Management
Session and Context Variables
Context Object
Dialog Management
Sub-Intents & Follow-up Intents
Amend Entity
Multi-Intent Detection
Sentiment Management
Tone Analysis
Sentiment Management
Default Conversations
Default Standard Responses
Channel Enablement
Test & Debug
Talk to Bot
Utterance Testing
Batch Testing
Record Conversations
Publishing your Bot
Analyzing your Bot
Overview
Dashboard
Custom Dashboard
Conversation Flows
Bot Metrics
Advanced Topics
Bot Authorization
Language Management
Collaborative Development
IVR Integration
Data Table
Universal Bots
Defining
Creating
Training
Customizing
Enabling Languages
Smart Bots
Defining
Sample Bots
Github
Asana
Travel Planning
Flight Search
Event Based Bot Actions
koreUtil Libraries
Bot Settings
Bot Functions
General Settings
PII Settings
Customizing Error Messages
Manage Sessions
Bot Management
Bot Versioning
Using Bot Variables
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
Bot Administration
Bots Admin Console
Dashboard
User Management
Managing Users
Managing Groups
Managing Role
Bots Management
Enrollment
Inviting Users
Bulk Invites
Importing Users
Synchronizing Users from AD
Security & Compliance
Using Single Sign-On
Security Settings
Cloud Connector
Analytics
Billing
How Tos
Creating a Simple Bot
Creating a Banking Bot
Transfer Funds Task
Update Balance Task
Context Switching
Using Traits
Schedule a Smart Alert
Configure Digital 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
Using nlMeta
Global Variables
Content Variables
Using Bot Functions
Configure Agent Transfer
  1. Home
  2. Docs
  3. Bots
  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 Kore.ai Bot Builder platform, open the Banking Bot.
  2. From the left navigation menu, select Bot Tasks -> Digital Forms to access the Digital Forms page.
  3. 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.
  4. 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.

  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. From the left navigation menu, select Bot Tasks -> Dialog Tasks.
  2. Click the + against the Dialog Tasks to create a new Task
    • Enter IntentName, say, OpenAccount
    • Create & Proceed to open the dialog builder page.
  3. Retain the Intent Node default settings, and close the Intent Node.
  4. Click the + next to the intent node and select Form option.
  5. From the dropdown list select the form (OpenAccount) we created earlier.
  6. 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.
  7. For this use case, let us select Only Form UI experience.
  8. A Form Node would be added, you can customize the form name, etc.
  9. We are changing the Name to OpenAccountForm and Display Name to Form to open account.
  10. 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