{"id":18067,"date":"2018-11-23T18:50:40","date_gmt":"2018-11-23T18:50:40","guid":{"rendered":"https:\/\/developer.kore.ai\/v9-3\/?post_type=docs&#038;p=15475"},"modified":"2023-01-04T06:55:08","modified_gmt":"2023-01-04T06:55:08","slug":"event-based-bot-actions","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/bot-intelligence\/event-based-bot-actions\/","title":{"rendered":"Event Based Bot Actions"},"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><span style=\"font-weight: 400\">Events are triggered when specific actions occur during conversation with the Virtual Assistant\u00a0 or when specific events are triggered on any active channels.<\/span><\/p>\n<p><span style=\"font-weight: 400\">For example, when a user clicks the <\/span><b>Get Started<\/b><span style=\"font-weight: 400\"> button to initiate a chat with your FB Messenger VA, it triggers the Facebook Welcome event. You can use this event to customize the welcome greeting such as personalizing it with the user\u2019s first and last names, capturing additional information from users, and updating the back-end systems.<\/span><\/p>\n<p>To generate the <b>Get Started<\/b> button, please use the following Curl code:<\/p>\n<p style=\"background-color:#000000; color:white;\"><font size=\"1.8\" face=\"consolas\"> curl &#8211;location -g &#8211;request POST &#8216;https:\/\/graph.facebook.com\/v2.6\/me\/messenger_profile?access_token={{page access token}}&#8217;<br \/>&#8211;header &#8216;Content-Type: application\/json&#8217;<br \/>&#8211;header &#8216;Cookie: fr=0DjuarxRV9YWitxAN..BfXHzR&#8230;1.0.BfXHzR.&#8217;<br \/>&#8211;data-raw &#8216;{<br \/>&#8220;get_started&#8221;: {&#8220;payload&#8221;: &#8220;Facebook&#8221;}<br \/>}&#8217;<br \/><\/font><\/p>\n<p class=\"note\"><b>Note<\/b>: You must provide <code>access_token<\/code>, the Page access token for the specific Facebook page in the curl to run the API.<\/p>\n<p><span style=\"font-weight: 400\">To access <strong>Event Handlers<\/strong>, navigate to <\/span><strong>Build &gt; Intelligence &gt; Events.<\/strong><strong><br \/><\/strong><\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070935\/events-screen.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47550\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070935\/events-screen-1024x461.png\" alt=\"\" width=\"640\" height=\"288\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070935\/events-screen-1024x461.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070935\/events-screen-300x135.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070935\/events-screen.png 1947w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\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<h1><span class=\"ez-toc-section\" id=\"Event_Actions\"><span style=\"font-weight: 400\">Event Actions<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">Developers can define the VA should take when an event is triggered using one of the following options:<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Run_a_Task\"><span style=\"font-weight: 400\">Run a Task<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">Select a Dialog task (Standard or Hidden) to be invoked when the event triggers. Once the event is triggered, the dialog starts executing. If it is interrupted because of other intent detections, the <\/span><em><span style=\"font-weight: 400\">Hold <\/span><\/em><span style=\"font-weight: 400\">and <\/span><em><span style=\"font-weight: 400\">Resume <\/span><\/em><span style=\"font-weight: 400\">settings come into play. During execution, if the selected Dialog is not published in the VA, the event is discarded.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In some cases, the Dialog may not be available to the user during a conversation for various reasons such as the task\u00a0not yet being published, being suspended, or simply not having been assigned to the user. In such cases, the VA\u00a0 shows an error message that the task is not currently available for execution. Developers can preempt such situations by testing the VA in Debug mode. The Debug Console shows full details about the error, including the reason why the task is not available.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Run_a_Script\"><span style=\"font-weight: 400\">Run a Script<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">Define a JavaScript to run when the event triggers. The script can make use of all applicable components such as session, context objects, variables, and functions. You can also fix the code using the Debug mode.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Show_a_Message\"><span style=\"font-weight: 400\">Show a Message<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">Define a simple or advanced message to the user when the event triggers. It supports all messaging formatting features available in the XO Platform, including multiple messages with channel override options.<\/span><\/p>\n<p><span style=\"font-weight: 400\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070913\/event-config.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47544\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070913\/event-config.gif\" alt=\"\" width=\"519\" height=\"460\" \/><\/a><\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Multilingual_VA_Behavior_for_Messages\"><span style=\"font-weight: 400\">Multilingual VA Behavior for Messages<\/span><\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">You can define language-specific messages;<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If a message is deleted from an Event for a specific language then it will be removed from all other languages of the VA;<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If a message is added for a language then the message would be added in all other languages using the same content;<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If a message is modified in a language, then the modifications will be applied for that language alone.<\/span><\/li>\n<\/ul>\n<p><a href=\"https:\/\/multisite.korebots.com\/docs\/bots\/sdks\/message-templates\/\"><span style=\"font-weight: 400\">Learn more about message formatting and templates<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\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<h1><span class=\"ez-toc-section\" id=\"Event_Types\"><span style=\"font-weight: 400\">Event Types<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">Event Handlers are classified as <\/span><strong>Conversation Events<\/strong><span style=\"font-weight: 400\">, <\/span><strong>Intent Events<\/strong><span style=\"font-weight: 400\">, and <\/span><strong>Channel Events.<\/strong><\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004071017\/event-classification.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47571\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004071017\/event-classification-1024x456.png\" alt=\"\" width=\"640\" height=\"285\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004071017\/event-classification-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004071017\/event-classification-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004071017\/event-classification.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">You can configure the following events to trigger responses:<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<th><strong>Event<\/strong><\/th>\n<th><strong>Trigger<\/strong><\/th>\n<\/tr>\n<tr>\n<td colspan=\"2\"><strong>Conversation Events<\/strong><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Welcome Event<\/span><\/td>\n<td><span style=\"font-weight: 400\">On receiving the first message from the user from any channel.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">End of Conversation<\/span><\/td>\n<td><span style=\"font-weight: 400\">On reaching the end of conversation. <a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/advanced-topics\/event-based-bot-actions\/#End_of_Conversation\">See details below.<\/a> <span style=\"font-weight: 400\">.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Task Execution Failure<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400\">On encountering an error in dialog task execution like:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">an error in the execution of the VA,<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">service call failure,<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">unable to reach the server<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">error in invoking agent node in case of agent transfer,<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Knowledge Graph Task failures,<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Webhook node failures,<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Dialog related to a sub-dialog node not available,<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">exceptions in parsing the VA message.<\/span><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><strong>Intent Events<\/strong><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Intent not Identified<\/span><\/td>\n<td><span style=\"font-weight: 400\">Runs every time the VA cannot understand the user\u2019s intent.<\/span><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\"><strong>Channel Events<\/strong><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Facebook Welcome Event<\/span><\/td>\n<td><span style=\"font-weight: 400\">On receiving a Welcome Event from Facebook Messenger. This event takes precedence over Welcome Event if both are configured.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Telephony Welcome Event<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400\">On receiving a user\u2019s call from a voice channel like IVR, Twilio, or Audio Codes. <a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/advanced-topics\/event-based-bot-actions\/#Telephony_Welcome_Event\">See details below.<\/a> <span style=\"font-weight: 400\"><\/span><\/p>\n<p><span style=\"font-weight: 400\">(previously called Twilio Voice Welcome Event)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Telegram Welcome Event<\/span><\/td>\n<td><span style=\"font-weight: 400\">On receiving the Welcome Event from Telegram. This event takes precedence over Welcome Event if both are configured.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">On Connect<\/span><\/td>\n<td>\n<p><span style=\"font-weight: 400\">Every time a user converses over Web \/ Mobile SDK channels. The event will be triggered irrespective of whether the user has started the conversation or not.<\/span><\/p>\n<p><strong><em>Note <\/em><\/strong><em><span style=\"font-weight: 400\">that this event applies ONLY for Web\/Mobile SDK channel and takes precedence over the Welcome event if both are configured.<\/span><\/em><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">RCS Opt-in Event<\/span><\/td>\n<td><span style=\"font-weight: 400\">On receiving the message that a user has opted for the RCS Messaging channel.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">RCS Opt-out Event<\/span><\/td>\n<td><span style=\"font-weight: 400\">On receiving the message that a user has opted out of the RCS Messaging channel.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1><span class=\"ez-toc-section\" id=\"Event_Configuration\"><span style=\"font-weight: 400\">Event Configuration<\/span><\/span><\/h1>\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<h2><span class=\"ez-toc-section\" id=\"Conversation_Events\"><span style=\"font-weight: 400\">Conversation Events<\/span><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Welcome_On_Connect_Event\"><span style=\"font-weight: 400\">Welcome \/ On Connect Event<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400\">Users can initiate VA conversations in varied ways, from a simple greeting to directly expressing an intent or asking an FAQ. To facilitate a scope for the developer to customize the response based on the user choice, the Welcome event comes with additional options when you choose <\/span><em><span style=\"font-weight: 400\">Initiate Task<\/span><\/em><span style=\"font-weight: 400\"> or <\/span><em><span style=\"font-weight: 400\">Show Message<\/span><\/em><span style=\"font-weight: 400\"> as the event configurations. For example, if the first user utterance maps to a task, should the VAexecute the event-based task or the user intent first?<\/span><\/p>\n<p><span style=\"font-weight: 400\">Post ver9.0, you can use the <\/span><strong>isReturningUser<\/strong><span style=\"font-weight: 400\"> parameter in the <\/span><strong>BotUserSession<\/strong><span style=\"font-weight: 400\"> context object to identify returning users and send an appropriate welcome message (<\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/bot-builder-tool\/dialog-task\/context-object\/\"><span style=\"font-weight: 400\">refer here for context object<\/span><\/a><span style=\"font-weight: 400\">).<\/span><\/p>\n<p><span style=\"font-weight: 400\">As a developer, you can define the VA\u2019s priority when the user starts the conversation with a greeting, task, or FAQ from the options listed below:<\/span><\/p>\n<p><span style=\"font-weight: 400\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004071011\/welcome-event.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47568\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004071011\/welcome-event.gif\" alt=\"\" width=\"541\" height=\"481\" \/><\/a><\/span><\/p>\n<table>\n<tbody>\n<tr>\n<th><strong>Event Configuration<\/strong><\/th>\n<th><strong>Options<\/strong><\/th>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Initiate Task<\/span><\/td>\n<td>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Greetings \/ Small Talk<\/span><\/li>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Respond to greetings or small talk and initiate Welcome Event dialog.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Discard the user message and initiate the Welcome Event dialog.<\/span><\/li>\n<\/ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">FAQ<\/span><\/li>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Respond to FAQ and initiate the Welcome Event dialog.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Discard the user message and initiate the Welcome Event dialog.<\/span><\/li>\n<\/ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Task<\/span><\/li>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Initiate the user-requested task and discard the Welcome Event dialog.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Initiate the Welcome Event dialog and add the user-requested task to Follow-up Intents.<\/span><\/li>\n<\/ul>\n<\/ul>\n<p><span style=\"font-weight: 400\">If the Task is unavailable to the user for any reasons, such as not yet published or suspended or simply not assigned to the user, the VA shows an error message that the task is not currently available for execution.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Show Message<\/span><\/td>\n<td>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Greetings \/ Small Talk<\/span><\/li>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Respond to greetings or small talk and display the Welcome Event message.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Respond to greetings or small talk and discard the Welcome Event message.<\/span><\/li>\n<\/ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">FAQ<\/span><\/li>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Respond to FAQ and display the Welcome Event message.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Respond to FAQ and discard the Welcome Event message.<\/span><\/li>\n<\/ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Task<\/span><\/li>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Display the Welcome Event message and run the user-requested task<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Discard the Welcome Event message and run the user-requested task<\/span><\/li>\n<\/ul>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"width: 100%;border-collapse: collapse;background-color: #fffbea\">\n<tbody>\n<tr>\n<td style=\"width: 100%\"><strong><em>Note<\/em><\/strong><em><span style=\"font-weight: 400\">: The XO Platform no longer supports Welcome Messages. If you have defined a Welcome Message in previous versions, the upgraded version automatically creates a corresponding Welcome event and On Connect event to ensure backward compatibility.<\/span><\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><span class=\"ez-toc-section\" id=\"End_of_Conversation\"><span style=\"font-weight: 400\">End of Conversation<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400\">End of Conversation is triggered when the VA is not expected to send any message to the user or receive any message from the user.<\/span><\/p>\n<p><span style=\"font-weight: 400\">A new flag indicating the reason for ending the task, added to the <\/span><em><span style=\"font-weight: 400\">end of task<\/span><\/em><span style=\"font-weight: 400\"> event, will help decide the end of the conversation behavior. Client-side implementations of BotKits, RTM, and Webhook channels can use this reason for the task completion flag in the context to determine an appropriate course of action.<\/span><\/p>\n<p><span style=\"font-weight: 400\">On triggering this event, the context will be updated with the following details:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Reason for triggering event (see the table below)<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Name of the task that has just ended. If it\u2019s an FAQ, then the task name will be set to \u2018FAQ\u2019<\/span><\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<th><strong>Scenario<\/strong><\/th>\n<th><strong>End of Conversation Flag<\/strong><\/th>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Reached the last node of the dialog<\/span><\/td>\n<td><span style=\"font-weight: 400\">Fulfilled<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">The task is canceled by the user<\/span><\/td>\n<td><span style=\"font-weight: 400\">Canceled<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Error in task or FAQs execution (without Task Failure Event, no hold tasks)<\/span><\/td>\n<td><span style=\"font-weight: 400\">Failed<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Linked dialog completed without returning to the parent dialog<\/span><\/td>\n<td><span style=\"font-weight: 400\">Fulfilled_LinkedDialog<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">On answering a FAQ<\/span><\/td>\n<td><span style=\"font-weight: 400\">Fulfilled<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Successful event execution with Run Script or Show Message (no tasks on hold)<\/span><\/td>\n<td><span style=\"font-weight: 400\">Fulfilled_Event<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Error in executing an event with Run Script or Show Message (no tasks on hold)<\/span><\/td>\n<td><span style=\"font-weight: 400\">Failed_Event<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">User declines to resume on-hold task (when no other task is on hold<\/span><\/td>\n<td><span style=\"font-weight: 400\">Canceled<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><span class=\"ez-toc-section\" id=\"Task_Execution_Failure_Event\"><span style=\"font-weight: 400\">Task Execution Failure Event<\/span><\/span><\/h3>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">This event is available starting with the v6.40 release.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">By default, this event is always enabled with the <\/span><em><span style=\"font-weight: 400\">Show Message<\/span><\/em><span style=\"font-weight: 400\"> option. This event cannot be disabled.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">This VA-level behavior can be overridden for specific tasks by defining task-specific failure events from the dialog task settings. <\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/chatbot-overview\/using-the-dialog-builder-tool\/#Dialog_Settings\"><span style=\"font-weight: 400\">Refer here for how<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070951\/task-exec-failure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47562\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070951\/task-exec-failure.png\" alt=\"\" width=\"667\" height=\"321\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070951\/task-exec-failure.png 958w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070951\/task-exec-failure-300x144.png 300w\" sizes=\"auto, (max-width: 667px) 100vw, 667px\" \/><\/a><\/span><\/p>\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<h2><span class=\"ez-toc-section\" id=\"Intent_Events\"><span style=\"font-weight: 400\">Intent Events<\/span><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Intent_Not_Available_Event\"><span style=\"font-weight: 400\">Intent Not Available Event<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400\">When the VA cannot understand the user\u2019s intent, this event determines the subsequent behavior. You can choose one of the following options:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>Show a standard message from the standard responses<\/strong><span style=\"font-weight: 400\">. <\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/bot-intelligence\/default-standard-responses\/\"><span style=\"font-weight: 400\">Read here for details on standard responses<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Automatically run a dialog task<\/strong><span style=\"font-weight: 400\">. You can use the dropdown to select the task you want to run.<\/span><\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070943\/intent-not-identified.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47556\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070943\/intent-not-identified.png\" alt=\"\" width=\"651\" height=\"232\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070943\/intent-not-identified.png 937w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070943\/intent-not-identified-300x107.png 300w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Ambiguous_Intents_Identified_Event\">Ambiguous Intents Identified Event<\/span><\/h3>\n<p>When the NLP engine identifies ambiguous intents from user utterances, by default, the virtual assistant displays a list of those intents during the conversation and requests the user to make a selection. This default behavior is ideal for most of the use cases. However, you can customize this behavior for specific use cases using the Ambiguous Intents Identified event. The event is triggered in the following scenarios:<\/p>\n<ul>\n<li>Two or more \u2018definite\u2019 intents are identified.<\/li>\n<li>Two or more \u2018possible\u2019 intents are identified and their scores lie within the defined proximity thresholds.<\/li>\n<li>Only low confidence intents are identified from the Knowledge Graph and no other intents are identified from other engines.<\/li>\n<\/ul>\n<p>You can build custom business logic to analyze ambiguous intents, define appropriate conversation flow using a Dialog Task, and associate it with the Ambiguous Intents Identified event. By customizing the flow, you can avoid displaying ambiguous intents to the end user and redirect the conversation to the desired task. You can use the <code>koreUtil.getAmbiguousIntents()<\/code> function to retrieve the list of ambiguous intents and their confidence scores. For more information on the function, see <a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/advanced-topics\/koreutil-libraries\/#koreUtilgetAmbiguousIntents\">koreUtil.getAmbiguousIntents()<\/a>.<\/p>\n<p><a href= \"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221125093057\/3001.png\"\/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221125093057\/3001.png\" alt=\"\" width=\"1200\" height=\"436\" class=\"alignnone size-medium wp-image-49109\"\/><\/a><\/p>\n<h4>Event Configuration<\/h4>\n<p>To configure the Ambiguous Intents Identified event follow these steps:<\/p>\n<ol>\n<li>Go to <strong>Build \u2192 Intelligence \u2192 Events<\/strong> on the platform. By default, this event is disabled for all existing and new bots.<\/li>\n<li>Click <b>Configure<\/b> to enable the event.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221125095912\/3001_1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221125095912\/3001_1.png\" alt=\"\" width=\"1000\" height=\"431\" class=\"alignnone size-medium wp-image-49115\"\/><\/a>\n<div class=\"alert alert-info\">If not enabled, the list of ambiguous intents is presented to the user during the conversation.<\/div>\n<li>You can select the following options in the Configuration panel:\n<ul>\n<li><b>Present all the qualified intents to the end-user for disambiguation<\/b>. This is the default selection in which the standard response related to the ambiguous intent(s) is presented. <a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/bot-intelligence\/default-standard-responses\/\">Learn more.<\/a><\/li>\n<li><b>Automatically run a Dialog Task<\/b>. This option lets you select a Dialog Task. Select this option if you want to build custom business logic to analyze the ambiguous intents, define appropriate conversation flow using a Dialog Task, and associate it with the Ambiguous Intents Identified event. <a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/chatbot-overview\/using-the-dialog-builder-tool\/\">Learn more<\/a>.<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221125101931\/Amb-Intent1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221125101931\/Amb-Intent1.png\" alt=\"\" width=\"600\" height=\"200\" class=\"alignnone size-medium wp-image-49121\"\/><\/a><\/p>\n<li>Click the button <b>Save &#038; Enable<\/b> to enable the event.<\/li>\n<\/ol>\n<div class=\"alert alert-info\"><strong>Note:<\/strong> During the conversation with your Virtual Assistant, in case of ambiguous intents, a message is displayed in the <strong>Debug Log<\/strong> that <strong>Multiple intents are identified<\/strong> and the <strong>Ambiguous Intents Identified event is initiated<\/strong>.<\/div>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221125102636\/DebgLog_3001.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221125102636\/DebgLog_3001.png\" alt=\"\" width=\"600\" height=\"200\" class=\"alignnone size-medium wp-image-49124\"\/><\/a><\/p>\n<h4>Interruption Management<\/h4>\n<p>When the event is enabled, the interruption behavior is handled as defined at the node level, dialog level, or bot level for ambiguous intents. The only exception is &#8211; when you select the <strong>Continue the current task and add new task to the follow-up task list<\/strong> option, the conversation continues as is with the current task, and any interrupting task will not be added to the follow-up list. For more information, see <a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/bot-intelligence\/interruption-handling-context-switching-intents\/\">Interruptions Management<\/a>.<\/p>\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<h2><span class=\"ez-toc-section\" id=\"Channel_Events\"><span style=\"font-weight: 400\">Channel Events<\/span><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Facebook_Telegram_Welcome_Events\"><span style=\"font-weight: 400\">Facebook &amp; Telegram Welcome Events<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400\">This event triggers on receiving a Welcome Event from Facebook Messenger or Telegram. Once it is triggered, you can configure the Platform to perform the following actions:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><strong>Initiate a Task<\/strong><span style=\"font-weight: 400\">: Select from the available Dialog Tasks to run once the event is triggered.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Run a Script<\/strong><span style=\"font-weight: 400\">: You are shown a Javascript editor where you can add your script, which will run once the Facebook Welcome Event is triggered.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Show a Message<\/strong><span style=\"font-weight: 400\">: This option lets you add VA responses to be sent to users once this event triggers.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070939\/facebook-welcome.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47553\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070939\/facebook-welcome.png\" alt=\"\" width=\"644\" height=\"207\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070939\/facebook-welcome.png 896w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070939\/facebook-welcome-300x96.png 300w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/a><\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Telephony_Welcome_Event\"><span style=\"font-weight: 400\">Telephony Welcome Event<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400\">This event is triggered upon receiving a voice call to the Platform from any voice channel. This event will be triggered every time a user\u2019s call reaches the Platform, and not just for the first time.<\/span><\/p>\n<p><span style=\"font-weight: 400\">It provides the following two options:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Initiate Task\u00a0 \u2013 Select a task to be triggered from the drop-down list provided<\/span><\/li>\n<\/ul>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Voice Call Properties can be set as follows:<\/span><\/li>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Define at least one \u2018Initial Prompts\u2019<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Prompts for <\/span><em><span style=\"font-weight: 400\">Timeout<\/span><\/em><span style=\"font-weight: 400\">, and <\/span><em><span style=\"font-weight: 400\">No Match <\/span><\/em><span style=\"font-weight: 400\">can be defined<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under <\/span><em><span style=\"font-weight: 400\">Advanced Controls<\/span><\/em><span style=\"font-weight: 400\">, settings for <\/span><em><span style=\"font-weight: 400\">Timeout, No. of Retries<\/span><\/em><span style=\"font-weight: 400\">, and <\/span><em><span style=\"font-weight: 400\">Barge-in<\/span><\/em><span style=\"font-weight: 400\"> can be defined.<\/span><span style=\"font-weight: 400\"><br \/><\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/bot-builder-tool\/dialog-task\/voice-call-properties\/\"><span style=\"font-weight: 400\">See here for details<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ul>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070958\/telephony-welcome.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47565\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070958\/telephony-welcome.gif\" alt=\"\" width=\"570\" height=\"506\" \/><\/a><\/p>\n<h4><span style=\"font-weight: 400\">IVR Impact<\/span><\/h4>\n<p><span style=\"font-weight: 400\">You may also use this event to define how and when the calls should be terminated for voice-based channels. The IVR implementation allows session\/call closure only when the \u2018end of conversation\u2019 is completed. <\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/advanced-topics\/ivr-integration\/ivr-integration\/\"><span style=\"font-weight: 400\">See more details here.<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<h3><span class=\"ez-toc-section\" id=\"RCS_Opt-In_Opt-Out_Events\"><span style=\"font-weight: 400\">RCS Opt-In \/ Opt-Out Events<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400\">These events trigger when receiving <\/span><em><span style=\"font-weight: 400\">opt-in<\/span><\/em><span style=\"font-weight: 400\"> or <\/span><em><span style=\"font-weight: 400\">opt-out<\/span><\/em><span style=\"font-weight: 400\"> requests from users via the RCS channel. These events allow you to configure a response to be sent to the user as a follow-up for their action.\u00a0<\/span><\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070947\/rcs-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47559\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070947\/rcs-1.png\" alt=\"\" width=\"648\" height=\"116\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070947\/rcs-1.png 894w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070947\/rcs-1-300x54.png 300w\" sizes=\"auto, (max-width: 648px) 100vw, 648px\" \/><\/a><\/p>\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<h1><span class=\"ez-toc-section\" id=\"Variable_Namespaces\"><span style=\"font-weight: 400\">Variable Namespaces<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">You can configure Variable Namespaces for Events by going to <\/span><strong>More Options &gt; Manage Variable Namespaces<\/strong><span style=\"font-weight: 400\"> at the top of the Events screen.<\/span><\/p>\n<p><span style=\"font-weight: 400\">You can use the <\/span><em><span style=\"font-weight: 400\">Manage Variable Namespaces <\/span><\/em><span style=\"font-weight: 400\">to associate the Variable Namespaces to be used with the Event Handler. This option will be visible only when the Variable Namespace is enabled for the VA. For more information, see <\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/bot-settings\/bot-management\/managing-namespace\/\"><span style=\"font-weight: 400\">Managing Namespace<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070928\/event-handler-settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47547\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070928\/event-handler-settings-1024x434.png\" alt=\"\" width=\"640\" height=\"271\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070928\/event-handler-settings-1024x434.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070928\/event-handler-settings-300x127.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004070928\/event-handler-settings.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><\/p>\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\t<\/div>\r\n\t<\/div>\r\n<\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"Events are triggered when specific actions occur during conversation with the Virtual Assistant\u00a0 or when specific events are triggered on any active channels. For example, when a user clicks the Get Started button to initiate a chat with your FB Messenger VA, it triggers the Facebook Welcome event. You can use this event to customize...","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-18067","post","type-post","status-publish","format-standard","hentry","category-bot-intelligence"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/18067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/comments?post=18067"}],"version-history":[{"count":48,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/18067\/revisions"}],"predecessor-version":[{"id":50549,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/18067\/revisions\/50549"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/media?parent=18067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/categories?post=18067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/tags?post=18067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}