{"id":23796,"date":"2020-07-03T16:47:31","date_gmt":"2020-07-03T15:47:31","guid":{"rendered":"https:\/\/developer.kore.ai\/v7-3\/?p=23796"},"modified":"2020-07-03T16:47:31","modified_gmt":"2020-07-03T15:47:31","slug":"working-with-the-form-node","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-3\/docs\/bots\/bot-builder-tool\/dialog-task\/working-with-the-form-node\/","title":{"rendered":"Working with the Form Node"},"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><\/div><\/section><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\"><\/div><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>Form node lets you integrate the UI Forms into a Dialog Task. This would facilitate the presentation of form to capture user inputs for specific use cases.<\/p>\n<p>The primary purpose of the Form Node is to represent a UI Form in the dialog task and make the form available for the end-users on their channel. For example, let&#8217;s consider a banking bot that has a form to capture the customer details for opening a new account. You may want to use the form instead of prompting for each and every entity value.<\/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<h3 id=\"d-step1\"><span class=\"ez-toc-section\" id=\"Step_1_Adding_a_Form_Node_to_the_Dialog_Task\">Step 1: Adding a Form Node to the Dialog Task<\/span><\/h3>\n<ol>\n<li>Open the Dialog Task in which you want to add the Form node.<\/li>\n<li>Hover over the node next to which you want to add the node, and click the <strong>Plus<\/strong>\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"icon alignnone wp-image-9160\" src=\"\/wp-content\/uploads\/sites\/15\/DIYDialogTaskPlusIcon.png\" alt=\"diydialogtaskplusicon\" width=\"15\" height=\"15\" \/>\u00a0icon.<\/li>\n<li>Go to <b>Form <\/b>and select the UI Forms from the available list (Note you cannot create a new Form Node from within a Dialog like other nodes).<\/li>\n<li>The Component Properties panel opens.<\/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<h3><span class=\"ez-toc-section\" id=\"Step_2_Configuring_the_Component_Properties\">Step 2: Configuring the Component Properties<\/span><\/h3>\n<p>The Form Component Properties allow you to configure the General Settings, User, and Error Prompts.<\/p>\n<div class=\"alert alert-info\"><b>Note:<\/b> The configurations you set up or modify in this section <span style=\"text-decoration: underline\">are reflected in all other Dialog Tasks<\/span> that use this node.<\/div>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/UIForms-dialog-props.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-23291\" src=\"\/wp-content\/uploads\/sites\/15\/UIForms-dialog-props.png\" alt=\"\" width=\"820\" height=\"920\" \/><\/a><\/p>\n<ol>\n<li>Enter a <strong>Name<\/strong> and <strong>Display Name<\/strong> for the Entity node. Entity names cannot have spaces.\u00a0The <strong>UI Form<\/strong> property is set to the UI Form you selected and cannot be changed.<\/li>\n<li>In the <b>Prompt Message<\/b> text box, enter the prompt message that you want the user to see for this form. It would be giving instructions to the user to click on the link to initiate the form. You are advised not to change the context variable reference (of the form <span style=\"font-weight: 400\"><code>{{context.form_node.formLink}}<\/code>)<\/span>coded therein. You can enter channel-specific messages for user prompts. For more information, see <a href=\"\/v7-3\/docs\/bots\/bot-builder-tool\/dialog-task\/prompt-editor\/\">Using the Prompt Editor<\/a>.<\/li>\n<li>In the <b>Error Message<\/b> box, review the default error message, and if required modify it. For more information, see <a href=\"\/v7-3\/docs\/bots\/bot-builder-tool\/dialog-task\/prompt-editor\/\">Using the Prompt Editor<\/a>.<\/li>\n<li>In the <b>Submit Message<\/b> box, review the default message to be displayed after successful submission of the form, and if required modify it. This message is applicable only when the UI Form is opened in a browser tab and not for Web\/Mobile SDK. For more information, see <a href=\"\/v7-3\/docs\/bots\/bot-builder-tool\/dialog-task\/prompt-editor\/\">Using the Prompt Editor<\/a>.<\/li>\n<li>In the <strong>Web\/Mobile SDK Form Behavior<\/strong> section, you can set how the form should be displayed. You have the options of:\n<ul>\n<li><em>Open full page popup form<\/em> &#8211; this is the default setting where the form will be opened as a full page on the SDK chat interface.<\/li>\n<li><em>Open inline form<\/em> &#8211; The form will be opened as an inline form within the chat 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_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<h3><span class=\"ez-toc-section\" id=\"Step_3_Configuring_the_Instance_Properties\">Step 3: Configuring the Instance Properties<\/span><\/h3>\n<p>Use the Instance Properties to define any user tags that you want to set.<\/p>\n<div class=\"alert alert-info\"><b>Note:<\/b> The settings in the Instance Properties panel are specific to the current Dialog Task and <span style=\"text-decoration: underline\">do not reflect in the other dialog tasks<\/span> that use this entity node.<\/div>\n<p>&nbsp;<\/p>\n<ol>\n<li>Click the Instance Properties icon on the Entity node.<\/li>\n<li><strong>Custom Tags\u00a0<\/strong>defines tags to build custom profiles of your bot conversations. <a href=\"\/v7-3\/docs\/bots\/bot-builder-tool\/dialog-task\/custom-meta-tags\/\">See here for more<\/a>.<\/li>\n<\/ol>\n<ul>\n<li style=\"list-style-type: none\"><\/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>\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=\"Step_4_Configuring_the_Connections_Properties\">Step 4: Configuring the Connections Properties<\/span><\/h3>\n<p>From the node\u2019s Connections panel you can determine which node in the dialog task to execute next. You can write the conditional statements based on the values of any Entity or Context Objects in the dialog task, or you can use intents for transitions.<br \/>\nTo setup Component Transitions, follow these steps:<\/p>\n<ol>\n<li>You can select from the available nodes under the\u00a0<strong>Default<\/strong> connections.<\/li>\n<li>To configure a conditional flow, click <b>Add IF<\/b>.<\/li>\n<li>Configure the conditional expression based on one of the following criteria:\n<ol>\n<li><b>Entity<\/b>: Compare an Entity node in the dialog with a specific value using one of these operators: <b>Exists<\/b>, <b>equals to<\/b>, <b>greater than equals to<\/b>, <b>less than equals to<\/b>, <b>not equal to<\/b>, <b>greater than<\/b>, and <b>less than<\/b>. Select the entity, operator using the respective drop-down lists, and type the number in the <b>Value <\/b>box. Example: <i>PassengerCount (entity) greater than (operator) 5 (specified value)<\/i><\/li>\n<li><b>Context<\/b>: Compare a context object in the dialog with a specific value using one of these operators: <b>Exists<\/b>, <b>equals to<\/b>, <b>greater than equals to<\/b>, <b>less than equals to<\/b>, <b>not equal to<\/b>, <b>greater than<\/b>, and <b>less than. <\/b>Example<b>: <\/b><i>Context.entity.PassengerCount<\/i> <i>(Context object) greater than (operator) 5 (specified value)<\/i><\/li>\n<li><b>Intent: <\/b>Select an intent that should match the next user utterance.<\/li>\n<\/ol>\n<\/li>\n<li>In the <b>Then go to<\/b> the drop-down list, select the next node to execute in the dialog flow if the conditional expression succeeds. For example, if the <i>PassengerCount (entity) greater than (operator) 5 (specified value), <\/i><b>Then go to <\/b><i>Offers (sub-dialog).<\/i><\/li>\n<li>In the <b>Else <\/b>drop-down list, select the node to execute if the condition fails.<\/li>\n<\/ol>\n<div class=\"alert alert-info\"><b>Note:<\/b> If you want to write multiple If conditions, click <strong>Add Else If<\/strong> below the last If conditional expression.<\/div>\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>\n","protected":false},"excerpt":{"rendered":"Form node lets you integrate the UI Forms into a Dialog Task. This would facilitate the presentation of form to capture user inputs for specific use cases. The primary purpose of the Form Node is to represent a UI Form in the dialog task and make the form available for the end-users on their channel....","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-23796","post","type-post","status-publish","format-standard","hentry","category-dialog-task"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts\/23796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/comments?post=23796"}],"version-history":[{"count":1,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts\/23796\/revisions"}],"predecessor-version":[{"id":23810,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts\/23796\/revisions\/23810"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/media?parent=23796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/categories?post=23796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/tags?post=23796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}