{"id":23446,"date":"2020-04-16T08:11:42","date_gmt":"2020-04-16T07:11:42","guid":{"rendered":"https:\/\/developer.kore.ai\/v9-1\/?p=23446"},"modified":"2021-08-27T06:56:31","modified_gmt":"2021-08-27T05:56:31","slug":"banking-bot-transfer-funds","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v9-1\/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=\"\/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=\"\/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<li>You must have created a Banking Bot (<a href=\"\/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=\"\/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=\"\/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.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-1\/wp-content\/uploads\/sites\/22\/20210827065611\/BankingBot_transferFunds.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-1\/wp-content\/uploads\/sites\/22\/20210827065611\/BankingBot_transferFunds.png\" alt=\"\" width=\"601\" height=\"695\" class=\"alignnone size-full wp-image-31812\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-1\/wp-content\/uploads\/sites\/22\/20210827065611\/BankingBot_transferFunds.png 601w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-1\/wp-content\/uploads\/sites\/22\/20210827065611\/BankingBot_transferFunds-259x300.png 259w\" sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/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=\"\/docs\/bots\/how-tos\/creating-a-banking-bot\/\">Get Balance<\/a> and <a href=\"\/docs\/bots\/how-tos\/banking-bot-update-balance\/\">Update Balance<\/a>.<\/li>\n<li>Ensure that the\u00a0<strong>Build\u00a0<\/strong>tab is selected from the top menu.<\/li>\n<li>Navigate to the\u00a0<strong>Conversational Skills -&gt; Dialog\u00a0<\/strong><strong>Task<\/strong>\u00a0page from the left menu.<\/li>\n<li>Click\u00a0<strong>Create Dialog<\/strong>\u00a0from the top right.<\/li>\n<li><strong>Create Dialog\u00a0<\/strong>screen 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 <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<li>You can also include utterances to train this intent.<\/li>\n<li>Select\u00a0<strong>Try Conversation Driven Dialog Builder<\/strong>\u00a0option.<\/li>\n<\/ul>\n<\/li>\n<li>Click <strong>Proceed.<\/strong><\/li>\n<li>Property Panel for User Intent will be displayed. We will retain the default properties.<\/li>\n<li>Note: For instructions with the older Dialog Builder,\u00a0<a href=\"\/v8-1\/docs\/bots\/how-tos\/banking-bot-transfer-funds\/\">refer here<\/a><\/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> below to the User Intent node<\/li>\n<li>Select the <strong>Entity<\/strong> option<\/li>\n<li>Click the <strong>+ New entity\u00a0<\/strong><\/li>\n<li><strong>Property Panel<\/strong> for the Entity Node is displayed. If not click on the newly added entity node to open<\/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:<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<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>: <em>AmountToTransfer<\/em><\/li>\n<li><strong>Display Name<\/strong>: <em>Amount To Transfer\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=\"\/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> below 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. If not click on the newly added dialog node to open<\/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>AccountType<\/strong>: <em>savings<\/em><\/li>\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>TransactionType<\/strong>: <em>Debit<\/em> (payer account needs to be deducted of the transferred amount)<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-1\/wp-content\/uploads\/sites\/22\/20210722125406\/BankingBot_TF_updateDialog.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28775\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-1\/wp-content\/uploads\/sites\/22\/20210722125406\/BankingBot_TF_updateDialog.png\" alt=\"\" width=\"457\" height=\"707\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-1\/wp-content\/uploads\/sites\/22\/20210722125406\/BankingBot_TF_updateDialog.png 457w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-1\/wp-content\/uploads\/sites\/22\/20210722125406\/BankingBot_TF_updateDialog-194x300.png 194w\" sizes=\"auto, (max-width: 457px) 100vw, 457px\" \/><\/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>AccountType<\/strong>: <em>savings<\/em><\/li>\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>TransactionType<\/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> below the UpdateBalance [2] Service node<\/li>\n<li>Select <strong>Message<\/strong> and click the &#8216;+ <strong>New message<\/strong>&#8216;<\/li>\n<li><strong>Property Panel<\/strong> for the Message Node is displayed. If not click on the newly added dialog node to open<\/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:\u00a0<code>The amount {{context.entities.AmountToTransfer}} has been transferred from {{context.entities.PayerAccount}} to {{context.entities.PayeeAccount}}<\/code><\/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>&#8220;<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":1,"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\/v9-1\/wp-json\/wp\/v2\/posts\/23446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/comments?post=23446"}],"version-history":[{"count":7,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/posts\/23446\/revisions"}],"predecessor-version":[{"id":31814,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/posts\/23446\/revisions\/31814"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/media?parent=23446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/categories?post=23446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-1\/wp-json\/wp\/v2\/tags?post=23446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}