{"id":23388,"date":"2020-04-07T10:02:56","date_gmt":"2020-04-07T09:02:56","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-2\/?p=23388"},"modified":"2022-03-30T15:13:29","modified_gmt":"2022-03-30T14:13:29","slug":"creating-a-banking-assistant","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-2\/docs\/bots\/how-tos\/creating-a-banking-assistant\/","title":{"rendered":"Creating a Banking Assistant"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>This document helps you create a sample banking bot. This bot is used in various use case scenarios presented in the How-Tos section of the developer documentation.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Prerequisites\">Prerequisites<\/span><\/h2>\n<p>The following are the prerequisites:<\/p>\n<ul>\n<li>You must have <a href=\"\/docs\/bots\/getting-started\/how-to-open-bot-builder\/\">signed up<\/a> with the Kore.ai Bots Platform.<\/li>\n<li>You must be aware of the basics concepts of bot-building (refer to <a href=\"\/docs\/bots\/getting-started\/getting-started-bots\/\" target=\"_blank\" rel=\"noopener noreferrer\">this link<\/a>).<\/li>\n<li>You must have created a simple bot (<a href=\"\/docs\/bots\/chatbot-overview\/creating-a-simple-bot\/\">refer here<\/a> for an example).<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Bot_Overview\">Bot Overview<\/span><\/h2>\n<p>The bot we build will perform the basic banking transactions. This bot will:<\/p>\n<ul>\n<li>Get account balance based on the user&#8217;s <em>Account Number<\/em> and <em>Account Type<\/em>.<\/li>\n<li>Update accounts with the balance. For more information, <a href=\"\/docs\/bots\/how-tos\/banking-bot-update-balance\/\">click here<\/a>.<\/li>\n<li>Transfer a specified amount from the user account to a payee account. For more information, <a href=\"\/docs\/bots\/how-tos\/banking-bot-transfer-funds\/\" target=\"_blank\" rel=\"noopener noreferrer\">click here<\/a>.<\/li>\n<\/ul>\n<p>Let us start building the bot and add <em>Get Balance<\/em> task to it.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Create_a_Bot\">Create a Bot<\/span><\/h2>\n<p>This document helps you to create a Standard Bot for banking activities. To create a standard bot, follow the below steps:<\/p>\n<ol>\n<li>Log in to your Kore.ai Bots Platform with valid credentials.<\/li>\n<li>On the bots landing page,\u00a0click <strong>New Bot<\/strong> on the top-right and select <strong>Start from Scratch<\/strong> from the list.<\/li>\n<li>On the <strong>Create New Bot<\/strong> window, enter the bot details:\n<ol>\n<li><strong>Bot Name<\/strong> &#8211; Provide a name to your bot. For example, <em>Banking Bot<\/em>. If the name is already used, provide a different name.<\/li>\n<li>Set the <strong>Default Bot Language<\/strong> to <em>English.<\/em><\/li>\n<li>Select the <strong>Bot Type<\/strong> as <em>Standard Bot<\/em>.<\/li>\n<\/ol>\n<\/li>\n<li>Click <strong>Create<\/strong>.<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720120932\/BankingBot_createBot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28694\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720120932\/BankingBot_createBot.png\" alt=\"\" width=\"491\" height=\"621\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720120932\/BankingBot_createBot.png 491w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720120932\/BankingBot_createBot-237x300.png 237w\" sizes=\"auto, (max-width: 491px) 100vw, 491px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Get_Balance_Intent\">Get Balance Intent<\/span><\/h2>\n<ul>\n<li>The <em>Get Balance<\/em> task prompts the user to enter an <em>account number<\/em> and the account type (Savings\/Current).<\/li>\n<li>It makes a service call to fetch the details.<\/li>\n<li>The balance for the requested account is displayed.<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210721114738\/BankingBot_getBalance.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28753\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210721114738\/BankingBot_getBalance.png\" alt=\"\" width=\"1366\" height=\"768\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210721114738\/BankingBot_getBalance.png 1366w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210721114738\/BankingBot_getBalance-300x169.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210721114738\/BankingBot_getBalance-1024x576.png 1024w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Dialog_Task\">Dialog Task<\/span><\/h3>\n<p>Successful creation of the bot directs you to the Bot Summary page. We need to add a Dialog Task as the first step in the Bot. Intent Dialog is the first step in the user-bot conversation flow.<\/p>\n<ol>\n<li>On the Bot Summary page, click <strong>+ New Task<\/strong> on the <strong>Tasks<\/strong> widget.<\/li>\n<li>Select <strong>Dialog Task<\/strong> from the list.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121103\/BankingBot_createTask.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28697\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121103\/BankingBot_createTask.png\" alt=\"\" width=\"962\" height=\"454\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121103\/BankingBot_createTask.png 962w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121103\/BankingBot_createTask-300x142.png 300w\" sizes=\"auto, (max-width: 962px) 100vw, 962px\" \/><\/a><\/li>\n<li>On the Create Dialog window, enter the following details:\n<ul>\n<li>Enter a name in the <strong>Intent Name<\/strong> field. This is the phrase that triggers the dialog. The intent name must be simple and not more than 3-4 words. For example, <em>Get Balance<\/em>.<\/li>\n<li>Enter a description\u00a0in the <strong>Description<\/strong> field.<\/li>\n<li>In the <strong>Intent Training<\/strong> field, add unique utterances to improve the user intent recognition.<\/li>\n<li>Under <strong>More Options<\/strong>, you can add other dialog-related details. Let us retain the default settings.<\/li>\n<li>Select <strong>Try Conversation Driven Dialog Builder<\/strong> option.<\/li>\n<\/ul>\n<\/li>\n<li>Click <strong>Proceed<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121201\/BankingBot_detailsTask.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28700\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121201\/BankingBot_detailsTask.png\" alt=\"\" width=\"797\" height=\"618\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121201\/BankingBot_detailsTask.png 797w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121201\/BankingBot_detailsTask-300x233.png 300w\" sizes=\"auto, (max-width: 797px) 100vw, 797px\" \/><\/a>Note: For instructions with the older Dialog Builder, <a href=\"\/v8-1\/docs\/bots\/how-tos\/creating-a-banking-bot\/\">refer here<\/a><\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Entity_Node\">Entity Node<\/span><\/h3>\n<p>Entity Node is typically used to gather information from the user. Here, it is used to capture the user input for <em>Account Number<\/em> and <em>Account Type<\/em>.<\/p>\n<ol>\n<li>Click the <strong>+<\/strong> icon below the User Intent (Get Balance) node.<\/li>\n<li>Select <strong>Entity<\/strong> from the list and click <strong>+ Entity<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121518\/BankingBot_addEntity1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28703\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121518\/BankingBot_addEntity1.png\" alt=\"\" width=\"728\" height=\"462\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121518\/BankingBot_addEntity1.png 728w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121518\/BankingBot_addEntity1-300x190.png 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/a><\/li>\n<li>Click on the newly created Entity node to open the <strong>Property <\/strong>window.<\/li>\n<li>Under the <strong>General Settings<\/strong> section, enter the following details:\n<ul>\n<li><strong>Name<\/strong>: <em>AccountNumber<\/em><\/li>\n<li><strong>Display Name<\/strong>: <em>Account Number<\/em><em>\u00a0<\/em><\/li>\n<li><strong>Type<\/strong>:\u00a0<em>Number<\/em><\/li>\n<li><strong>User Prompts:<\/strong> Enter the following text and press <strong>Enter<\/strong> to save:<br \/>\n<code>Enter the account number.<\/code><\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121717\/BankingBot_detailsEntity1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28706\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121717\/BankingBot_detailsEntity1.png\" alt=\"\" width=\"453\" height=\"1000\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121717\/BankingBot_detailsEntity1.png 453w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121717\/BankingBot_detailsEntity1-136x300.png 136w\" sizes=\"auto, (max-width: 453px) 100vw, 453px\" \/><\/a><\/li>\n<li>Close the <em>AccountNumber<\/em> Entity Property window.<\/li>\n<li>Repeat the above steps to add another entity with the following details:\n<ul>\n<li><strong>Name<\/strong>: <em>AccountType<\/em><\/li>\n<li><strong>Display Name<\/strong>: <em>Account Type<\/em><em>\u00a0<\/em><\/li>\n<li><strong>User Prompts<\/strong>: Enter the following text and press <strong>Enter<\/strong> to save:<br \/>\n<code>Enter the account type.<\/code><\/li>\n<li><strong>Display List Of Values<\/strong>: Select <em>Yes, use channel-specific standard formatting for default messages and show the available list of values to the end-user<\/em>. This presents the list of values in a button template for the supported channels.<\/li>\n<li><strong>Type<\/strong>: Select <em>List of Items (enumerated) <\/em>from the drop-down list.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121813\/BankingBot_detailsEntity2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28709\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121813\/BankingBot_detailsEntity2.png\" alt=\"\" width=\"456\" height=\"1284\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121813\/BankingBot_detailsEntity2.png 456w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121813\/BankingBot_detailsEntity2-107x300.png 107w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121813\/BankingBot_detailsEntity2-364x1024.png 364w\" sizes=\"auto, (max-width: 456px) 100vw, 456px\" \/><\/a><\/li>\n<li>Provide the list of values that the user can select.\n<ol>\n<li>Click the <strong>Settings <\/strong>icon\u00a0that appears next to the field.<\/li>\n<li>Under the <strong>Account Type<\/strong> section, select the <strong>Static List<\/strong> radio button.<\/li>\n<li>Under the <strong>Keys &amp; values to use<\/strong> section, enter\n<ol>\n<li>the <strong>Display Name <\/strong>as\u00a0<em>Savings<\/em>\u00a0and\u00a0<em>Current.\u00a0<\/em><\/li>\n<li><strong>Value <\/strong>and <strong>Synonym<\/strong> columns will auto-populate. Change the Value to <em>savings<\/em> and <em>current<\/em>, since our mockapi has the account type saved in lowercase.<\/li>\n<\/ol>\n<\/li>\n<li>Click\u00a0<strong>Save<\/strong>\u00a0on the top-right of the page.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121856\/BankingBot_valuesEntity2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28712\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121856\/BankingBot_valuesEntity2.png\" alt=\"\" width=\"1349\" height=\"493\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121856\/BankingBot_valuesEntity2.png 1349w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121856\/BankingBot_valuesEntity2-300x110.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720121856\/BankingBot_valuesEntity2-1024x374.png 1024w\" sizes=\"auto, (max-width: 1349px) 100vw, 1349px\" \/><\/a><\/li>\n<\/ol>\n<\/li>\n<li>Close the <em>AccountType<\/em> Entity Property window.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Bot_Action_Service_Node\">Bot Action &#8211; Service Node<\/span><\/h3>\n<p>Service Node allows you to make a backend API call and is under Bot Action.<\/p>\n<p>Here, the service node is used to call an API to fetch the account balance for the user-entered account number. You can find a dummy API setup for this tutorial. A mock API is created specifically for this purpose with the following fields &#8211; FirstName, LastName, Address, City, Country, ZipCode, AccountNumber, AccountType, Balance.<\/p>\n<ol>\n<li>From the left pane, drag and drop the <strong>Bot Action<\/strong> node below the <em>Account Type<\/em> entity node.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122654\/BankingBot_addAction.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28715\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122654\/BankingBot_addAction.png\" alt=\"\" width=\"531\" height=\"493\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122654\/BankingBot_addAction.png 531w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122654\/BankingBot_addAction-300x279.png 300w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/a><\/li>\n<li>The newly created <strong>Bot Action<\/strong> node would be expanded. If not, click the <span style=\"color: #ff6600;\"><strong>+<\/strong><\/span> icon to expand<\/li>\n<li>From the left pane, drag and drop the <strong>Service<\/strong> node to the <strong>Bot Action<\/strong> node layout,<br \/>\nor on the <strong>Bot Action<\/strong> node layout, click the <strong><span style=\"color: #00ffff;\">+<\/span><\/strong> icon and select <strong>Service <\/strong>from the list, and click <strong>+ New Service<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122849\/BankingBot_addService.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28718\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122849\/BankingBot_addService.png\" alt=\"\" width=\"683\" height=\"400\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122849\/BankingBot_addService.png 683w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122849\/BankingBot_addService-300x176.png 300w\" sizes=\"auto, (max-width: 683px) 100vw, 683px\" \/><\/a><\/li>\n<li>A <em>Service <\/em>node is added to the <em>Bot Actions<\/em> node layout.<\/li>\n<li>Click the Service node to open its <strong>Property <\/strong>window.<\/li>\n<li>Under the <strong>General Settings<\/strong> section, enter the following details:\n<ul>\n<li><strong>Name<\/strong>: GetAccountBalance<\/li>\n<li><strong>Display Name<\/strong>: Get Account Balance<\/li>\n<li><strong>Description<\/strong>: Enter a description to describe the service node.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122927\/BankingBot_propsService.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28721\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122927\/BankingBot_propsService.png\" alt=\"\" width=\"459\" height=\"1043\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122927\/BankingBot_propsService.png 459w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122927\/BankingBot_propsService-132x300.png 132w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720122927\/BankingBot_propsService-451x1024.png 451w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/a><\/li>\n<li>Click <strong>DEFINE REQUEST<\/strong>.\n<ul>\n<li>On the <strong>Define Request<\/strong> page, enter the following details:\n<ul>\n<li><strong>Request type<\/strong> &#8211; <em>GET<\/em><\/li>\n<li><strong>Request URL<\/strong> &#8211; <code>https:\/\/5c3c633d29429300143fe4d2.mockapi.io\/AccountDetails?filter={{context.entities.AccountNumber}}<\/code><br \/>\nDue to the limitations of the dummy API service, instead of fetching the record for the given account number, the response is filtered for the required account number.<\/li>\n<li>This API does not require any Auth, or Header Parameters.<\/li>\n<li>Click the <strong>Test Request<\/strong> tab.<\/li>\n<li>Enter an account number in the <strong>Sample Context Values<\/strong> section. This is the filter parameter needed by the API, you can use the following account number <em>02929664.<\/em><\/li>\n<li>Click <strong>Test<\/strong> on the top-right of the page. Wait for the test to be completed and you get a <em>Status Code: 200<\/em>.<\/li>\n<li>You can see an array of records returned by the API call. In the next step, values are parsed using JavaScript.<\/li>\n<li>Click <strong>Save as Sample Response<\/strong>.<\/li>\n<li>Click <strong>Save<\/strong> on the top-right of the page.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720123023\/BankingBot_testService.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28724\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720123023\/BankingBot_testService.png\" alt=\"\" width=\"1331\" height=\"614\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720123023\/BankingBot_testService.png 1331w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720123023\/BankingBot_testService-300x138.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720123023\/BankingBot_testService-1024x472.png 1024w\" sizes=\"auto, (max-width: 1331px) 100vw, 1331px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>On the\u00a0<strong>Service <\/strong>node Property window, click the\u00a0<strong>Connections\u00a0<\/strong>tab.\n<ul>\n<li>Under the\u00a0<strong>Connection Rules<\/strong> section, ensure that the <strong>Default<\/strong> connection is set to <strong>End of Bot Action<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720140529\/BankingBot_connectionService.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28739\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720140529\/BankingBot_connectionService.png\" alt=\"\" width=\"461\" height=\"539\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720140529\/BankingBot_connectionService.png 461w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720140529\/BankingBot_connectionService-257x300.png 257w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Close the Service Property window.<\/li>\n<li>Click\u00a0<span style=\"color: #ff6600;\"><strong>&#8211;<\/strong><\/span> next to the Bot Action node to collapse the bot action node.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Message_Node\">Message Node<\/span><\/h3>\n<p>A Message node displays a message from the bot to the user. Here, the Message node is used to show the balance.<\/p>\n<ol>\n<li>From the left pane, drag and drop the <strong>Message<\/strong> node below the <strong>Bot Action<\/strong> node, or click the <strong>+<\/strong> icon below the <strong>Bot Action<\/strong> node.<\/li>\n<li>Select <strong>Message<\/strong> from the list and click <strong>+ New Message<\/strong>.<\/li>\n<li>Click the Message node to open its <strong>Property <\/strong>window.<\/li>\n<li>Enter the following details:\n<ul>\n<li><strong>Name<\/strong>: <em>BalanceMessage<\/em><\/li>\n<li><strong>Display Name<\/strong>: <em>Balance Message<\/em><\/li>\n<li><strong>Bot Responses<\/strong>: Define a standard message to send to the user.\n<ul>\n<li>Click <strong>Manage<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124324\/BankingBot_detailsMessage.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28727\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124324\/BankingBot_detailsMessage.png\" alt=\"\" width=\"460\" height=\"812\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124324\/BankingBot_detailsMessage.png 460w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124324\/BankingBot_detailsMessage-170x300.png 170w\" sizes=\"auto, (max-width: 460px) 100vw, 460px\" \/><\/a><\/li>\n<li>On the <strong>Manage User Prompts<\/strong> page, you can find the user prompt.<\/li>\n<li>Open the user prompt to define JavaScript to parse the message for all channels.<\/li>\n<li>Under the <strong>Channels<\/strong> section, select <strong>All<\/strong> from the drop-down list. Refer to the image below.\n<ul>\n<li>Under the <strong>Message <\/strong>section, click the <strong>Advanced<\/strong> tab.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124715\/BankingBot_promptMessage.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28730\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124715\/BankingBot_promptMessage.png\" alt=\"\" width=\"1366\" height=\"768\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124715\/BankingBot_promptMessage.png 1366w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124715\/BankingBot_promptMessage-300x169.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124715\/BankingBot_promptMessage-1024x576.png 1024w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/li>\n<li>Add the following <strong>JavaScript<\/strong>. The JavaScript is written to compare all the records filtered for the <em>AccountType<\/em> as entered by the user and then display the <em>Balance<\/em>.\n<pre>var balance, i;\r\nfor (i=0; i &lt; context.GetAccountBalance.response.body.length; i++ )\r\n{ if (context.GetAccountBalance.response.body[i].AccountType == context.entities.AccountType)\r\n   { balance = context.GetAccountBalance.response.body[i].Balance;\r\n   }\r\n}\r\nif (balance === undefined)\r\n    { print ('Invalid Account, try again ');\r\n    }\r\nelse\r\n    {\r\n    print ('The Balance in your account is ' + balance);\r\n    }<\/pre>\n<\/li>\n<li>Click <strong>Save<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Go back to the Dialog Builder.<\/li>\n<li>On the <strong>Message <\/strong>node Property window, click the <strong>Connections <\/strong>tab.\n<ul>\n<li>Under the <strong>Connection Rules<\/strong> section, change the <strong>Default<\/strong> connection from <strong>Not Connected<\/strong> to <strong>End of Dialog<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124801\/BankingBot_connectionsMessage.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28733\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124801\/BankingBot_connectionsMessage.png\" alt=\"\" width=\"465\" height=\"485\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124801\/BankingBot_connectionsMessage.png 465w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720124801\/BankingBot_connectionsMessage-288x300.png 288w\" sizes=\"auto, (max-width: 465px) 100vw, 465px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Close the Property window.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Test\">Test<\/span><\/h3>\n<p>To test the dialog task, you can use the <strong>Talk to bot<\/strong> option at the bottom-right.<\/p>\n<ol>\n<li>Enter the following utterance (intent name) <strong>Get Balance<\/strong><em>.<\/em><\/li>\n<li>Follow the bot instructions:\n<ul>\n<li>Enter Account Number &#8211; 67846279<\/li>\n<li>Select Account Type &#8211; Savings<\/li>\n<\/ul>\n<\/li>\n<li>See the Account Balance.<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720140029\/BankingBot_test.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28736\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720140029\/BankingBot_test.png\" alt=\"\" width=\"497\" height=\"717\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720140029\/BankingBot_test.png 497w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20210720140029\/BankingBot_test-208x300.png 208w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Next_Steps\">Next Steps<\/span><\/h2>\n<p>Now that you have added the <em>Get Balance<\/em> dialog task to the Banking bot, the next step is to add the Update Balance task. For convenience, the steps for <em>Update Balance<\/em> are split into different documents. <a href=\"\/docs\/bots\/how-tos\/banking-bot-update-balance\/\">Click here to continue<\/a>.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"This document helps you create a sample banking bot. This bot is used in various use case scenarios presented in the How-Tos section of the developer documentation. Prerequisites The following are the prerequisites: You must have signed up with the Kore.ai Bots Platform. You must be aware of the basics concepts of bot-building (refer to...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74],"tags":[],"class_list":["post-23388","post","type-post","status-publish","format-standard","hentry","category-how-tos"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/23388","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/comments?post=23388"}],"version-history":[{"count":15,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/23388\/revisions"}],"predecessor-version":[{"id":39320,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/23388\/revisions\/39320"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/media?parent=23388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/categories?post=23388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/tags?post=23388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}