{"id":22295,"date":"2019-08-16T12:43:47","date_gmt":"2019-08-16T11:43:47","guid":{"rendered":"https:\/\/developer.kore.ai\/v7-1\/?p=22295"},"modified":"2021-03-30T12:43:01","modified_gmt":"2021-03-30T11:43:01","slug":"working-with-the-confirmation-nodes","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-1\/docs\/bots\/bot-builder-tool\/dialog-task\/working-with-the-confirmation-nodes\/","title":{"rendered":"Working with the Confirmation Nodes"},"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><strong>Confirmation node<\/strong> allows you to prompt the user for a \u201c<em>yes<\/em>\u201d or \u201c<em>no<\/em>\u201d answer. It helps in the verification or allowing users to accept or decline a choice.<\/p>\n<p>For example, in the <strong>Books Flight Bot<\/strong>, you can use a Confirmation node to prompt the user to respond if they would like to know the weather forecast of the destination.<\/p>\n<p>Confirmation node\u2019s conditional transitions go beyond the If-Else If- Else expressions. The transition depends on user reply: assertion (yes) or negation (no). The Else condition comes into play if their answer isn\u2019t both.<\/p>\n<p><strong>Setting up a Confirmation Node<\/strong><\/p>\n<p>Setting up a Confirmation node in a Dialog task involves the following steps.<\/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><span class=\"ez-toc-section\" id=\"Step_1_Adding_a_Confirmation_Node_to_the_Dialog_Task\">Step 1: Adding a Confirmation Node to the Dialog Task<\/span><\/h3>\n<ol>\n<li>Open the <strong>dialog task<\/strong> to which you want to add the Confirmation node.<\/li>\n<li>Hover over a node next to which you want to add the node, and click the <strong>plus icon<\/strong>.<\/li>\n<li>Select <b>Confirmation &gt; New confirmation node<\/b>. You can select an existing Confirmation Node from the list.<\/li>\n<li>The Component Properties panel for the entity opens.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Navigation-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13915\" src=\"\/wp-content\/uploads\/sites\/12\/Navigation-1.png\" alt=\"\" width=\"640\" height=\"194\" \/><\/a><\/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_User_Prompt\">Step 2: Configuring the User Prompt<\/span><\/h3>\n<div class=\"alert alert-info\"><b>Note<\/b>: The configurations you set up or edit in these sections reflect <span style=\"text-decoration: underline;\">in all other dialog tasks<\/span> that use this node<\/div>\n<p>After you enter a name for the Confirmation node, you can use the User Prompts field to compose the confirmation request either as plain text or as a JavaScript message.<\/p>\n<ol>\n<li>Under the User Prompts section, click <b>Manage Prompts<\/b>. The Prompt Messages window opens.\n<div class=\"alert alert-info\"><b>Note<\/b>: If you want to make text edits to the default sample message, modify the message directly in the text box and press enter.<\/div>\n<\/li>\n<li>Do one the following:\n<ul>\n<li>To edit the default sample message by adding context object variables or javascript code, click the sample message. The Message editor opens.<\/li>\n<li>To add a new prompt message, click <b>Add Prompt Message<\/b>. The Message editor opens.\n<ol>\n<li>In the <b>Channel <\/b>drop-down list,<b> All Channels<\/b> is the default value. To create a channel-specific message, select the channel from the list.<\/li>\n<li>On the Message Editor, the <b>Plain Text <\/b>tab is the default selection. If you want to compose Javascript message, click the <b>JavaScript <\/b>tab.\n<div class=\"alert alert-info\"><b>Note<\/b>: You can use any value that is currently stored in the context. Example: <code>print('Hello'+ context.session.UserContext.firstName+ '. How can I help you')<\/code><\/div>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Prompt.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13916\" src=\"\/wp-content\/uploads\/sites\/12\/Prompt.png\" alt=\"\" width=\"1017\" height=\"409\" \/><\/a><\/li>\n<li>Compose the message and click <b>Save<\/b>.<\/li>\n<li>To add any more bot responses, repeat from step 2b.<\/li>\n<\/ol>\n<\/li>\n<li>You can add context-specific <strong>Synonyms<\/strong> for \u2018Yes\u2019 and \u2018No\u2019 within the Confirmation node to suit the dialog\u2019s context.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/confirm_node-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17042\" src=\"\/wp-content\/uploads\/sites\/12\/confirm_node-1.png\" alt=\"\" width=\"490\" height=\"635\" \/><\/a><\/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<ol>\n<li><strong>Hold &amp; Resume: <\/strong>Confirmation node\u2019s Instance Properties can be used to the Hold &amp; Resume and Precedence Settings.<br \/>\n<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 node.<\/p>\n<ul>\n<li><strong>Use the task level \u2018Hold &amp; Resume\u2019 setting<\/strong>: The bot refers to the Hold &amp; Resume settings set at the dialog task level.<\/li>\n<li><b>Customize for this node option:<\/b> You can customize the Hold &amp; Resume settings for this node by selecting this option and configuring the same. \u00a0Read the <a href=\"\/v7-1\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/bot-intelligence\/interruption-handling-context-switching-intents\/\" target=\"_blank\" rel=\"noopener noreferrer\">Interruption Handling and Context Switching<\/a> article for more information.<\/li>\n<li><strong>Precedence<\/strong>: When user\u2019s input for an entity consists of a valid value for the entity and another intent, you can control the experience by choosing between \u201cIntent over Entity\u201d or \u201cEntity over Intent\u201d options. For example, if a Flight Booking bot prompts for the destination and the user enters, \u201cBangalore, how\u2019s the weather there?\u201d you get to define how the bot responds in such cases &#8211; pick the entity and add the intent to the Follow-up Intents stack or go ahead with the intent first based upon the Hold &amp; Resume settings.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Custom Tags\u00a0<\/strong>defines tags to build custom profiles of your bot conversations. <a href=\"\/v7-1\/docs\/bots\/bot-builder-tool\/dialog-task\/custom-meta-tags\/\">See here for more<\/a>.<\/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_4_Configuring_the_Connections_or_Transitions_Properties\">Step 4: Configuring the Connections (or Transitions) Properties<\/span><\/h3>\n<p>Confirmation node\u2019s conditional transitions go beyond the If-Else If- Else expressions used for the other nodes. You can define conditional expression based on a context object value, else a user assertion (\u201cyes\u201d), or else user negation (\u201cno\u201d). Beyond the three, you can define a fallback Else condition to trigger.<\/p>\n<h5>To setup Component transitions<\/h5>\n<ol>\n<li>Hover over the node, and click the icon. The Connections tab opens.<\/li>\n<li>On the Connections panel, under <b>IF Context<\/b> enter the following:\n<div class=\"alert alert-info\"><b>Note<\/b><i>: <\/i>If you do not want to write a <b>IF Context<\/b>, hover over the section and click the icon in the top right corner.<\/div>\n<ul>\n<li><b>If condition<\/b>: Enter a context object to compare<\/li>\n<li><b>Operator<\/b>: In the drop-down list below, select 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><\/li>\n<li><b>Value: <\/b>Enter the value with which to compare the context object.\u00a0Example<b>: <\/b><i>Context.entity.PassengerCount<\/i> <i>(Context object) greater than (operator) 5 (specified value)<\/i><\/li>\n<li>In the <b>Then go to<\/b> drop-down list, select the node to be executed if this condition succeeds.<\/li>\n<\/ul>\n<\/li>\n<li>Under <strong>Else IF <\/strong><b>user response is affirmative (e.g., \u2018Yes\u2019) <\/b>section, in the <b>Then go to <\/b>drop-down list, and select the node to be executed next if the user\u2019s response is affirmative.<\/li>\n<li>Under <b>Else IF user response is negative (e.g., \u2018No\u2019) <\/b>section, in the <b>Then go to <\/b>drop-down list and select the node to be executed next if the user\u2019s response is affirmative.<\/li>\n<\/ol>\n<div class=\"alert alert-info\"><b>Note<\/b>: When you set up an <b>IF Context<\/b> conditional expression as explained in step 2, the conditions in Steps 3 and 4 come into play only if the <b>IF Context<\/b> expression doesn\u2019t hold true.<\/div>\n<p>If you want to other conditions, click <b>Add Else If <\/b> to write them.<br \/>\nPlatform detection of Yes \/ No is based on below keywords.<br \/>\n<strong>For yes:<\/strong><br \/>\n<code>'kay, &lt;I agree, &lt;I am&gt;, &lt;I am certain&gt;, &lt;I am listening&gt;, &lt;I am pleased to&gt;, &lt;I am sure&gt;, &lt;I can believe it&gt;, &lt;I can believe that&gt;, &lt;I can see that&gt;, &lt;I can try&gt;, &lt;I consent, &lt;I could not agree with you more, &lt;I did&gt;, &lt;I do&gt;, &lt;I give consent, &lt;I give my consent, &lt;I guess so, &lt;I have no objection, &lt;I think so, &lt;I totally agree, &lt;I understand&gt;, &lt;I will drink to that, &lt;O.K., &lt;OK, &lt;a'ight, &lt;a'right, &lt;absolutely, &lt;accept&gt;, &lt;accepted&gt;, &lt;ack, &lt;affirmative&gt;, &lt;agreed, &lt;ah yes, &lt;all right, &lt;alright, &lt;always&gt;, &lt;apparently&gt;, &lt;approved, &lt;ay, &lt;aye, &lt;be my guest, &lt;beyond a doubt&gt;, &lt;bring it on&gt;, &lt;but of course, &lt;by all means, &lt;can not argue with that, &lt;certainly&gt;, &lt;completely, &lt;confirmed, &lt;constantly&gt;, &lt;continue, &lt;correct&gt;, &lt;could be&gt;, &lt;could not have said it better, &lt;da, &lt;damn good, &lt;damn straight, &lt;definitely, &lt;delighted, &lt;do it&gt;, &lt;especially, &lt;evidently&gt;, &lt;exactly, &lt;extremely&gt;, &lt;fantastic&gt;, &lt;fine&gt;, &lt;for sure, &lt;fortune smiles on that, &lt;fully, &lt;generally, &lt;go ahead&gt;, &lt;go ahead with, &lt;he does&gt;, &lt;he is&gt;, &lt;hell yeah, &lt;highly likely&gt;, &lt;how true&gt;, &lt;i guess&gt;, &lt;in this case&gt;, &lt;indeed, &lt;indefinitely, &lt;indubitably&gt;, &lt;it does&gt;, &lt;it is&gt;, &lt;it is highly likely&gt;, &lt;it will be a pleasure to, &lt;it will be my pleasure to, &lt;it would be a pleasure, &lt;let us try&gt;, &lt;make it so&gt;, &lt;makes sense, &lt;most assuredly, &lt;most certainly, &lt;mostly&gt;, &lt;my pleasure&gt;, &lt;naturally&gt;, &lt;no doubt, &lt;no objections&gt;, &lt;no problem&gt;, &lt;nod, &lt;nods, &lt;o.k., &lt;of course, &lt;oh alright, &lt;oh okay, &lt;oh sure, &lt;ok, &lt;okey dokey, &lt;one hundred percent, &lt;only just&gt;, &lt;perfect&gt;, &lt;please do&gt;, &lt;positively, &lt;precisely, &lt;probably&gt;, &lt;right&gt;, &lt;right ,, &lt;right brah, &lt;right on, &lt;righto, &lt;righty-ho, &lt;she does&gt;, &lt;she is&gt;, &lt;shure, &lt;si, &lt;so will you, &lt;sounds wonderful, &lt;supposedly, &lt;sure, &lt;sure thing, &lt;surely, &lt;that is alright, &lt;that is correct, &lt;that is good, &lt;that is right, &lt;thats great , yes, &lt;thats great yes, &lt;they are&gt;, &lt;they do&gt;, &lt;thumbs up, &lt;totally, &lt;true&gt;, &lt;two thumbs up, &lt;uh-huh, &lt;undoubtedly, &lt;unquestionably, &lt;very well, &lt;very well indeed, &lt;we can try&gt;, &lt;we did&gt;, &lt;we do&gt;, &lt;we should try&gt;, &lt;well maybe you are right, &lt;well perhaps you are right, &lt;whatever&gt;, &lt;will do&gt;, &lt;with pleasure, &lt;without a doubt, &lt;wonderful&gt;, &lt;yah, &lt;yay, &lt;yea, &lt;yeah, &lt;yeah definitely, &lt;yeah sure, &lt;yeh, &lt;yep, &lt;yeppers, &lt;yes, &lt;yes please, &lt;yes really, &lt;yip, &lt;you are right, &lt;you bet&gt;, &lt;you could say that&gt;, &lt;you may, &lt;you may be right, &lt;you may have a point, &lt;yup, &lt;yuppers, I would say so, Y, d'accord, it_is_ok, its_ok, okay, okey, positive, right-o, touche, why_not, will_be_nice, ya, yes, yo, you_bet_you, ys<\/code><br \/>\n<strong>For no:<\/strong><br \/>\n<code>&lt;I am afraid I disagree with you, &lt;I am afraid I do not agree, &lt;I am afraid not, &lt;I am not sure I agree, &lt;I am not sure that I, &lt;I could not disagree more, &lt;I disagree, &lt;I do not&gt;, &lt;I do not agree, &lt;I do not believe it&gt;, &lt;I do not believe so, &lt;I do not believe you&gt;, &lt;I do not think so, &lt;I do not want to&gt;, &lt;I dont think so, &lt;I doubt it, &lt;I just do not get it, &lt;I refuse&gt;, &lt;I think not, &lt;I will not&gt;, &lt;I would not&gt;, &lt;but no, &lt;but of course not, &lt;by no means, &lt;come off it, &lt;did not&gt;, &lt;disagree, &lt;do not be absurd, &lt;do not be ridiculous, &lt;do not be silly, &lt;do not be stupid, &lt;does not seem likely&gt;, &lt;does not seem possible&gt;, &lt;doubtful, &lt;false&gt;, &lt;fat chance, &lt;fortune does not smile on that, &lt;get out&gt;, &lt;get real, &lt;hardly, &lt;he does not&gt;, &lt;he is not&gt;, &lt;hell no, &lt;horse hockey, &lt;if you say so, &lt;iie, &lt;impossible, &lt;improbable, &lt;inconceivable&gt;, &lt;it does not&gt;, &lt;it is not&gt;, &lt;it is not possible, &lt;it is unlikely&gt;, &lt;me thinks not, &lt;most certainly not, &lt;naaah, &lt;naah, &lt;nah, &lt;naw, &lt;nay, &lt;neah, &lt;negative, &lt;neither, &lt;neither of these, &lt;never, &lt;never&gt;, &lt;never mind&gt;, &lt;no, &lt;no&gt;, &lt;no !, &lt;no ,, &lt;no -, &lt;no ., &lt;no I am fine, &lt;no I am good, &lt;no I am ok, &lt;no can do, &lt;no chance&gt;, &lt;no thank you, &lt;no thanks, &lt;no way, &lt;no way&gt;, &lt;none, &lt;none of them, &lt;none of these, &lt;noo, &lt;nope, &lt;not a chance, &lt;not a prayer&gt;, &lt;not a snowball 's chance in hell, &lt;not any of them, &lt;not at all, &lt;not at all&gt;, &lt;not at the moment, &lt;not by a long shot, &lt;not by any means, &lt;not especially, &lt;not exactly, &lt;not in a million years, &lt;not likely&gt;, &lt;not many&gt;, &lt;not much&gt;, &lt;not on your life, &lt;not particularly, &lt;not really, &lt;not so much&gt;, &lt;not sure, &lt;not that I know of, &lt;not to my knowledge&gt;, &lt;not to speak of, &lt;not very often&gt;, &lt;nuts to you, &lt;of course not, &lt;oh come on, &lt;on the contrary&gt;, &lt;rubbish, &lt;seldom, &lt;she does not&gt;, &lt;she is not&gt;, &lt;strange, &lt;surely not, &lt;that is impossible, &lt;that is rubbish, &lt;that is unbelievable, &lt;there is no reason to think so, &lt;they are not&gt;, &lt;they do not&gt;, &lt;thinks not, &lt;uh-hu, &lt;uh-uh, &lt;uhuh, &lt;unbelievable, &lt;unfortunately not, &lt;unlikely, &lt;unlikely&gt;, &lt;we do not&gt;, &lt;yeah yeah, &lt;you are dead wrong, &lt;you are having me on, &lt;you are joking, &lt;you are kidding, &lt;you are not serious, &lt;you are winding me up, &lt;you can not be serious, &lt;you have got that wrong, &lt;you have got to be kidding, &lt;you must be joking, &lt;you must be kidding, N, do_not, instead, maybe_at_another_time, n, neither, no, not_OK, not_at_a_time, not_ever, not_now, nothing<\/code><br \/>\nIn both cases, &lt; means the start of the sentence and &gt; means the end of the sentence. So, many of these words are only treated as a yes or no if they appear at the start of an utterance, not in the middle.<\/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><span class=\"ez-toc-section\" id=\"Step_5_Configuring_the_IVR_Properties\">Step 5: Configuring the IVR Properties<\/span><\/h3>\n<p>You can use this tab for defining at the Node level the input mode, grammar, prompts and call behavior parameters for this node to be used in IVR Channel. <a href=\"\/v7-1\/docs\/bots\/advanced-topics\/ivr-integration\/ivr-integration\/#ivr-settings-field-reference\">Refer here for details<\/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><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"Confirmation node allows you to prompt the user for a \u201cyes\u201d or \u201cno\u201d answer. It helps in the verification or allowing users to accept or decline a choice. For example, in the Books Flight Bot, you can use a Confirmation node to prompt the user to respond if they would like to know the weather...","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-22295","post","type-post","status-publish","format-standard","hentry","category-dialog-task"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/22295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/comments?post=22295"}],"version-history":[{"count":3,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/22295\/revisions"}],"predecessor-version":[{"id":22299,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/22295\/revisions\/22299"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/media?parent=22295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/categories?post=22295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/tags?post=22295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}