{"id":47596,"date":"2022-10-04T10:26:26","date_gmt":"2022-10-04T09:26:26","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-2\/?p=47596"},"modified":"2023-12-05T14:31:39","modified_gmt":"2023-12-05T14:31:39","slug":"create-a-travel-virtual-assistant","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-2\/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\/v10-2\/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\/v10-2\/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<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 Travel Virtual Assistant, follow the steps below:\u00a0<\/span><\/p>\n<ol>\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;\">.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095606\/new-bot-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56156\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095606\/new-bot-2.png\" alt=\"\" width=\"1919\" height=\"425\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095606\/new-bot-2.png 1919w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095606\/new-bot-2-300x66.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095606\/new-bot-2-1024x227.png 1024w\" sizes=\"auto, (max-width: 1919px) 100vw, 1919px\" \/><\/a> <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">In the <\/span><strong>Create New Bot<\/strong><span style=\"font-weight: 400;\"> window, select <\/span><strong>Start from Scratch<\/strong><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Enter a <\/span><strong>Name<\/strong><span style=\"font-weight: 400;\">.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Select an icon or click the <\/span><strong>+<\/strong><span style=\"font-weight: 400;\"> icon to upload your own. Images should be in PNG format and should not exceed 40&#215;40 pixels. The file size is limited to 80kb.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Select <\/span><strong>Travel Management <\/strong><span style=\"font-weight: 400;\">as the <\/span><strong>Purpose <\/strong><span style=\"font-weight: 400;\">of your VA.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Choose <\/span><strong>Standard Bot<\/strong><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 the <\/span><strong>Default Language<\/strong><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Click <\/span><strong>Proceed <\/strong><span style=\"font-weight: 400;\">when ready.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095610\/start-from-scratch.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56159\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095610\/start-from-scratch.png\" alt=\"\" width=\"650\" height=\"464\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095610\/start-from-scratch.png 1003w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095610\/start-from-scratch-300x214.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/a><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Next, you can generate use cases for your new Virtual Assistant. Add a meaningful description and click <\/span><strong>Get Use Cases<\/strong><span style=\"font-weight: 400;\"> to generate intents that will be automatically added to the VA. You can update the Bot Name and Purpose and remove use cases.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Click <\/span><strong>Create <\/strong><span style=\"font-weight: 400;\">to create your VA with generated use cases, or c<\/span><span style=\"font-weight: 400;\">lick <\/span><strong>Create without Use Cases<\/strong><span style=\"font-weight: 400;\"> to create your VA without any generated use cases.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095624\/usecases.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56168\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095624\/usecases.png\" alt=\"\" width=\"650\" height=\"462\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095624\/usecases.png 1002w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20230320095624\/usecases-300x213.png 300w\" sizes=\"auto, (max-width: 650px) 100vw, 650px\" \/><\/a><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Wait a few moments for your VA to be configured. Once done, you can continue developing it. If you have chosen to generate use cases, you will find them as Dialog Tasks.<\/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 <strong>Bot Summary<\/strong> page. The first step is to add an <\/span><em><span style=\"font-weight: 400;\">Intent Dialog<\/span><\/em><span style=\"font-weight: 400;\"> to support various business-specific use cases<\/span><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 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 \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100617\/new-dialog-task-1-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100617\/new-dialog-task-1-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100617\/new-dialog-task-1.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">On the <\/span><strong>Create Dialog<\/strong><span style=\"font-weight: 400;\"> page, enter the following details:<\/span>\n<ul>\n<li><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><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<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Click <\/span><strong>Proceed<\/strong>.<strong><br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100524\/create-dialog-task-863x1024.png\" alt=\"\" width=\"594\" height=\"704\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100524\/create-dialog-task-863x1024.png 863w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100524\/create-dialog-task-253x300.png 253w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100524\/create-dialog-task.png 903w\" sizes=\"auto, (max-width: 594px) 100vw, 594px\" \/><\/a><br \/>\n<\/strong><\/li>\n<li style=\"font-weight: 400;\">When prompted to upgrade to <strong>Conversation Driven Dialog Builder<\/strong>, select <strong>Upgrade<\/strong>. For instructions on the Legacy Dialog Builder, <a href=\"https:\/\/developer.kore.ai\/v10-2\/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\/v10-2\/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 for arrival or departure details.<\/span><\/p>\n<ol>\n<li><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><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 \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100538\/entity-node.gif\" alt=\"\" width=\"705\" height=\"314\" \/><\/a><br \/>\n<\/span><\/li>\n<li><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><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><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><span style=\"font-weight: 400;\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400;\"> section, e<\/span>nter the following details:\n<ul>\n<li>Name<\/li>\n<li>Display Name<\/li>\n<li>Type: Select <em><span style=\"font-weight: 400;\">List of Items (enumerated)<\/span><\/em><span style=\"font-weight: 400;\"> from the drop-down list. You can p<\/span>rovide a list of values that the user can select. To add a list of values:\n<ol>\n<li>Click the <strong>Settings <\/strong><span style=\"font-weight: 400;\">icon next to the field.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100548\/entity-properties.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-47615 alignnone\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100548\/entity-properties.png\" alt=\"\" width=\"443\" height=\"515\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100548\/entity-properties.png 613w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100548\/entity-properties-258x300.png 258w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/a><\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/li>\n<li>Select the <strong>Static List<\/strong><span style=\"font-weight: 400;\"> option.<\/span><\/li>\n<li><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><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><span style=\"font-weight: 400;\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400;\">.<br \/>\n<\/span><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20231205143021\/entity-type-list-ennumerable-settings-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-60495\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20231205143021\/entity-type-list-ennumerable-settings-1.png\" alt=\"\" width=\"1904\" height=\"910\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20231205143021\/entity-type-list-ennumerable-settings-1.png 1904w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20231205143021\/entity-type-list-ennumerable-settings-1-300x143.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20231205143021\/entity-type-list-ennumerable-settings-1-1024x489.png 1024w\" sizes=\"auto, (max-width: 1904px) 100vw, 1904px\" \/><\/a><\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<li><span style=\"font-weight: 400;\">Go back to the Entity window.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Under the<\/span><strong> User Prompts<\/strong><span style=\"font-weight: 400;\"> section, enter the following text:<\/span><\/li>\n<\/ol>\n<pre style=\"padding-left: 40px;\"><span style=\"font-weight: 400;\">Hello {{context.session.UserContext.firstName}}! Welcome to *Los Angeles International Airport*.\r\nI can help you with flight Arrival\/Departure information. Please select your preference.<\/span><\/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 style=\"font-family: inherit; font-size: inherit;\">: The context variable retrieves the user\u2019s first name. Also, markdown is used for the airport name to appear in bold.<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><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;\"><span style=\"font-weight: 400;\">option. This displays the list of values as a button template in supported channels.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100542\/entity-prompts.png\" alt=\"\" width=\"517\" height=\"783\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100542\/entity-prompts.png 517w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100542\/entity-prompts-198x300.png 198w\" sizes=\"auto, (max-width: 517px) 100vw, 517px\" \/><\/a><br \/>\n<\/span><\/span><\/li>\n<li><span style=\"font-weight: 400;\">Close the <\/span><strong>Entity <\/strong><span style=\"font-weight: 400;\">window.<\/span><\/li>\n<\/ol>\n<\/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><span style=\"font-weight: 400;\">Click the <\/span><strong>+<\/strong><span style=\"font-weight: 400;\"> icon below the <\/span><strong>Preference Entity<\/strong><span style=\"font-weight: 400;\"> node.<\/span><\/li>\n<li><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><span style=\"font-weight: 400;\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400;\"> section, enter the following details:<\/span>\n<ul>\n<li><strong>Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">FlightDetails<\/span><\/em><\/li>\n<li><strong>Display Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">Flight Details<\/span><\/em><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400;\">Click the <\/span><strong>+ <\/strong>icon<span style=\"font-weight: 400;\">\u00a0next to the <strong>Bot Action<\/strong> node to expand the Bot Action.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">From within the Bot Action node, click <\/span><strong>+.<\/strong><\/li>\n<li><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><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<li><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><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><strong>Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">Fetchflightdetails<\/span><\/em><\/li>\n<li><strong>Display Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">Fetch Flight Details<\/span><\/em><\/li>\n<li><strong>Service Type<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">Custom Service<\/span><\/em><\/li>\n<li><strong>Type<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">Webservice<br \/>\n<\/span><\/em><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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100730\/add-service-node.gif\" alt=\"\" width=\"707\" height=\"315\" \/><\/li>\n<li><strong>Sub Type<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">REST<\/span><\/em><\/li>\n<li><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>On the <strong>Define Request <\/strong>page<strong>,<\/strong> enter the following details:\n<ol>\n<li><strong>Request Type<\/strong><span style=\"font-weight: 400;\"> \u2013 <\/span><em><span style=\"font-weight: 400;\">GET<\/span><\/em><\/li>\n<li><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 \/>\n<\/span><span style=\"font-weight: 400;\">This API does not require any Auth or Header Parameters.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Click the <\/span><strong>Test Request<\/strong><span style=\"font-weight: 400;\"> tab.<\/span>\n<ol>\n<li><span style=\"font-weight: 400;\">Click <\/span><strong>Test<\/strong><span style=\"font-weight: 400;\"> on the top-right.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Wait for the test to complete and you get a Status Code 200.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Click <\/span><strong>Save as Sample Response<\/strong><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Click <\/span><strong>Save.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100630\/service-add-request-1024x293.png\" alt=\"\" width=\"640\" height=\"183\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100630\/service-add-request-1024x293.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100630\/service-add-request-300x86.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100630\/service-add-request.png 1921w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<\/strong><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<li><span style=\"font-weight: 400;\">Return to the dialog builder.<\/span><\/li>\n<\/ol>\n<\/li>\n<li><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 \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100636\/service-connections-1024x456.png\" alt=\"\" width=\"640\" height=\"285\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100636\/service-connections-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100636\/service-connections-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100636\/service-connections.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<\/span><\/em><\/li>\n<li><span style=\"font-weight: 400;\">Close the <\/span><strong>Service <\/strong><span style=\"font-weight: 400;\">window.<\/span><\/li>\n<li><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><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><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;\">. <\/span><span style=\"font-weight: 400;\">The Entity node is required to capture the flight number selected by the user.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">In the <\/span><strong>Entity <\/strong><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><span style=\"font-weight: 400;\">Under the <\/span><strong>General Settings<\/strong><span style=\"font-weight: 400;\"> section, enter the following details:<\/span>\n<ul>\n<li><strong>Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">SelectFlight<\/span><\/em><\/li>\n<li><strong>Display Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">Select Flight\u00a0<\/span><\/em><\/li>\n<li><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<\/ul>\n<\/li>\n<li><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 \/>\n<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">Please provide the flight number.<\/span><\/pre>\n<ol>\n<li><strong>Manage:<\/strong><span style=\"font-weight: 400;\"> Users can define a specific prompt for the Web SDK channel.<\/span><\/li>\n<li><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\/v10-2\/docs\/bots\/bot-builder-tool\/dialog-task\/prompt-editor\/\"><span style=\"font-weight: 400;\">managing user prompts<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100621\/selectflight-entity-manage-prompts.png\" alt=\"\" width=\"516\" height=\"629\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100621\/selectflight-entity-manage-prompts.png 516w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100621\/selectflight-entity-manage-prompts-246x300.png 246w\" sizes=\"auto, (max-width: 516px) 100vw, 516px\" \/><\/a><\/li>\n<li><span style=\"font-weight: 400;\">Click <\/span><strong>Add User Prompts<\/strong><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li><span style=\"font-weight: 400;\">In the <strong>New Prompt Message<\/strong> 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><span style=\"font-weight: 400;\">Under the <\/span><strong>Message <\/strong><span style=\"font-weight: 400;\">section, delete all text from the <strong>Plain Text<\/strong> tab and click the\u00a0<strong>Advanced\u00a0<\/strong>tab.<\/span><\/li>\n<li>Copy and paste the following\u00a0<strong>JavaScript <\/strong>into the Advanced tab. The JavaScript extracts flight numbers matching user preference from the string output from API call and displays them in the\u00a0<em>Quick Reply<\/em>\u00a0format.\n<pre>var data = context.Fetchflightdetails.response.body.details;\r\ncontext.flights = [];\r\ncontext.info;\r\nvar msg;\r\nfor (var i = 0; i &lt; data.length; i++)\r\n{\r\n\u00a0\u00a0\u00a0\u00a0if (context.entities.Preference == data[i].Type)\r\n\u00a0\u00a0\u00a0\u00a0{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0var details = {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"Airlines\" : data[i].Airlines,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"FlightNo\" : data[i].FlightNo,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"Airport\" : data[i].Airport,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"AirportName\" : data[i].AirportName,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"Time\" : data[i].Time\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0};\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0context.flights.push(details);\r\n\u00a0\u00a0\u00a0\u00a0}\r\n}\r\nvar message = {\r\n\u00a0\u00a0\u00a0\u00a0\"type\" : \"template\",\r\n\u00a0\u00a0\u00a0\u00a0\"payload\" : {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"template_type\" : \"quick_replies\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"text\" : \"Here are the flights \" + context.entities.Preference + \" details for Los Angeles International Airport today. Please select the flight number to see details\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"quick_replies\" : []\r\n\u00a0\u00a0\u00a0\u00a0}\r\n};\r\nfor (i=0; i &lt; context.flights.length; i++)\r\n{\r\n\u00a0\u00a0\u00a0var replies = {\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"content_type\":\"text\",\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"title\" : context.flights[i].FlightNo,\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"payload\" : context.flights[i].FlightNo\r\n\u00a0\u00a0\u00a0\u00a0};\r\nmessage.payload.quick_replies.push(replies);\r\n}\r\nprint(JSON.stringify(message));<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<li><span style=\"font-weight: 400;\">Click <\/span><strong>Save<\/strong><span style=\"font-weight: 400;\">.<\/span><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100626\/selectflight-manage-user-prompts-js.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-47636 aligncenter\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100626\/selectflight-manage-user-prompts-js-1024x538.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100626\/selectflight-manage-user-prompts-js-300x158.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100626\/selectflight-manage-user-prompts-js.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/li>\n<li><span style=\"font-weight: 400;\">Go back to Dialog Builder and close the <strong>Entity<\/strong> 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. To add and configure a script node, follow the steps below:<\/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 below 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<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">FlightValidation<\/span><\/em><\/li>\n<li><strong>Display Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">Flight Validation\u00a0<\/span><\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ol start=\"4\">\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<\/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<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">ValidateFlight<\/span><\/em><\/li>\n<li><strong>Display Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">Validate Flight\u00a0<\/span><\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ol start=\"9\">\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 and paste 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\/v10-2\/docs\/bots\/bot-builder-tool\/dialog-task\/context-object\/\">Context Object<\/a>.\n<pre>context.valid = false;\r\ncontext.details;\r\nvar x = context.flights.length;\r\nfor (var l = 0; l &lt; x; l++)\r\n{\r\n\u00a0 \u00a0 if (context.entities.SelectFlight == context.flights[l].FlightNo)\r\n\u00a0 \u00a0 {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0context.valid = true;\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0context.details = {\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"Airlines\" : context.flights[l].Airlines,\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"FlightNo\" : context.flights[l].FlightNo,\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"Airport\" : context.flights[l].Airport,\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"AirportName\" : context.flights[l].AirportName,\r\n\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \"Time\" :context.flights[l].Time\r\n\u00a0 \u00a0 \u00a0 \u00a0 };\r\n\u00a0 \u00a0 \u00a0 \u00a0 break;\r\n\u00a0 \u00a0 }\r\n}\r\nif (context.valid === false)\r\n{\r\n\u00a0 \u00a0 delete context.entities.SelectFlight;\r\n}<\/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 \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100712\/add-script-node-validateflight-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100712\/add-script-node-validateflight-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100712\/add-script-node-validateflight.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\n<\/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<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_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><\/li>\n<\/ol>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><strong>Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">FlightStatus<\/span><\/em><\/li>\n<li><strong>Display Name<\/strong><span style=\"font-weight: 400;\">: <\/span><em><span style=\"font-weight: 400;\">Flight Status<\/span><\/em><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ol start=\"5\">\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 \/>\n<\/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 as follows:<\/span><\/li>\n<\/ol>\n<ul>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><span style=\"font-weight: 400;\">Click <\/span><strong>Manage<\/strong><span style=\"font-weight: 400;\">.\u00a0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">On the <strong>Manage Bot Responses<\/strong> page, click <\/span><strong>Add User Prompts<\/strong>.<\/li>\n<li><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><span style=\"font-weight: 400;\">Under the <\/span><strong>Message<\/strong><span style=\"font-weight: 400;\"> section, delete all text in the <strong>Plain Text<\/strong> tab and click the\u00a0<strong>Advanced\u00a0<\/strong>tab<\/span><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li>Copy and paste the following JavaScript. The JavaScript is written to display the flight details in the <em>Table<\/em> format.\n<pre>var elements = [context.details];\r\nvar message = {\r\n    \"type\": \"template\",\r\n    \"payload\": {\r\n        \"template_type\": \"table\",\r\n        \"text\": \"Here are your flight details\",\r\n        \"columns\": [\r\n            [\"Airline\"],[\"FlightNo\"], [\"Airport\"], [\"Time\"]\r\n        ],\r\n        \"table_design\": \"regular\",\r\n        speech_hint: \"Here are your flight details\",\r\n        elements: []\r\n    }\r\n};\r\nvar ele = [];\r\nfor (var i = 0; i &lt; elements.length; i++) {\r\n    var elementArr = [elements[i].Airlines, elements[i].FlightNo, elements[i].Airport, elements[i].Time];\r\n    ele.push({'Values': elementArr});\r\n}\r\nmessage.payload.elements = ele;\r\nprint(JSON.stringify(message));<\/pre>\n<\/li>\n<li>Click <strong>Save<\/strong>.<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<ol start=\"8\">\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Return 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<ul>\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<\/ul>\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>When you have finished configuring your Dialog Task, it should look something like the illustration below.<\/p>\n<p><span style=\"font-weight: 400;\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100606\/full-dialog-task-1024x538.png\" alt=\"\" width=\"640\" height=\"336\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100606\/full-dialog-task-1024x538.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100606\/full-dialog-task-300x158.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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><span style=\"font-weight: 400;\">Hover over the connection between Flight Validation Bot Action node and <strong>Flight Status<\/strong> message node.<\/span><\/li>\n<li>You can see the\u00a0<strong>Add Node<\/strong>\u00a0button, click the button and then on the \u201c<strong>+<\/strong>\u201d to insert a node.<\/li>\n<li>Create a new Message node.\n<ol>\n<li>Select\u00a0<strong>Message<\/strong>\u00a0&gt;\u00a0<strong>+ New Message<\/strong>.<\/li>\n<li>On the Message window, by default, the\u00a0<strong>Component Properties\u00a0<\/strong>tab is selected.<\/li>\n<li>Under the\u00a0<strong>General Settings<\/strong>\u00a0section, enter the following details:\n<ol>\n<li><b>Name<\/b>: <i>ErrorMessage<\/i><\/li>\n<li><b>Display Name<\/b>: <i>Error Message<\/i><\/li>\n<\/ol>\n<\/li>\n<li>Under the <strong>Bot Responses<\/strong> section, enter the text:\n<pre>The Flight number you entered is incorrect. Let us start again.<\/pre>\n<\/li>\n<li>Click the\u00a0<strong>Connections<\/strong>\u00a0tab.<\/li>\n<li>From the drop-down list, change the default connection from\u00a0<em>FlightStatus <\/em>to\u00a0<em>SelectFlight<\/em>.<\/li>\n<li>Close the <strong>Error Message<\/strong> window.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100659\/add-error-message.gif\" alt=\"\" width=\"660\" height=\"294\" \/><\/a><\/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 Status <\/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 <b>Flight Validation Bot Action<\/b> window, click the <\/span><strong>Connections<\/strong><span style=\"font-weight: 400;\"> tab, and follow the steps below:<\/span><\/li>\n<\/ol>\n<ul>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Click\u00a0<strong>+ ADD IF<\/strong> under <strong>Bot Action Group Connections<\/strong>.<\/li>\n<li>Under the\u00a0<strong>IF\u00a0<\/strong>section, Select\u00a0<strong>Context<\/strong>.<\/li>\n<li>For\u00a0<strong>If Condition<\/strong>, enter \u201c<strong>valid<\/strong>\u201d in the context text field<em>.<\/em><\/li>\n<li>Select the operator as <strong>Equals To<\/strong><em>.<\/em><\/li>\n<li>Enter \u201c<strong>true\u201d <\/strong>in the value text field<em>.<\/em><\/li>\n<li>If this condition is true, then the dialog goes to\u00a0<strong>FlightStatus<\/strong><em>.<\/em><\/li>\n<li>Under the\u00a0<strong>ELSE<\/strong>\u00a0section,<\/li>\n<li>If this condition is false, then the dialog goes to\u00a0<strong>ErrorMessage<\/strong><em>.<\/em><\/li>\n<li>Close the\u00a0<strong>Validate Flight<\/strong>\u00a0Script window.<\/li>\n<li>Click and drag the<strong> ErrorMessage <\/strong>node to the right to view the flow.<\/li>\n<\/ol>\n<\/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\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100705\/add-if-1024x456.png\" alt=\"\" width=\"640\" height=\"285\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100705\/add-if-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100705\/add-if-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100705\/add-if.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><\/p>\n<p>When completed, the task might look similar to the illustration below:<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100514\/completed-task.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-47597 alignleft\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100514\/completed-task-1024x538.png\" alt=\"\" width=\"640\" height=\"336\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100514\/completed-task-1024x538.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100514\/completed-task-300x158.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100514\/completed-task.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/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=\"Add_Events\">Add Events<\/span><\/h2>\n<p>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\u00a0<a href=\"https:\/\/developer.kore.ai\/v10-2\/docs\/bots\/bot-intelligence\/event-based-bot-actions\/\">Event Handlers<\/a>.<\/p>\n<ol>\n<li>Close the Dialog Builder to go back to the\u00a0<strong>Dialog Tasks<\/strong>\u00a0page.<\/li>\n<li>From the Left Navigation pane, and select\u00a0<strong>Intelligence<\/strong>\u00a0&gt;\u00a0<strong>Events<\/strong>.<\/li>\n<li>From the events list, click\u00a0<strong>Configure\u00a0<\/strong>against the\u00a0<strong>On Connect<\/strong>\u00a0event.<\/li>\n<li>On the On Connect window, by default, the\u00a0<strong>Initiate Task<\/strong>\u00a0option is selected; retain it.<\/li>\n<li>From the drop-down list, select the\u00a0<strong>Get Flight Status<\/strong>\u00a0task.<\/li>\n<li>Click\u00a0<strong>Save<\/strong>.<br \/>\n<span style=\"font-weight: 400;\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004102349\/event-handler-1.png\" alt=\"\" width=\"747\" height=\"333\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004102349\/event-handler-1.png 1922w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004102349\/event-handler-1-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004102349\/event-handler-1-1024x456.png 1024w\" sizes=\"auto, (max-width: 747px) 100vw, 747px\" \/><\/a><\/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=\"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 rather than selecting on of the prompts.<\/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 from the prompts.<\/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\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100641\/talktobot-505x1024.png\" alt=\"\" width=\"505\" height=\"1024\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100641\/talktobot-505x1024.png 505w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/20221004100641\/talktobot-148x300.png 148w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-2\/wp-content\/uploads\/sites\/45\/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\/v10-2\/wp-json\/wp\/v2\/posts\/47596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/comments?post=47596"}],"version-history":[{"count":38,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/47596\/revisions"}],"predecessor-version":[{"id":60498,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/posts\/47596\/revisions\/60498"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/media?parent=47596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/categories?post=47596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-2\/wp-json\/wp\/v2\/tags?post=47596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}