{"id":24023,"date":"2020-07-15T09:41:16","date_gmt":"2020-07-15T08:41:16","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-3\/?p=24023"},"modified":"2022-03-30T15:29:33","modified_gmt":"2022-03-30T14:29:33","slug":"how-to-add-data-tables","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-3\/docs\/bots\/how-tos\/how-to-add-data-tables\/","title":{"rendered":"Adding Data to Data Tables"},"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>In this How-To, we will explore a scenario in a Banking Bot, where the account-related data for a customer is stored in a Data Table. We will see how the required information gathered from the user can be stored.<\/p>\n<p>For details on what Data Tables are and how it is implemented in the Kore.ai Bots platform, <a href=\"\/docs\/bots\/advanced-topics\/data-as-a-service\/\" target=\"_blank\" rel=\"noopener noreferrer\">refer here<\/a>.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small 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<h1><span class=\"ez-toc-section\" id=\"Problem_Statement\">Problem Statement<\/span><\/h1>\n<p>Consider a Banking Bot, for a given customer, the following data needs to be stored:<\/p>\n<ol>\n<li>Id;<\/li>\n<li>Name;<\/li>\n<li>Email id;<\/li>\n<li>Address; and<\/li>\n<li>Type<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24026\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table.png\" alt=\"\" width=\"1091\" height=\"557\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table.png 1091w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table-300x153.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table-1024x523.png 1024w\" sizes=\"auto, (max-width: 1091px) 100vw, 1091px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small 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=\"Pre-requisites\">Pre-requisites<\/span><\/h2>\n<ul>\n<li>Bot building knowledge;<\/li>\n<li>A Banking Bot.<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small 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<h1><span class=\"ez-toc-section\" id=\"Configurations\">Configurations<\/span><\/h1>\n<p>Let us consider each of the following scenarios one by one:<\/p>\n<ol>\n<li>Define Data Table with the above requirements;<\/li>\n<li>Dialog Task to:\n<ol>\n<li>gather required information; and<\/li>\n<li>invoke a service to update the customer information.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\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=\"Data_Table_Configuration\">Data Table Configuration<\/span><\/h2>\n<p>Create a Data Table to hold the following information:<\/p>\n<ul>\n<li>CustId &#8211; A unique identifier for a customer;<\/li>\n<li>CustName &#8211; Name of the customer;<\/li>\n<li>CustEmail &#8211; Email id of the customer;<\/li>\n<li>CustType &#8211; Type of customer &#8211; Regular, Preferred, etc.<\/li>\n<li>Address &#8211; Customer Address;<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"Table_Creation\">Table Creation<\/span><\/h3>\n<ol>\n<li>Log in to the Kore.ai Bot Builder platform.<\/li>\n<li>Select the\u00a0<strong>Data<\/strong> tab.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715101834\/DTUC_data.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24036\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715101834\/DTUC_data.png\" alt=\"\" width=\"1362\" height=\"237\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715101834\/DTUC_data.png 1362w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715101834\/DTUC_data-300x52.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715101834\/DTUC_data-1024x178.png 1024w\" sizes=\"auto, (max-width: 1362px) 100vw, 1362px\" \/><\/a><\/li>\n<li>Click the\u00a0<strong>New Table<\/strong> button.<\/li>\n<li>In the New Table page enter the following:\n<ol>\n<li><strong>Name<\/strong>, say <em>customertable;<\/em><\/li>\n<li><strong>Description<\/strong>, say <em>Table containing customer details;<\/em><\/li>\n<\/ol>\n<\/li>\n<li>Under the <strong>Column <\/strong>section add the following details:<br \/>\n<table>\n<tbody>\n<tr>\n<th>Column Name<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Additional Settings<\/th>\n<\/tr>\n<tr>\n<td>CustId<\/td>\n<td>number<\/td>\n<td>Yes<\/td>\n<td>Encrypted &amp; Max Length of 5<\/td>\n<\/tr>\n<tr>\n<td>CustName<\/td>\n<td>string<\/td>\n<td>Yes<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>Address<\/td>\n<td>string<\/td>\n<td>No<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<tr>\n<td>CustType<\/td>\n<td>string<\/td>\n<td>No<\/td>\n<td>Default Value as Preferred<\/td>\n<\/tr>\n<tr>\n<td>CustEmail<\/td>\n<td>string<\/td>\n<td>No<\/td>\n<td>&#8211;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24026\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table.png\" alt=\"\" width=\"1091\" height=\"557\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table.png 1091w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table-300x153.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715095245\/DTUC_table-1024x523.png 1024w\" sizes=\"auto, (max-width: 1091px) 100vw, 1091px\" \/><\/a><\/li>\n<li>Under the\u00a0<strong>Indexes<\/strong> section add an index for CustId to be unique.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717104832\/DTUC_table_index.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24055\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717104832\/DTUC_table_index.png\" alt=\"\" width=\"1081\" height=\"227\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717104832\/DTUC_table_index.png 1081w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717104832\/DTUC_table_index-300x63.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717104832\/DTUC_table_index-1024x215.png 1024w\" sizes=\"auto, (max-width: 1081px) 100vw, 1081px\" \/><\/a><\/li>\n<li>Click\u00a0<strong>Create<\/strong> and your table is ready.<\/li>\n<li>Under the\u00a0<strong>Bot Assignments<\/strong> add the bot which would be using this table, say\u00a0<em>Banking Bot,<\/em> and give <em>Read<\/em>, <em>Write<\/em> and <em>Delete<\/em> permissions.\u00a0<em>Delete<\/em>permission is optional since we would not be deleting data.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715104055\/DTUC_table_assign.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24037\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715104055\/DTUC_table_assign.png\" alt=\"\" width=\"705\" height=\"205\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715104055\/DTUC_table_assign.png 705w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715104055\/DTUC_table_assign-300x87.png 300w\" sizes=\"auto, (max-width: 705px) 100vw, 705px\" \/><\/a><\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\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=\"Dialog_Task_Configuration\">Dialog Task Configuration<\/span><\/h2>\n<p>We will be creating a dialog task to gather the required information, and use a Service node to update the data table with the values thus gathered.<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717113133\/DTUC_dialog.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24059\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717113133\/DTUC_dialog.png\" alt=\"\" width=\"923\" height=\"527\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717113133\/DTUC_dialog.png 923w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717113133\/DTUC_dialog-300x171.png 300w\" sizes=\"auto, (max-width: 923px) 100vw, 923px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Create_Dialog_Task\">Create Dialog Task<\/span><\/h3>\n<ol>\n<li>From the left navigation menu, select\u00a0<strong>Bot Tasks -&gt; Dialog Tasks.<\/strong><\/li>\n<li>Click the\u00a0<strong>+<\/strong> against the\u00a0<strong>Dialog Tasks<\/strong> to create a new Task\n<ul>\n<li>Enter\u00a0<strong>IntentName<\/strong>, say,\u00a0<em>AddCustomer<\/em><\/li>\n<li><strong>Create &amp; Proceed<\/strong> to open the dialog builder page.<\/li>\n<\/ul>\n<\/li>\n<li>Retain the Intent Node default settings, and close the Intent Node.<\/li>\n<li>Click the\u00a0<strong>+<\/strong> next to the intent node and add four <strong>Entities<\/strong> as follows:<br \/>\n<table>\n<tbody>\n<tr>\n<th>Entity Name<\/th>\n<th>Type<\/th>\n<th>User Prompts<\/th>\n<\/tr>\n<tr>\n<td>CustName<\/td>\n<td>String<\/td>\n<td>Enter your name<\/td>\n<\/tr>\n<tr>\n<td>CustEmail<\/td>\n<td>Email<\/td>\n<td>Enter your email id<\/td>\n<\/tr>\n<tr>\n<td>CustAddress<\/td>\n<td>City<\/td>\n<td>Enter your address city<\/td>\n<\/tr>\n<tr>\n<td>CustType<\/td>\n<td>List of items (enumerated)<\/td>\n<td>Select your income range<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>CustType can be Basic, Preferred, or Premium based on the income level of the customer. For this purpose, we have used a static list to populate the CustType value as follows:<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715112733\/DTUC_dialog_loi.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24038\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715112733\/DTUC_dialog_loi.png\" alt=\"\" width=\"1357\" height=\"617\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715112733\/DTUC_dialog_loi.png 1357w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715112733\/DTUC_dialog_loi-300x136.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200715112733\/DTUC_dialog_loi-1024x466.png 1024w\" sizes=\"auto, (max-width: 1357px) 100vw, 1357px\" \/><\/a><\/li>\n<li>For generating the CustID, we need to get the last customer id in the table and add one to it. For this, we will first fetch data from the table and then use a Script node to process the id.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\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=\"Fetch_Data\">Fetch Data<\/span><\/h3>\n<p>You can use a Service call to fetch data from the table:<\/p>\n<ol>\n<li>Click the\u00a0<strong>+<\/strong> against the last entity node.<\/li>\n<li>Select\u00a0<strong>Service -&gt; New Service Node<\/strong> option.<\/li>\n<li>From the\u00a0<strong>General Settings<\/strong> section configure the following:\n<ul>\n<li><strong>Name<\/strong> say <em>GetLastCustId<\/em><\/li>\n<li><strong>Display Name<\/strong> say <em>Get Customer Data<\/em><\/li>\n<li><strong>Service Type<\/strong> select\u00a0<em>Data Service<\/em><\/li>\n<li><strong>Type<\/strong> select\u00a0<em>Table<\/em><\/li>\n<\/ul>\n<\/li>\n<li>Under\u00a0<strong>Request Definition<\/strong> click\u00a0<strong>Add Request<\/strong> to define a request to fetch data from the table.<\/li>\n<li>In the <strong>Data Service Request Definition<\/strong> page, enter the following:\n<ul>\n<li style=\"list-style-type: none\">\n<ul>\n<li><strong>Choose Table Name<\/strong> as <em>customertable<\/em><\/li>\n<li><strong>Actions<\/strong> as <em>Get Data<\/em><br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717105336\/DTUC_dialog_get-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24056\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717105336\/DTUC_dialog_get-1.png\" alt=\"\" width=\"697\" height=\"767\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717105336\/DTUC_dialog_get-1.png 697w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717105336\/DTUC_dialog_get-1-273x300.png 273w\" sizes=\"auto, (max-width: 697px) 100vw, 697px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><strong>Test<\/strong> and <strong>Save<\/strong> the definition and\u00a0<strong>close<\/strong> the service node.<\/li>\n<li>Add a\u00a0<strong>Script<\/strong> node to process the values fetched from the data service to obtain the value for the next customer id using the following script:\n<pre>var resultSet = context.GetLastCustId.response.body.queryResult;\r\nvar id = 0;\r\n\r\nif (!resultSet.length) {\r\n    id=1;\r\n} else {\r\n    for (var i=0; i&lt;resultSet.length; i++) {\r\n        if (id &lt; resultSet[i].CustId) {\r\n            id = resultSet[i].CustId;\r\n         }\r\n        }\r\n    id++;    \r\n    }\r\ncontext.lastID = id;<\/pre>\n<\/li>\n<li>Now we have all the required data to add to the table.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\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=\"Add_Data\">Add Data<\/span><\/h3>\n<p>We will be using a Service call to add data to the table:<\/p>\n<ol>\n<li>Click the\u00a0<strong>+<\/strong> against the last Entity node added above.<\/li>\n<li>Select\u00a0<strong>Service -&gt; New Service Node<\/strong> option.<\/li>\n<li>From the\u00a0<strong>General Settings<\/strong> section configure the following:\n<ul>\n<li><strong>Name<\/strong> say\u00a0<em>AddCustData<\/em><\/li>\n<li><strong>Display Name<\/strong> say\u00a0<em>Add Customer Data<\/em><\/li>\n<li><strong>Service Type<\/strong> select\u00a0<em>Data Service<\/em><\/li>\n<li><strong>Type<\/strong> select\u00a0<em>Table<\/em><\/li>\n<\/ul>\n<\/li>\n<li>Under\u00a0<strong>Request Definition<\/strong> click\u00a0<strong>Add Request<\/strong> to define a request to add data to the table.<\/li>\n<li>In the <strong>Data Service Request Definition<\/strong> page, enter the following:\n<ul>\n<li><strong>Choose Table Name<\/strong> as <em>customertable<\/em> defined earlier<\/li>\n<li><strong>Actions<\/strong> as\u00a0<em>Add Data<\/em><\/li>\n<li><strong>Assign Values<\/strong> from the entities defined as follows:<br \/>\n<table>\n<tbody>\n<tr>\n<th>Column<\/th>\n<th>Entity context<\/th>\n<\/tr>\n<tr>\n<td>CustName<\/td>\n<td>{{context.entities.CustName}}<\/td>\n<\/tr>\n<tr>\n<td>CustEmail<\/td>\n<td>{{context.entities.CustEmail}}<\/td>\n<\/tr>\n<tr>\n<td>Address<\/td>\n<td>{{context.entities.CustAddress}}<\/td>\n<\/tr>\n<tr>\n<td>CustType<\/td>\n<td>{{context.entities.CustType}}<\/td>\n<\/tr>\n<tr>\n<td>CustId<\/td>\n<td>{{context.lastID}}<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717105845\/DTUC_dialog_add-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24057\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717105845\/DTUC_dialog_add-1.png\" alt=\"\" width=\"697\" height=\"619\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717105845\/DTUC_dialog_add-1.png 697w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-3\/wp-content\/uploads\/sites\/43\/20200717105845\/DTUC_dialog_add-1-300x266.png 300w\" sizes=\"auto, (max-width: 697px) 100vw, 697px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li>Add a <strong>Message node<\/strong> to display the values added using the following response format:<br \/>\n<code>'Customer account created for: {{context.GetCustData.response.body.queryResult[0].CustName}}, {{context.GetCustData.response.body.queryResult[0].CustEmail}}, {{context.GetCustData.response.body.queryResult[0].CustAddress}}, {{context.GetCustData.response.body.queryResult[0].CustType}}'<\/code><\/li>\n<li>Using <strong>Talk to bot<\/strong> option, enter the values when prompted and see the message being displayed.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small 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<h1><span class=\"ez-toc-section\" id=\"Conclusion\">Conclusion<\/span><\/h1>\n<p>In this post, we have seen:<\/p>\n<ul>\n<li>How to create a Data Table;<\/li>\n<li>Add columns to the Table;<\/li>\n<li>How to fetch the data from the table using a service node and use it for further processing;<\/li>\n<li>How to add data to the table from the Dialog task using a service node;<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h1><span class=\"ez-toc-section\" id=\"Next_Steps\">Next Steps<\/span><\/h1>\n<ul>\n<li><a href=\"\/docs\/bots\/how-tos\/how-to-update-data-in-data-tables\/\" target=\"_blank\" rel=\"noopener noreferrer\">Click here<\/a> for steps on how to update the data table.<\/li>\n<li><a href=\"\/docs\/bots\/how-tos\/how-to-add-data-into-data-tables-from-digital-forms\/\">Click here<\/a> for steps on how to add data obtained from the digital forms.<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small 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":"In this How-To, we will explore a scenario in a Banking Bot, where the account-related data for a customer is stored in a Data Table. We will see how the required information gathered from the user can be stored. For details on what Data Tables are and how it is implemented in the Kore.ai Bots...","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-24023","post","type-post","status-publish","format-standard","hentry","category-how-tos"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/posts\/24023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/comments?post=24023"}],"version-history":[{"count":12,"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/posts\/24023\/revisions"}],"predecessor-version":[{"id":39327,"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/posts\/24023\/revisions\/39327"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/media?parent=24023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/categories?post=24023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-3\/wp-json\/wp\/v2\/tags?post=24023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}