{"id":18055,"date":"2018-07-22T08:58:00","date_gmt":"2018-07-22T08:58:00","guid":{"rendered":"https:\/\/developer.kore.ai\/v7-3\/?post_type=docs&#038;p=14962"},"modified":"2021-03-26T09:05:16","modified_gmt":"2021-03-26T09:05:16","slug":"interruption-handling-context-switching-intents","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-3\/docs\/bots\/bot-intelligence\/interruption-handling-context-switching-intents\/","title":{"rendered":"Dialog Management"},"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>Human conversations are characterized by twists and turns, and no two directions are ever the same. Natural conversations often tend to go beyond linear intent resolution paths defined in the bots. Ideally, a user would allow the bot to take a user intent to its logical conclusion before initiating another, but that\u2019s not always the case.<\/p>\n<p>Consider the following conversation for example:<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/Sample-chat.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14973\" src=\"\/wp-content\/uploads\/sites\/15\/Sample-chat.png\" alt=\"\" width=\"338\" height=\"299\" \/><\/a><\/p>\n<p>It includes an entity value for the bot to proceed with the current intent, while also presenting a new user requirement or intent.<\/p>\n<p>Bots should account for this by allowing users to pause a task, start and complete another task, and then seamlessly return to the original task \u2013 all without losing important contextual data and conversation continuity.<\/p>\n<p>Kore.ai provides you with granular control over hold and resume functionality at the bot, task, and node levels, and allows to control context switching rules and behaviors. You can handle such interruptions in intent flows by providing a whole range of options to define the task-switching experience.<\/p>\n<p>The <strong>Hold and Resume<\/strong> options, as the options are referred to as, can be set up at the bot, task, and node levels to ensure the configurations are layered to suit your various business requirements. You can also add conditional exceptions between tasks with the ability to pass contextual data between them.<\/p>\n<p>The following sections describe<\/p>\n<ul>\n<li>the various Hold &amp; Resume configurations,<\/li>\n<li>the hierarchy of the setups at bot, task, and node levels.<\/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<h3><span class=\"ez-toc-section\" id=\"Hold_and_Resume\"><b>Hold and Resume <\/b><\/span><\/h3>\n<p>The <b>Hold &amp; Resume<\/b> options allow you to select if and how a user can switch to another task and also the exit strategies. The configuration for Hold &amp; Resume can be done either at the Bot Level or at the Task or Dialog level. We will discuss the settings at the Bot Level in this section. These settings can be overridden at the Task level as discussed in the <a href=\"#Hold_and_Resume_Hierarchy\">Hold and Resume Hierarchy section<\/a>.<\/p>\n<p>You can access the Hold and Resume settings from\u00a0<strong>Natural Language -&gt; Intelligence -&gt; Manage Interruptions<\/strong> page.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/hr.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21739\" src=\"\/wp-content\/uploads\/sites\/15\/hr.png\" alt=\"\" width=\"820\" height=\"461\" \/><\/a><\/p>\n<p>The platform provides options for Hold and Resume under the following three categories:<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/hold-and-resume-options-2.png\" rel=\"attachment wp-att-15580\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15580\" src=\"\/wp-content\/uploads\/sites\/15\/hold-and-resume-options-2.png\" alt=\"\" width=\"490\" height=\"190\" \/><\/a><\/p>\n<ul>\n<li><b>Allow Hold and Resume<\/b>: Provides options for you to choose for holding a task and options to resume it later.<\/li>\n<li><b>Do not Allow Hold and Resume<\/b>: Stops new tasks from interrupting the current task.<\/li>\n<li><strong>Allow the End User to Select the Behavior<\/strong>: Seeks end user confirmation to switch to a new task and provides several resume options for you to pick from.<\/li>\n<\/ul>\n<p><strong>NOTE<\/strong>: When user input after a session has ended, i.e. after at least 15 minutes of inactivity, and if the input is within the previous session context it is treated as a Hold and Resume scenario. If instead, the user comes back with a new utterance, then the old context is discarded and a new conversation is started.<\/p>\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<h4 id=\"allowHR\"><b>Allow Hold and Resume<\/b><\/h4>\n<p>Once you allow for task interruption, you need to specify the Bot behavior in such scenarios like what should happen to the current task, where should the conversation go once the interruption task has been completed, etc., etc..<\/p>\n<p>Following are the options under <b>Allow Hold and Resume.<\/b><\/p>\n<table>\n<thead>\n<tr>\n<th>Option<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><b>Hold the current task and resume back once the new task is completed<\/b><\/td>\n<td>This option lets the bot to switch to a new intent as soon as it is detected irrespective of the current intent flow. When you select this option, the Resume Options section appears providing further choices to define how to resume the on-hold task once the new intent task is completed.\u00a0 Refer to <a href=\"#resume\">Resume Options section<\/a> below for details.<\/td>\n<\/tr>\n<tr>\n<td><b>Discard the current task and switch to new<\/b><\/td>\n<td>When you select this option, the bot discards the current task and switches to a new task soon after it encounters another intent. The bot sends a message to notify the user before switching to the new task and the current task would be discarded. You can customize the message from the <strong>Manage Response <\/strong>setting.<\/td>\n<\/tr>\n<tr>\n<td><strong>Switch to new task without any notification to the user and discard current task<\/strong><\/td>\n<td>When you select this option, the bot discards the current task and switches to a new task soon after it encounters another intent. The bot does not notify the user about the switch and does not resume the current task later.<\/td>\n<\/tr>\n<tr>\n<td><b>Continue with the current task and add a new task to the follow-up task list<\/b><\/td>\n<td>When you select this option, the bot continues on the current task even if it encounters a new intent. It, however, adds the new intent to the Follow-up intents array. Refer to <a href=\"#Follow-up_Intents\">Follow-up Intents section<\/a> below for more information.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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<h4><b>Do not Hold and Resume<\/b><\/h4>\n<p>When you select this option, the bot level <b>Hold &amp; Resume<\/b> is turned off. However, you may override this behavior for selected tasks, linked dialogs (exceptions) or node level. Refer to the <a href=\"#Hold_and_Resume_Hierarchy\">Hold and Resume Hierarchy section<\/a> below for more information.<\/p>\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<h4><b>Allow the End User to Select the Behavior<\/b><\/h4>\n<p>When you select this option, the bot presents the end user with a confirmation message asking if the user would like to switch to a new task. The bot switches to the new task only if the end user chooses to do so. You can customize the confirmation message sent to the user by clicking the <b>Manage Response <\/b>link next to the option.<\/p>\n<p>You need to define a Resume Option that the bot should take if the user decides to switch the task. Refer to <a href=\"#resume\">Resume Options section<\/a> below for details.<\/p>\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<h4 id=\"resume\"><b>Resume Options<\/b><\/h4>\n<p>Once you allow the task to be put on hold and proceed with the interruption task, you need to configure the Resume option i.e. how the on-hold task should be handled once the interrupting task is completed.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/Resume-options-1.png\" rel=\"attachment wp-att-15582\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15582\" src=\"\/wp-content\/uploads\/sites\/15\/Resume-options-1.png\" alt=\"\" width=\"560\" height=\"245\" \/><\/a><\/p>\n<table>\n<thead>\n<tr>\n<th>Option<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Get confirmation with the user before resuming an on-hold task<\/strong><\/td>\n<td>After executing the new task,\u00a0the bot gives Yes or No options to the user to return to the last on-hold task. You can write a custom message for the user by clicking the <b>Manage Response<\/b> link next to the option.<br \/>\n<b>Example:<\/b><\/p>\n<pre>User: Hi\r\nBot: Hello!\r\nUser: Can you book me a flight for tomorrow?\r\nBot: From which city are you flying?\r\nUser: Los Angeles\r\nBot: Where to?\r\nUser: By the way, what\u2019s the weather forecast for tomorrow?\r\nBot: Please enter the name of the city for the forecast.\r\nUser: Los Angeles\r\nBot: Weather Forecast for Los Angeles\r\nDate: March 15\r\nTemperature: 25 C\r\nCondition: Mostly Sunny\r\nBot: Should I continue with the task 'Book Flight'?\r\nUser: Yes\r\nBot: Enter the name of the destination airport<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>Notify the user with a message that the on hold task is being resumed<\/strong><\/td>\n<td>Notifies the user with a message and resumes the last task that\u2019s kept on hold without user confirmation.<br \/>\nYou can customize the notification message by clicking the <b>Manage Response<\/b> link next to the option.<br \/>\n<b>Example:<\/b><\/p>\n<pre>User: Hi\r\nBot: Hello!\r\nUser: Can you book me a flight for tomorrow?\r\nBot: From which city are you flying?\r\nUser: Los Angeles\r\nBot: Where to?\r\nUser: By the way, what\u2019s the weather forecast for tomorrow?\r\nBot: Please enter the name of the city for the forecast.\r\nUser: Los Angeles\r\nBot: Weather Forecast for Los Angeles\r\nDate: March 15\r\nTemperature: 25 C\r\nCondition: Mostly Sunny\r\nBot: Resuming interrupted task Book Flight\r\nBot: Enter the name the of the destination airport<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>Resume the on hold task without any specific message to the user<\/strong><\/td>\n<td>Directly resumes the last task that\u2019s kept on hold soon after the current task is executed.<br \/>\n<b>Example:<\/b><\/p>\n<pre>User: Hi\r\nBot: Hello!\r\nUser: Can you book me a flight for tomorrow?\r\nBot: From which city are you flying?\r\nUser: Los Angeles\r\nBot: Where to?\r\nUser: By the way, what\u2019s the weather forecast for tomorrow?\r\nBot: Please enter the name of the city for the forecast.\r\nUser: Los Angeles\r\nBot: Weather Forecast for Los Angeles\r\nDate: March 15\r\nTemperature: 25 C\r\nCondition: Mostly Sunny\r\nBot: Enter the name of the destination airport<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>Always resume the on hold task without any specific message to the user if the task is ended in a single response<\/strong><\/td>\n<td>Sometimes, the switched over tasks end with a single bot response. For example, in the weather forecast example above, if the user had directly entered \u201cBy the way, what\u2019s the weather forecast for LA tomorrow?\u201d, the bot would\u2019ve merely responded with the forecast, with no further steps.<br \/>\nIn such cases, if you select this option, the bot switches back to the task on hold without any confirmation or notification, regardless of the option you\u2019ve chosen.<\/p>\n<div class=\"alert alert-info\"><b>Note<\/b>: The switching happens directly, without any notification to the end user.<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p><b>On Hold Quantity <\/b><br \/>\nYou can select the number of tasks that you want to keep on hold from the <b>On Hold Quantity <\/b>field. The Bot keeps a maximum of this number of tasks on hold and ignores the tasks once this value is reached.<\/p>\n<p>For example, if you specify the On Hold Quantity as 1 and if a third intent comes into play, the bot wouldn\u2019t allow the new task to be initiated regardless of Hold and Resume options.<\/p>\n<div class=\"alert alert-info\"><b>Note<\/b>: Tasks always resume in the reverse chronological order. So, if you kept task 2 on hold after task 1, task 2 resumes before task 1.<\/div>\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=\"Hold_and_Resume_Hierarchy\"><b>Hold and Resume Hierarchy<\/b><\/span><\/h3>\n<p>Apart from defining the generic Hold and Resume options at the bot level, you can customize these options at Dialog task or Dialog node level. When you set up the Hold and Resume options in more than one levels, the order of precedence of the settings works as follows:<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/hierarchy.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14976\" src=\"\/wp-content\/uploads\/sites\/15\/hierarchy.png\" alt=\"\" width=\"494\" height=\"370\" \/><\/a><\/p>\n<h4><b>Node Level Settings<\/b><\/h4>\n<p>You can customize the Hold and Resume settings at a node level. If you customize the settings for a node, this configuration takes the highest precedence.<\/p>\n<p>To customize the Hold and Resume settings for a node:<\/p>\n<ol>\n<li>Open the Dialog task and then <strong>hover over the node<\/strong> whose settings you want to change.<\/li>\n<li>Go to the Properties panel by clicking the <strong>gear icon<\/strong> and then click the <strong>instance tab<\/strong>.<\/li>\n<li>In the Instance Properties panel, select <b>Advanced Controls<\/b>.<\/li>\n<li>Under the Hold &amp; Resume section, select<strong> Customize for this node<\/strong> and make the necessary configurations. These configurations are the same as discussed above for the Bot Level <a href=\"#Hold_and_Resume\">Hold and Resume settings<\/a>.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/Node-level-1.png\" rel=\"attachment wp-att-15584\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15584\" src=\"\/wp-content\/uploads\/sites\/15\/Node-level-1.png\" alt=\"\" width=\"278\" height=\"315\" \/><\/a><\/li>\n<\/ol>\n<h4><b>Dialog Level Settings<\/b><\/h4>\n<p>The Dialog level Hold and Resume customizations have higher priority over Bot level settings but rank lower than the Node level customizations or any exceptions.<\/p>\n<p>To customize the Hold and Resume settings for a Dialog:<\/p>\n<ol>\n<li><strong>Open the Dialog task<\/strong> whose settings you want to customize.<\/li>\n<li>On the top right-hand corner of the Dialog Builder, click the <strong>more options icon<\/strong> and then click <b>Manage Interruptions<\/b>.<\/li>\n<li>Under Hold &amp; Resume section, select <b>Customize for this task<\/b> and make the necessary configurations. These settings are the same as discussed above for the Bot Level <a href=\"#Hold_and_Resume\">Hold and Resume<\/a>.<\/li>\n<\/ol>\n<div class=\"alert alert-info\"><b>Note<\/b>: If you do not customize Hold &amp; Resume settings at Node or Task level, the bot level settings come into play.<\/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>\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=\"Manage_Behavior_for_FAQs\">Manage Behavior for FAQs<\/span><\/h3>\n<p>You can choose whether FAQs should honor the Hold &amp; Resume Settings or if FAQs should be always responded. This feature was introduced with ver 7.0.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/HR-FAQs.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21327\" src=\"\/wp-content\/uploads\/sites\/15\/HR-FAQs.png\" alt=\"\" width=\"820\" height=\"461\" \/><\/a><\/p>\n<p>The flag <strong>Interruption Behavior for FAQs<\/strong> will allow you to:<\/p>\n<ul>\n<li>Always identify and respond to FAQs when interruptions are enabled. This is the default setting.<\/li>\n<li>Always identify FAQs when interruptions are enabled and proceed as per the Hold &amp; Resume settings.<\/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<h3><span class=\"ez-toc-section\" id=\"Manage_Behavior_for_Ambiguous_Intents\">Manage Behavior for Ambiguous Intents<\/span><\/h3>\n<p>(Introduced in ver 7.1 of the platform)<\/p>\n<p>You can handle ambiguous intents during a conversation flow by setting the flag <strong>Behavior for Ambiguous Intents<\/strong> will allow you to:<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/15\/ambiguous-settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22240\" src=\"\/wp-content\/uploads\/sites\/15\/ambiguous-settings.png\" alt=\"\" width=\"1366\" height=\"768\" \/><\/a><\/p>\n<ul>\n<li>Present the ambiguous intents to the end user and proceed as per the H&amp;R Settings. In case the user selects a task and the Hold &amp; Resume setting is:\n<ul>\n<li>&#8216;Continue the current task and add new task to the follow-up task list&#8217;, then the current task will be kept on-hold and the new task will be initiated<\/li>\n<li>\u2018Allow the end user to select the behavior&#8217;, then the new task will be initiated without asking the user since the selection has been already made<\/li>\n<li>All other &#8216;hold&#8217; options will be applied as usual<\/li>\n<\/ul>\n<\/li>\n<li>Do not present ambiguous intents to the end users and continue on the current task. This is the default setting.<\/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<h3><span class=\"ez-toc-section\" id=\"Manage_Behavior_for_User_Authorization\">Manage Behavior for User Authorization<\/span><\/h3>\n<p>(Introduced in ver 7.3 of the platform)<\/p>\n<p>When a user gives any input at a prompt message for authorization which is not relevant following flow would be followed:<\/p>\n<ul>\n<li>If Small Talk intent is identified, then the Small Talk\u2019s response would be displayed, and the authorization would be re-prompted<\/li>\n<li>The platform checks for the presence of any intents (tasks or FAQs) in the user utterance, irrespective of the configurations set for Manage Interruptions:\n<ul>\n<li>If an intent is identified, confirmation to discard the current task and trigger the new task is sought;<\/li>\n<li>If multiple intents are identified, an ambiguity dialog along with the option to ignore the utterance and continue with the current task would be presented;<\/li>\n<\/ul>\n<\/li>\n<li>If no intent is identified, then the user is re-prompted with the authorization link.<\/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":"Human conversations are characterized by twists and turns, and no two directions are ever the same. Natural conversations often tend to go beyond linear intent resolution paths defined in the bots. Ideally, a user would allow the bot to take a user intent to its logical conclusion before initiating another, but that\u2019s not always the...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[],"class_list":["post-18055","post","type-post","status-publish","format-standard","hentry","category-bot-intelligence"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts\/18055","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=18055"}],"version-history":[{"count":27,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts\/18055\/revisions"}],"predecessor-version":[{"id":23705,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/posts\/18055\/revisions\/23705"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/media?parent=18055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/categories?post=18055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-3\/wp-json\/wp\/v2\/tags?post=18055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}