{"id":23446,"date":"2020-04-16T08:11:42","date_gmt":"2020-04-16T07:11:42","guid":{"rendered":"https:\/\/developer.kore.ai\/v7-2\/?p=23446"},"modified":"2020-04-16T08:11:42","modified_gmt":"2020-04-16T07:11:42","slug":"banking-bot-transfer-funds","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-2\/docs\/bots\/how-tos\/banking-bot-transfer-funds\/","title":{"rendered":"Banking Bot &#8211; Transfer Funds"},"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 is document details steps in creating 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<p><strong>Prerequisites<\/strong>:<\/p>\n<ul>\n<li>You must have <a href=\"\/v7-2\/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 of Bot building (refer to <a href=\"\/v7-2\/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=\"\/v7-2\/docs\/bots\/chatbot-overview\/creating-a-simple-bot\/\">refer here<\/a> for an example)<\/li>\n<li>You must have created a Banking Bot (<a href=\"\/v7-2\/docs\/bots\/how-tos\/creating-a-banking-bot\/\" target=\"_blank\" rel=\"noopener noreferrer\">refer here<\/a> for 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 will be building will be performing the basic banking transactions.<br \/>\nThis Bot will:<\/p>\n<ul>\n<li>Get account balance based on the Account Number and Account Type entered by the user, as <a href=\"\/v7-2\/docs\/bots\/how-tos\/creating-a-banking-bot\/\" target=\"_blank\" rel=\"noopener noreferrer\">seen here<\/a>.<\/li>\n<li>Update accounts with the balance, <a href=\"\/v7-2\/docs\/bots\/how-tos\/banking-bot-update-balance\/\" target=\"_blank\" rel=\"noopener noreferrer\">as seen here<\/a>.<\/li>\n<li>Transfer a specified amount from the user account to a payee account.<\/li>\n<\/ul>\n<p>Let us add the Transfer Funds task.<\/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=\"Transfer_Funds_Intent\">Transfer Funds Intent<\/span><\/h2>\n<ul>\n<li>The Transfer Funds task will prompt the user to enter Payee and Payer account number.<\/li>\n<li>Next it would prompt for the amount to be transferred.<\/li>\n<li>It will then make a service call to update the accounts appropriately.<\/li>\n<li>The message indicating success or failure is displayed.<\/li>\n<li><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/BB_TransferFunds.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23459\" src=\"\/wp-content\/uploads\/sites\/13\/BB_TransferFunds.png\" alt=\"\" width=\"1361\" height=\"766\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095011\/BB_TransferFunds.png 1361w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095011\/BB_TransferFunds-300x169.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095011\/BB_TransferFunds-1024x576.png 1024w\" sizes=\"auto, (max-width: 1361px) 100vw, 1361px\" \/><\/a><\/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<h3><span class=\"ez-toc-section\" id=\"Step_1_Dialog_Task\">Step 1: Dialog Task<\/span><\/h3>\n<p>We need to add an Intent Dialog as the first step in the Bot. Intent Dialog is the first step in the user-bot conversation flow.<\/p>\n<ul>\n<li>Open the Banking Bot with the two pre-configured tasks &#8211; <a href=\"\/v7-2\/docs\/bots\/how-tos\/creating-a-banking-bot\/\">Get Balance<\/a> and <a href=\"\/v7-2\/docs\/bots\/how-tos\/banking-bot-update-balance\/\">Update Balance<\/a>.<\/li>\n<li>From the left navigation menu, select\u00a0<strong>Bot Tasks<\/strong><\/li>\n<li>Click on the <strong>+ <\/strong>next to the\u00a0<strong>Dialog Task<\/strong>.<\/li>\n<li><strong>Bot Task Page<\/strong> will open<\/li>\n<li>Enter the following details:\n<ul>\n<li><strong>Intent Name<\/strong> &#8211; Enter the Intent name, this is the phrase that triggers the dialog. The intent name should be simple and not more than 3-4 words. For example, &#8216;Transfer Funds&#8217;<\/li>\n<li>Under the <strong>More Options<\/strong>, you can add a <strong>description<\/strong> and other dialog related details. Let&#8217;s retain the default settings.<\/li>\n<\/ul>\n<\/li>\n<li>Click <strong>Create &amp; Proceed.<\/strong><\/li>\n<li>Property Panel for User Intent will be displayed. We will retain the default properties.<\/li>\n<li>Close the User Intent Property Panel.<\/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<h3><span class=\"ez-toc-section\" id=\"Step_2_Entity_nodes\">Step 2: Entity nodes<\/span><\/h3>\n<p>Entity Node is typically used to gather information from the user.<br \/>\nHere we will be using it to capture the user input for the Payee and Payer Account Number and amount to be transferred.<\/p>\n<ul>\n<li>Click the <strong>+<\/strong> next to the User Intent node<\/li>\n<li>Select the <strong>Entity<\/strong> option<strong>.<\/strong><\/li>\n<li>Click the <strong>New entity node +<\/strong><\/li>\n<li><strong>Property Panel<\/strong> for the Entity Node is displayed<\/li>\n<li>Enter the following details:\n<ul>\n<li><strong>Name<\/strong>: <em>PayerAccount<\/em><\/li>\n<li><strong>Display Name<\/strong>: <em>Payer <\/em><em>Account<\/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 hit enter to save:<br \/>\n<code>Enter the Account from where you want to transfer funds.<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Close the PayerAccount Entity Property Panel.<\/li>\n<li>Repeat the above steps to add another entity with the following details:\n<ul>\n<li><strong>Name<\/strong>: <em>Payee<\/em><em>Account<\/em><\/li>\n<li><strong>Display Name<\/strong>: <em>Payee <\/em><em>Account<\/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 hit enter to save:<br \/>\n<code>Enter the Account to which you want to transfer funds.<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Close the PayeeAccount Entity Property Panel.<\/li>\n<li>Repeat the above steps to add another entity with the following details:\n<ul>\n<li><strong>Name<\/strong>: <i>Amount<\/i><\/li>\n<li><strong>Display Name<\/strong>: <em>Amount\u00a0<\/em><\/li>\n<li><strong>Type<\/strong>:\u00a0<em>Number<\/em><\/li>\n<li><strong>User Prompts:<\/strong> Enter the following text and hit enter to save:<br \/>\n<code>Enter the amount to transfer.<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Close the Amount Entity Property Panel.<\/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<p>The next steps would update the balance in both the Payer and Payee accounts. Since we already have <a href=\"\/v7-2\/docs\/bots\/how-tos\/banking-bot-update-balance\/\" target=\"_blank\" rel=\"noopener noreferrer\">Update Balance<\/a> task, we will see how to run it from the current task.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_3_Run_Dialog_Task\">Step 3: Run Dialog Task<\/span><\/h3>\n<p>Pre-defined dialog tasks can be triggered from within another task. Let us see how.<\/p>\n<ul>\n<li>Click the <strong>+<\/strong> next to the Amount Entity node<\/li>\n<li>Select <strong>Dialog Task<\/strong><\/li>\n<li>From the given task list, select the required task &#8211; <strong>UpdateBalance<\/strong><\/li>\n<li><strong>Property Panel<\/strong> for the Dialog Node is displayed<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/BB_TF_dialog.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23482\" src=\"\/wp-content\/uploads\/sites\/13\/BB_TF_dialog.png\" alt=\"\" width=\"813\" height=\"291\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095007\/BB_TF_dialog.png 813w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095007\/BB_TF_dialog-300x107.png 300w\" sizes=\"auto, (max-width: 813px) 100vw, 813px\" \/><\/a><\/li>\n<li>Navigate to the <strong>Instance Properties<\/strong> tab and enter the following details:<\/li>\n<li><strong>Entity Pre-Assignments<\/strong> section &#8211; these are the entity values required by the Dialog Task if they are not populated here the user will be prompted to enter the same. Since we have already collected the information through the entities defined in the previous step we will be passing those user-entered values to the UpdateBalance task\n<ul>\n<li><strong>AccountNumber<\/strong>: <em>context.entities.PayerAccount<\/em><\/li>\n<li><strong>Amount<\/strong>: <em>context.entities.Amount<\/em><\/li>\n<li><strong>DBorCR<\/strong>: <em>Debit<\/em> (payer account needs to be deducted of the transferred amount)<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/BB_TF_dialogEntities.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23483\" src=\"\/wp-content\/uploads\/sites\/13\/BB_TF_dialogEntities.png\" alt=\"\" width=\"809\" height=\"445\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095006\/BB_TF_dialogEntities.png 809w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/13\/20221201095006\/BB_TF_dialogEntities-300x165.png 300w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Close the UpdateBalance Dialog Properties panel.<\/li>\n<li>Repeat the same steps to Update the Payee Account with the following values<\/li>\n<li><strong>Entity Pre-Assignments<\/strong> section\n<ul>\n<li><strong>AccountNumber<\/strong>: <em>context.entities.PayeeAccount<\/em><\/li>\n<li><strong>Amount<\/strong>: <em>context.entities.Amount<\/em><\/li>\n<li><strong>DBorCR<\/strong>: <em>Credit<\/em><\/li>\n<\/ul>\n<\/li>\n<li>Close the UpdateBalance Dialog Properties panel.<\/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<h3><span class=\"ez-toc-section\" id=\"Step_4_Message_Node\">Step 4: Message Node<\/span><\/h3>\n<p>A Message Node is used to display a message from the Bot to the user.<br \/>\nHere we will be using the Message node to show the balance.<\/p>\n<ul>\n<li>Click the <strong>+<\/strong> next to the UpdateBalance [2] Service node<\/li>\n<li>Select <strong>Message<\/strong> and click the &#8216;<strong>New message node +<\/strong>&#8216;<\/li>\n<li><strong>Property Panel<\/strong> for the Message Node is displayed<\/li>\n<li>Enter the following details:\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><strong>Name<\/strong>: <em>FinalMessage<\/em><\/li>\n<li><strong>Display Name<\/strong>: <em>Final Message<\/em><\/li>\n<li><strong>Bot Responses:<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>On the Bot Response Property Panel, open the connections tab by clicking the &#8216;<strong>Connections<\/strong>&#8216; icon.\n<ul>\n<li>Change the <strong>Default<\/strong> connection from &#8216;<em>Not Connected<\/em>&#8216; to &#8216;<em>End of Dialog<\/em>&#8216;.<\/li>\n<li>Click\u00a0<strong>Save<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<li>Close the Property Panel.<\/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<h3><span class=\"ez-toc-section\" id=\"Test\">Test<\/span><\/h3>\n<p>To test the Dialog task, you can use the &#8216;Talk to bot&#8217; at the bottom right corner.<br \/>\nEnter the following utterance (intent name)<br \/>\n&#8220;<em>Transfer Funds<\/em>&#8221;<br \/>\nFollow the Bot instructions:<\/p>\n<ul>\n<li>Enter Payer Account &#8211; 02929664;<\/li>\n<li>Enter Payee Account &#8211; 44994354;<\/li>\n<li>Enter Transfer Amount &#8211; 200<\/li>\n<li>See the success message.<\/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><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"This is document details steps in creating a sample banking bot. This bot is used in various use case scenarios presented in the How-Tos section of the developer documentation. Prerequisites: You must have signed up with the Kore.ai Bots Platform You must be aware of the basics of Bot building (refer to this link) You...","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74],"tags":[],"class_list":["post-23446","post","type-post","status-publish","format-standard","hentry","category-how-tos"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/23446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/comments?post=23446"}],"version-history":[{"count":4,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/23446\/revisions"}],"predecessor-version":[{"id":23484,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/23446\/revisions\/23484"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/media?parent=23446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/categories?post=23446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/tags?post=23446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}