{"id":47596,"date":"2022-10-04T10:26:26","date_gmt":"2022-10-04T09:26:26","guid":{"rendered":"https:\/\/developer.kore.ai\/v9-3\/?p=47596"},"modified":"2022-10-04T17:00:01","modified_gmt":"2022-10-04T16:00:01","slug":"create-a-travel-virtual-assistant","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/how-tos\/travel-planing-assistant\/create-a-travel-virtual-assistant\/","title":{"rendered":"Create a Travel Virtual Assistant"},"content":{"rendered":"<p><span style=\"font-weight: 400\">After you have <\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/getting-started\/how-to-open-bot-builder\/\"><span style=\"font-weight: 400\">signed up<\/span><\/a><span style=\"font-weight: 400\"> with the Kore.ai XO Platform, the next step is to create a Virtual Assistant. Before you create it, we recommend you to go through the basics of building a VA by reading <\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/chatbot-overview\/getting-started-bots\/\"><span style=\"font-weight: 400\">this article<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">This present article takes you through the creation of a simple, travel related VA, that gives users the flight status arriving\/departing from Los Angeles International Airport.\u00a0<\/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=\"Assistant_Capabilities\"><span style=\"font-weight: 400\">Assistant Capabilities<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">This assistant can perform the following tasks:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Ask the user if they want to know about the arrivals or departures.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Make a service call to an API to fetch the details of flights arriving and departing out of the airport.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Display the flight numbers based on the user preference of Arrival or Departure.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Request the user to select a flight number.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Display the status details of the selected flight.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Handle any errors.<\/span><\/li>\n<\/ul>\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=\"Create_the_Assistant\"><span style=\"font-weight: 400\">Create the Assistant<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">To build your Virtual Assistant, follow the steps below:\u00a0<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Log in to your Kore.ai XO Platform account.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the landing page, click <\/span><strong>New Bot<\/strong><span style=\"font-weight: 400\"> on the top-right and select the <\/span><strong>Start from Scratch<\/strong><span style=\"font-weight: 400\"> option.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100610\/new-bot-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47627\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100610\/new-bot-1-1024x255.png\" alt=\"\" width=\"640\" height=\"159\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100610\/new-bot-1-1024x255.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100610\/new-bot-1-300x75.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100610\/new-bot-1.png 1907w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the <\/span><em><span style=\"font-weight: 400\">Create New Bot <\/span><\/em><span style=\"font-weight: 400\">window, enter the details:<\/span><\/li>\n<ol>\n<li style=\"font-weight: 400\"><strong>Bot Name<\/strong><span style=\"font-weight: 400\"> \u2013 Give a name to your assistant. For example: <\/span><em><span style=\"font-weight: 400\">Travel Planning Assistant<\/span><\/em><span style=\"font-weight: 400\">. If the name is already used, try something else.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Choose or upload an <\/span><strong>Icon <\/strong><span style=\"font-weight: 400\">to represent your assistant throughout the Platform.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><em><span style=\"font-weight: 400\">Standard Bot<\/span><\/em><span style=\"font-weight: 400\"> as the <\/span><strong>Bot Type<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><em><span style=\"font-weight: 400\">English <\/span><\/em><span style=\"font-weight: 400\">from the <\/span><strong>Default Bot Language <\/strong><span style=\"font-weight: 400\">drop-down list.<\/span><\/li>\n<\/ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Create<\/strong><span style=\"font-weight: 400\">.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100519\/create-bot-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47600\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100519\/create-bot-1.png\" alt=\"\" width=\"580\" height=\"798\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100519\/create-bot-1.png 617w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100519\/create-bot-1-218x300.png 218w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><br \/><\/span><\/li>\n<\/ol>\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=\"Create_a_Dialog_Task\"><span style=\"font-weight: 400\">Create a Dialog Task<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">After creating your assistant, you are directed to the Bot Summary page. The first step is to add an <\/span><em><span style=\"font-weight: 400\">Intent Dialog<\/span><\/em><span style=\"font-weight: 400\">. The Intent Dialog is the first step in the user-VA conversation flow.<\/span><\/p>\n<p><span style=\"font-weight: 400\">To create such a Dialog Task, please follow the steps below:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the <\/span><strong>Tasks<\/strong><span style=\"font-weight: 400\"> widget, click <\/span><strong>+ New Task<\/strong><span style=\"font-weight: 400\"> and select <\/span><strong>Dialog Task<\/strong><span style=\"font-weight: 400\">.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100617\/new-dialog-task-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47630\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100617\/new-dialog-task-1-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\/20221004100617\/new-dialog-task-1-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100617\/new-dialog-task-1-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100617\/new-dialog-task-1.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the <\/span><em><span style=\"font-weight: 400\">Create Dialog<\/span><\/em><span style=\"font-weight: 400\"> page, enter the following details:<\/span><\/li>\n<ol>\n<li style=\"font-weight: 400\"><strong>Intent Name<\/strong><span style=\"font-weight: 400\"> \u2013 Enter the Intent name, this is the phrase that triggers the dialog. The intent name must be simple and not more than 3-4 words. For example, <\/span><em><span style=\"font-weight: 400\">Check flight status<\/span><\/em><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u00a0Under <\/span><strong>More Options<\/strong><span style=\"font-weight: 400\">, you can add a <\/span><strong>description<\/strong><span style=\"font-weight: 400\"> and other dialog-related details. Let us retain the default settings.<\/span><\/li>\n<\/ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Proceed.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100524\/create-dialog-task.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47603\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100524\/create-dialog-task-863x1024.png\" alt=\"\" width=\"594\" height=\"704\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100524\/create-dialog-task-863x1024.png 863w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100524\/create-dialog-task-253x300.png 253w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100524\/create-dialog-task.png 903w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/a><br \/><\/strong><\/li>\n<li style=\"font-weight: 400\">You may be prompted to <strong>Upgrade<\/strong> to Conversation Driven Dialog Builder, select to Upgrade. For instructions on the Legacy Dialog Builder, <a href=\"https:\/\/developer.kore.ai\/v9-3\/v8-1\/docs\/bots\/how-tos\/creating-a-banking-bot\/\">refer here<\/a><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Once your task has been created, you will see the Dialog Builder Canvas, with the first node displayed &#8211; the Intent Node, which receives the name of the task and represents the main node within the Dialog Task. <\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/chatbot-overview\/using-the-dialog-builder-tool\/\"><span style=\"font-weight: 400\">Learn more about working with the Dialog Builder<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ol>\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=\"Create_a_User_Preference_Entity_Node\"><span style=\"font-weight: 400\">Create a User Preference Entity Node<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">An Entity node is typically used to gather information from the user. Let us use it to capture the user preference of arrival or departure details.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>+<\/strong><span style=\"font-weight: 400\"> icon next to the <\/span><strong>User Intent<\/strong><span style=\"font-weight: 400\"> node.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Entity<\/strong><span style=\"font-weight: 400\"> &gt; <\/span><strong>+ New Entity<\/strong><span style=\"font-weight: 400\">.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100538\/entity-node.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47609\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100538\/entity-node.gif\" alt=\"\" width=\"705\" height=\"314\" \/><\/a><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">You can also drag and drop <\/span><strong>Entity <\/strong><span style=\"font-weight: 400\">from the node panel on the left.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the newly added Entity node to open the <\/span><em><span style=\"font-weight: 400\">Entity <\/span><\/em><span style=\"font-weight: 400\">window.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">By default, the <\/span><strong>Component Properties <\/strong><span style=\"font-weight: 400\">tab is selected.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400\"> section, enter the following details:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><strong>Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Preference<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Display Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Preference\u00a0<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Type<\/strong><span style=\"font-weight: 400\">: Select <\/span><em><span style=\"font-weight: 400\">List of Items (enumerated)<\/span><\/em><span style=\"font-weight: 400\"> from the drop-down list. You can provide a list of values that the user can select. To add a list of values,<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>Settings <\/strong><span style=\"font-weight: 400\">icon next to the field.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100548\/entity-properties.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47615\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100548\/entity-properties.png\" alt=\"\" width=\"613\" height=\"712\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100548\/entity-properties.png 613w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100548\/entity-properties-258x300.png 258w\" sizes=\"auto, (max-width: 613px) 100vw, 613px\" \/><\/a><\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select the <\/span><strong>Static List<\/strong><span style=\"font-weight: 400\"> option.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Keys &amp; Values To Use<\/strong><span style=\"font-weight: 400\"> section, enter the <\/span><strong>Display Name <\/strong><span style=\"font-weight: 400\">as <\/span><em><span style=\"font-weight: 400\">Arrival<\/span><\/em><span style=\"font-weight: 400\"> and <\/span><em><span style=\"font-weight: 400\">Departure <\/span><\/em><span style=\"font-weight: 400\">in separate rows<\/span><em><span style=\"font-weight: 400\">. <\/span><\/em><strong>Value<\/strong><span style=\"font-weight: 400\"> and <\/span><strong>Synonyms<\/strong><span style=\"font-weight: 400\"> columns auto-populate, leave them as is.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Define the percentage of <\/span><strong>Auto Correction <\/strong><span style=\"font-weight: 400\">to be applied to match the user&#8217;s input to a value in the list. Set to 0 if you do not want to apply auto correction at all.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\">.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100553\/entity-type-list-ennumerable-settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47618\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100553\/entity-type-list-ennumerable-settings-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\/20221004100553\/entity-type-list-ennumerable-settings-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100553\/entity-type-list-ennumerable-settings-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100553\/entity-type-list-ennumerable-settings.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/><\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go back to the Entity window.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the<\/span><strong> User Prompts<\/strong><span style=\"font-weight: 400\"> section, enter the following text:<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<\/ol>\n<pre style=\"padding-left: 40px\">Hello {{context.session.UserContext.firstName}}! Welcome to *Los Angeles International Airport*. I can help you with flight Arrival\/Departure information. Please select your preference.<\/pre>\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 context variable retrieves the user\u2019s first name. Also, markdown is used for the airport name to appear in bold.<\/span><\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u00a0<\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the<\/span><strong> Display List of Values <\/strong><span style=\"font-weight: 400\">section, select <\/span><em><span style=\"font-weight: 400\">Yes, use channel-specific standard formatting for default messages and show the available list of values to the end-user <\/span><\/em><span style=\"font-weight: 400\">option. This displays the list of values as a button template in supported channels.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100542\/entity-prompts.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47612\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100542\/entity-prompts.png\" alt=\"\" width=\"517\" height=\"783\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100542\/entity-prompts.png 517w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100542\/entity-prompts-198x300.png 198w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/a><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Close the <\/span><strong>Entity <\/strong><span style=\"font-weight: 400\">window.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\"><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><\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Create_a_Service_Node\"><span style=\"font-weight: 400\">Create a Service Node<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">A Service Bot Action node allows you to make a backend API call. Here the service node is used to call an API to get flight information for flights <\/span><em><span style=\"font-weight: 400\">From and To <\/span><\/em><span style=\"font-weight: 400\">LAX airport. In this tutorial, a dummy API setup is used.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>+<\/strong><span style=\"font-weight: 400\"> icon next to the <\/span><strong>Preference Entity<\/strong><span style=\"font-weight: 400\"> node.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Bot Action <\/strong><span style=\"font-weight: 400\">&gt; <\/span><strong>+ New Bot Action<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400\"> section, enter the following details:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><strong>Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">FlightDetails<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Display Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Flight Details<\/span><\/em><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>+<\/strong><span style=\"font-weight: 400\"> next to the Bot Action node to expand the Bot Action.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From within the Bot Action node click <\/span><strong>+<\/strong><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Service <\/strong><span style=\"font-weight: 400\">&gt; <\/span><strong>+ New service<\/strong><span style=\"font-weight: 400\">.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The service node is used to make a backend API call to get flight information for flights <\/span><em><span style=\"font-weight: 400\">From <\/span><\/em><span style=\"font-weight: 400\">and <\/span><em><span style=\"font-weight: 400\">To <\/span><\/em><span style=\"font-weight: 400\">LAX airport.<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the Service node to open the Service window, by default, the <\/span><strong>Component Properties <\/strong><span style=\"font-weight: 400\">tab is selected.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400\"> section, enter the following details:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><strong>Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Fetchflightdetails<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Display Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Fetch Flight Details<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Service Type<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Custom Service<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Type<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Webservice<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Sub Type<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">REST<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100730\/add-service-node.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47657\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100730\/add-service-node.gif\" alt=\"\" width=\"707\" height=\"315\" \/><\/a><br \/><\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Request Definition<\/strong><span style=\"font-weight: 400\"> section, Click <\/span><strong>DEFINE REQUEST<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\">On the <strong>Define Request <\/strong>page<strong>,<\/strong> enter the following details:\n<ol>\n<li style=\"font-weight: 400\"><strong>Request Type<\/strong><span style=\"font-weight: 400\"> \u2013 <\/span><em><span style=\"font-weight: 400\">GET<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Request URL<\/strong><span style=\"font-weight: 400\"> \u2013 <\/span><span style=\"font-weight: 400\">http:\/\/5e85a56644467600161c6579.mockapi.io\/FlightDetails<\/span><span style=\"font-weight: 400\"><br \/><\/span><span style=\"font-weight: 400\">This API does not require any Auth or Header Parameters.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>Test Request<\/strong><span style=\"font-weight: 400\"> tab.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Test<\/strong><span style=\"font-weight: 400\"> on the top-right.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Wait for the test to complete and you get a Status Code 200.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save as Sample Response<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100630\/service-add-request.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47639\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100630\/service-add-request-1024x293.png\" alt=\"\" width=\"640\" height=\"183\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100630\/service-add-request-1024x293.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100630\/service-add-request-300x86.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100630\/service-add-request.png 1921w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/><\/strong><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Return to the dialog builder<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Connections<\/strong><span style=\"font-weight: 400\"> section, set the <\/span><strong>Default Connection Rule<\/strong><span style=\"font-weight: 400\"> to <\/span><em><span style=\"font-weight: 400\">End of Bot Action.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100636\/service-connections.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47642\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100636\/service-connections-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\/20221004100636\/service-connections-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100636\/service-connections-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100636\/service-connections.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/><\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Close the <\/span><strong>Service <\/strong><span style=\"font-weight: 400\">window.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Collapse the <\/span><strong>Bot Action <\/strong><span style=\"font-weight: 400\">node.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\"><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><\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Create_a_Flight_Selection_Entity_Node\"><span style=\"font-weight: 400\">Create a Flight Selection Entity Node<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">This Entity node is to capture the Flight Number for which the user wants the status details.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>+<\/strong><span style=\"font-weight: 400\"> icon next to the <\/span><strong>Flight Details<\/strong> <strong>Bot Action<\/strong><span style=\"font-weight: 400\"> node.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Entity<\/strong><span style=\"font-weight: 400\"> &gt; <\/span><strong>New entity node +<\/strong><span style=\"font-weight: 400\">.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The Entity node is required to capture the flight number selected by the user.<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the <\/span><em><span style=\"font-weight: 400\">Entity <\/span><\/em><span style=\"font-weight: 400\">window, by default, the <\/span><strong>Component Properties <\/strong><span style=\"font-weight: 400\">tab is selected.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400\"> section, enter the following details:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><strong>Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">SelectFlight<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Display Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Select Flight\u00a0<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Type<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">String <\/span><\/em><span style=\"font-weight: 400\">(users can write a custom script to convert the API string output to a list of values in the following steps, this is the requirement of the dummy API used)<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the<\/span><strong> User Prompts <\/strong><span style=\"font-weight: 400\">section, enter the following text:<\/span><span style=\"font-weight: 400\"><br \/><\/span><span style=\"font-weight: 400\">Please provide the flight number.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><strong>Manage:<\/strong><span style=\"font-weight: 400\"> Users can define a specific prompt for the Web SDK channel.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Manage<\/strong><span style=\"font-weight: 400\">. Read more about <\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/bot-builder-tool\/dialog-task\/prompt-editor\/\"><span style=\"font-weight: 400\">managing user prompts<\/span><\/a><span style=\"font-weight: 400\">.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100621\/selectflight-entity-manage-prompts.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47633\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100621\/selectflight-entity-manage-prompts.png\" alt=\"\" width=\"516\" height=\"629\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100621\/selectflight-entity-manage-prompts.png 516w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100621\/selectflight-entity-manage-prompts-246x300.png 246w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/a><\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Add Prompt Message<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the New Prompt Message window, select <\/span><em><span style=\"font-weight: 400\">Web\/Mobile client<\/span><\/em><span style=\"font-weight: 400\"> from the <\/span><strong>Channel<\/strong><span style=\"font-weight: 400\"> drop-down list.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Message <\/strong><span style=\"font-weight: 400\">section, click the <\/span><strong>JavaScript <\/strong><span style=\"font-weight: 400\">tab.<br \/><\/span><\/li>\n<li style=\"font-weight: 400\">Enter the following <strong>JavaScript<\/strong>. The JavaScript extracts flight numbers matching user preference from the string output from API call and displays them in the <em>Quick Reply<\/em> format.\n<pre>var data = context.Fetchflightdetails.response.body.details;<br \/>context.flights = [];<br \/>context.info;<br \/>var msg;<br \/>for (var i = 0; i &lt; data.length; i++)<br \/>{<br \/>\u00a0\u00a0\u00a0\u00a0if (context.entities.Preference == data[i].Type)<br \/>\u00a0\u00a0\u00a0\u00a0{<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var details = {<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"Airlines\" : data[i].Airlines,<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"FlightNo\" : data[i].FlightNo,<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"Airport\" : data[i].Airport,<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"AirportName\" : data[i].AirportName,<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"Time\" : data[i].Time<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0};<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0context.flights.push(details);<br \/>\u00a0\u00a0\u00a0\u00a0}<br \/>}<br \/>var message = {<br \/>\u00a0\u00a0\u00a0\u00a0\"type\" : \"template\",<br \/>\u00a0\u00a0\u00a0\u00a0\"payload\" : {<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"template_type\" : \"quick_replies\",<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"text\" : \"Here are the flights \" + context.entities.Preference + \" details for Los Angeles<br \/>International Airport today. Please select the flight number to see details\",<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"quick_replies\" : []\u00a0\u00a0\u00a0\u00a0}<br \/>};<br \/>for (i=0; i &lt; context.flights.length; i++)<br \/>{<br \/>\u00a0\u00a0\u00a0var replies = {<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"content_type\":\"text\",<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"title\" : context.flights[i].FlightNo,<br \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"payload\" : context.flights[i].FlightNo<br \/>\u00a0\u00a0\u00a0\u00a0};<br \/>message.payload.quick_replies.push(replies);<br \/>}<br \/><span style=\"font-weight: 400\">return JSON.stringify(message);<\/span><\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\">.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100626\/selectflight-manage-user-prompts-js.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47636\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100626\/selectflight-manage-user-prompts-js-1024x538.png\" alt=\"\" width=\"640\" height=\"336\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100626\/selectflight-manage-user-prompts-js-1024x538.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100626\/selectflight-manage-user-prompts-js-300x158.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100626\/selectflight-manage-user-prompts-js.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go back to Dialog Builder and close the Entity window.<\/span><\/li>\n<\/ol>\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=\"Create_a_Script_Node\"><span style=\"font-weight: 400\">Create a Script Node<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">A Script node is used to write custom JavaScript in the Dialog task. Here, users can use the script to extract the selected flight details. Later, users can add more functionality to this script.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>+<\/strong><span style=\"font-weight: 400\"> icon next to the <\/span><strong>Select Flight Entity<\/strong><span style=\"font-weight: 400\"> node.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Bot Action <\/strong><span style=\"font-weight: 400\">&gt; <\/span><strong>+ New Bot Action<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400\"> section, enter the following details:<\/span><\/li>\n<ol>\n<li style=\"font-weight: 400\"><strong>Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Flight Validation<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Display Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Flight Validation\u00a0<\/span><\/em><\/li>\n<\/ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>+<\/strong><span style=\"font-weight: 400\"> next to the Bot Action node to expand the Bot Action.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From within the Bot Action node click <\/span><strong>+<\/strong><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Script<\/strong><span style=\"font-weight: 400\"> &gt; <\/span><strong>New script node +<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the Script window, by default, the <\/span><strong>Component Properties <\/strong><span style=\"font-weight: 400\">tab is selected.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400\"> section, enter the following details:<\/span><\/li>\n<ol>\n<li style=\"font-weight: 400\"><strong>Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">ValidateFlight<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Display Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Validate Flight\u00a0<\/span><\/em><\/li>\n<\/ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Script Definition <\/strong><span style=\"font-weight: 400\">section, click <\/span><strong>Define Script<\/strong><span style=\"font-weight: 400\">. <\/span><\/li>\n<li style=\"font-weight: 400\">On the <em>Add Script<\/em> dialog box, copy the following JavaScript. This code extracts the details of the selected flight number and also mitigates potential task failures caused by users not selecting a preference and instead manually entering information that is not found within the Context. Learn more about the <a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/bot-builder-tool\/dialog-task\/context-object\/\">Context Object<\/a>.\n<pre>context.valid = false;<br \/>context.details;<br \/>var x = context.flights.length;<br \/>for (var l = 0; l &lt; x; l++)<br \/>{<br \/>\u00a0 \u00a0 if (context.entities.SelectFlight == context.flights[l].FlightNo)<br \/>\u00a0 \u00a0 {<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0context.valid = true;<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0context.details = {<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"Airlines\" : context.flights[l].Airlines,<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"FlightNo\" : context.flights[l].FlightNo,<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"Airport\" : context.flights[l].Airport,<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"AirportName\" : context.flights[l].AirportName,<br \/>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"Time\" :context.flights[l].Time<br \/>\u00a0 \u00a0 \u00a0 \u00a0 };<br \/>\u00a0 \u00a0 \u00a0 \u00a0 break;<br \/>\u00a0 \u00a0 }<br \/>}<br \/>if (context.valid === false)<br \/>{<br \/>\u00a0 \u00a0 delete context.entities.SelectFlight;<br \/>}<\/pre>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\">.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100712\/add-script-node-validateflight.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47654\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100712\/add-script-node-validateflight-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\/20221004100712\/add-script-node-validateflight-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100712\/add-script-node-validateflight-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100712\/add-script-node-validateflight.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Connections<\/strong><span style=\"font-weight: 400\"> section, set the <\/span><strong>Default Connection Rule<\/strong><span style=\"font-weight: 400\"> to <\/span><em><span style=\"font-weight: 400\">End of Bot Action<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Close the <\/span><strong>Script <\/strong><span style=\"font-weight: 400\">window.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Collapse the <\/span><strong>Bot Action<\/strong><span style=\"font-weight: 400\"> node.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\"><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><\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Create_a_Message_Node_to_provide_the_Flight_Status\"><span style=\"font-weight: 400\">Create a Message Node to provide the Flight Status<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">A Message node is used to display a message from the VA to the user. Here, users can use the Message node to show appropriate flight details, based on user preference. This message node is triggered when the user enters a valid flight number.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>+<\/strong><span style=\"font-weight: 400\"> icon next to the <\/span><strong>Validate Flight Script<\/strong><span style=\"font-weight: 400\"> node.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Message<\/strong><span style=\"font-weight: 400\"> &gt; <\/span><strong>New message node +<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the Message window, by default, the <\/span><strong>Component Properties <\/strong><span style=\"font-weight: 400\">tab is selected.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400\"> section, enter the following details:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><strong>Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">FlightDetails<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Display Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Flight Details\u00a0<\/span><\/em><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Bot Responses<\/strong><span style=\"font-weight: 400\"> section, enter the following text:<\/span><span style=\"font-weight: 400\"><br \/><\/span><code><span style=\"font-weight: 400\">Here are your flight details.<\/span><\/code><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Enter<\/strong><span style=\"font-weight: 400\"> to save<\/span><em><span style=\"font-weight: 400\">.<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Manage Prompts:<\/strong><span style=\"font-weight: 400\"> Users can define a specific prompt for the Web SDK channel.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Manage<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the Manage Bot Responses page, click <\/span><strong>ADD BOT RESPONSE<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><em><span style=\"font-weight: 400\">Web\/Mobile client<\/span><\/em><span style=\"font-weight: 400\"> from the <\/span><strong>Channel<\/strong><span style=\"font-weight: 400\"> drop-down list.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Message<\/strong><span style=\"font-weight: 400\"> section, click the <\/span><strong>JavaScript <\/strong><span style=\"font-weight: 400\">tab.<\/span><\/li>\n<li style=\"font-weight: 400\">Copy the following JavaScript. The JavaScript is written to display the flight details in the <em>Table<\/em> format.<\/li>\n<li style=\"font-weight: 400\">Click <strong>Save<\/strong>.<\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go back to the <\/span><strong>Message <\/strong><span style=\"font-weight: 400\">window.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the Message window, click the <\/span><strong>Connections <\/strong><span style=\"font-weight: 400\">tab.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the drop-down list, change the default connection from <\/span><em><span style=\"font-weight: 400\">Not Connected <\/span><\/em><span style=\"font-weight: 400\">to <\/span><em><span style=\"font-weight: 400\">End of Dialog<\/span><\/em><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Close the <\/span><strong>Message <\/strong><span style=\"font-weight: 400\">window.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">When you have finished configuring your Dialog Task, it should look something like the illustration 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\/20221004100606\/full-dialog-task.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47624\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100606\/full-dialog-task-1024x538.png\" alt=\"\" width=\"640\" height=\"336\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100606\/full-dialog-task-1024x538.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100606\/full-dialog-task-300x158.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100606\/full-dialog-task.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400\"><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><\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Create_a_Conditional_Flow_for_an_Error_Message\"><span style=\"font-weight: 400\">Create a Conditional Flow for an Error Message<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">The Conditional Flow is required when, for example, the user provides input that cannot be identified by the VA, rather than selecting from one of the options you have configured (i.e.: either <\/span><em><span style=\"font-weight: 400\">Arrivals <\/span><\/em><span style=\"font-weight: 400\">or <\/span><em><span style=\"font-weight: 400\">Departures<\/span><\/em><span style=\"font-weight: 400\">.) In such a case, you would want to have the VA respond to the user with an error message.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The following are the steps required in order to add the conditional flow from the <\/span><strong>Validate Flight<\/strong><span style=\"font-weight: 400\"> Script node. A new connection from this Script node to a new Message node is established. This is to display an error message from the VA to the user and redirect to select the flight number again.<\/span><\/p>\n<p><span style=\"font-weight: 400\"><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><\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Create_the_Error_Message\"><span style=\"font-weight: 400\">Create the Error Message<\/span><\/span><\/h2>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Hover over the connection between Flight Validation Bot Action node and Flight Details message node.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">You can see the <\/span><strong>Add Node<\/strong><span style=\"font-weight: 400\"> button, click the same.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Create a new Message node.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><strong>Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">ErrorMessage<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><strong>Display Name<\/strong><span style=\"font-weight: 400\">: <\/span><em><span style=\"font-weight: 400\">Error Message\u00a0<\/span><\/em><\/li>\n<\/ul>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Enter<\/strong><span style=\"font-weight: 400\"> to save<\/span><em><span style=\"font-weight: 400\">.<\/span><\/em><\/li>\n<\/ul>\n<\/li>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Message<\/strong><span style=\"font-weight: 400\"> &gt; <\/span><strong>+ New message node <\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the Message window, by default, the <\/span><strong>Component Properties <\/strong><span style=\"font-weight: 400\">tab is selected.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400\"> section, enter the following details:<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>Bot Responses<\/strong><span style=\"font-weight: 400\"> section, enter the following text:<\/span><span style=\"font-weight: 400\"><br \/><\/span><code><span style=\"font-weight: 400\">The Flight number you entered is incorrect. Let us start again.<\/span><\/code><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>Connections<\/strong><span style=\"font-weight: 400\"> tab.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the drop-down list, change the default connection from <\/span><em><span style=\"font-weight: 400\">Not Connected<\/span><\/em><span style=\"font-weight: 400\"> to <\/span><em><span style=\"font-weight: 400\">SelectFlight<\/span><\/em><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Close the Error Message window.<\/span><\/li>\n<\/ol>\n<\/ol>\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\/20221004100659\/add-error-message.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47648\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100659\/add-error-message.gif\" alt=\"\" width=\"660\" height=\"294\" \/><\/a><\/span><\/p>\n<p>\u00a0<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Add_IF_Condition\"><span style=\"font-weight: 400\">Add IF Condition<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400\">As you can see in the demonstration above, the initial validation message remains disconnected after adding the error message. To fix this, you need to add a conditional connection so that the <\/span><strong>Flight Validation <\/strong><span style=\"font-weight: 400\">Bot Action Node connects to the <\/span><em><span style=\"font-weight: 400\">Flight Details <\/span><\/em><span style=\"font-weight: 400\">Message node to provide flight information; or to the Error Message, so the user is asked to provide valid input. The steps to take in order to achieve this are the following:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>Flight Validation<\/strong><span style=\"font-weight: 400\"> Bot Action node.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the Flight Validation Bot Action window, click the <\/span><strong>Connections<\/strong><span style=\"font-weight: 400\"> tab.<\/span>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Context<\/strong><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">For <\/span><strong>If Condition<\/strong><span style=\"font-weight: 400\">, enter the text as <\/span><strong>valid<\/strong><em><span style=\"font-weight: 400\">.<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select the operator as <\/span><strong>equals<\/strong><em><span style=\"font-weight: 400\">.<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Enter the value as <\/span><strong>true<\/strong><em><span style=\"font-weight: 400\">.<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If this condition is true, then the dialog goes to <\/span><strong>FlightDetails<\/strong><em><span style=\"font-weight: 400\">.<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>ELSE<\/strong><span style=\"font-weight: 400\"> section,<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If this condition is false, then the dialog goes to <\/span><strong>ErrorMessage<\/strong><em><span style=\"font-weight: 400\">.<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Close the <\/span><strong>Validate Flight<\/strong><span style=\"font-weight: 400\"> Script window.<\/span><\/li>\n<\/ul>\n<\/li>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>+ ADD IF<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Under the <\/span><strong>IF <\/strong><span style=\"font-weight: 400\">section,<\/span><\/li>\n<\/ol>\n<\/ol>\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\/20221004100705\/add-if.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47651\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100705\/add-if-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\/20221004100705\/add-if-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100705\/add-if-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100705\/add-if.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400\">When completed, the task might look similar to the illustration below:\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\/20221004100514\/completed-task.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47597\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100514\/completed-task-1024x538.png\" alt=\"\" width=\"640\" height=\"336\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100514\/completed-task-1024x538.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100514\/completed-task-300x158.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100514\/completed-task.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\"><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><\/span><\/p>\n<h1><span class=\"ez-toc-section\" id=\"Add_Events\"><span style=\"font-weight: 400\">Add Events<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">Currently, the assistant is waiting for user input on the start. However, it can also guide the user at the start of the conversation. For this, you can add an Event Handler to initiate this task every time a new connection is established from the Web\/Mobile SDK. Learn more about <\/span><a href=\"https:\/\/developer.kore.ai\/v9-3\/docs\/bots\/advanced-topics\/event-based-bot-actions\/\"><span style=\"font-weight: 400\">Event Handlers<\/span><\/a><span style=\"font-weight: 400\">.<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Close the Dialog Builder to go back to the <\/span><strong>Dialog Tasks<\/strong><span style=\"font-weight: 400\"> page.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the Left Navigation pane, and select <\/span><strong>Intelligence<\/strong><span style=\"font-weight: 400\"> &gt; <\/span><strong>Events<\/strong><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the events list, click <\/span><strong>Configure <\/strong><span style=\"font-weight: 400\">against the <\/span><strong>On Connect<\/strong><span style=\"font-weight: 400\"> event.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">On the On Connect window, by default, the <\/span><strong>Initiate Task<\/strong><span style=\"font-weight: 400\"> option is selected; retain it.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the drop-down list, select the <\/span><strong>Get Flight Status<\/strong><span style=\"font-weight: 400\"> task.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400\">.<\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<\/ol>\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\/20221004102349\/event-handler-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47660\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004102349\/event-handler-1.png\" alt=\"\" width=\"747\" height=\"333\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004102349\/event-handler-1.png 1922w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004102349\/event-handler-1-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004102349\/event-handler-1-1024x456.png 1024w\" sizes=\"auto, (max-width: 747px) 100vw, 747px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400\"><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><\/span><\/p>\n<h1><span class=\"ez-toc-section\" id=\"Test_the_Assistant\"><span style=\"font-weight: 400\">Test the Assistant<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">To test the Dialog task, you can use the <\/span><em><span style=\"font-weight: 400\">Talk to bot<\/span><\/em><span style=\"font-weight: 400\"> option at the bottom right. Since the <\/span><em><span style=\"font-weight: 400\">onConnect<\/span><\/em><span style=\"font-weight: 400\"> event is configured, the dialog is automatically initiated. Alternately, you can always try the following utterance (intent name) <\/span><em><span style=\"font-weight: 400\">Get me the flight status.<\/span><\/em><\/p>\n<p><span style=\"font-weight: 400\">Follow the instructions:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select Arrival\/Departure<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Enter an invalid flight number.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">You can see the appropriate error message and be prompted to enter the flight number again.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select a flight number.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">You can see the flight details in a tabular format.<\/span><\/li>\n<\/ol>\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\/20221004100641\/talktobot.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-47645\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100641\/talktobot-505x1024.png\" alt=\"\" width=\"505\" height=\"1024\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100641\/talktobot-505x1024.png 505w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100641\/talktobot-148x300.png 148w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v9-3\/wp-content\/uploads\/sites\/29\/20221004100641\/talktobot.png 537w\" sizes=\"auto, (max-width: 505px) 100vw, 505px\" \/><\/a><\/span><\/p>\n<p><span style=\"font-weight: 400\">You have successfully created and tested your first Virtual Assistant.<\/span><\/p>\n<p><span style=\"font-weight: 400\"><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><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After you have signed up with the Kore.ai XO Platform, the next step is to create a Virtual Assistant. Before you create it, we recommend you to go through the basics of building a VA by reading this article. This present article takes you through the creation of a simple, travel related VA, that gives&#8230;<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[197],"tags":[],"class_list":["post-47596","post","type-post","status-publish","format-standard","hentry","category-travel-planing-assistant"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/47596","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\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/comments?post=47596"}],"version-history":[{"count":2,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/47596\/revisions"}],"predecessor-version":[{"id":47664,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/posts\/47596\/revisions\/47664"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/media?parent=47596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/categories?post=47596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-3\/wp-json\/wp\/v2\/tags?post=47596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}