{"id":21403,"date":"2019-06-11T05:56:02","date_gmt":"2019-06-11T04:56:02","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=21403"},"modified":"2022-10-03T09:35:47","modified_gmt":"2022-10-03T08:35:47","slug":"customizing-error-messages","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-settings\/customizing-error-messages\/","title":{"rendered":"Customizing Error Messages"},"content":{"rendered":"<p><span style=\"font-weight: 400\">In the XO Platform, each Virtual Assistant contains a set of predefined error messages along with actions for standard HTTP Status codes returned for an HTTP Request method.<\/span><\/p>\n<p><span style=\"font-weight: 400\">In most cases, the default response and action are sufficient for an end-user response, however, you may need to handle other HTTP Status codes not defined by default, customize the error message itself, or change the default response by Kore.ai in the event of an error.<\/span><\/p>\n<p><span style=\"font-weight: 400\">This topic describes how to customize and create error messages for Kore.ai assistants.<\/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=\"Custom_Status_Codes\"><span style=\"font-weight: 400\">Custom Status Codes<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">There are approximately 25 HTTP Status codes defined by default.<\/span><\/p>\n<p><span style=\"font-weight: 400\">To customize an HTTP Status code:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Open the assistant in the XO Platform<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select <\/span><strong>Build<\/strong><span style=\"font-weight: 400\"> tab from top menu<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the left menu click <\/span><strong>Configurations -&gt; General Settings.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092615\/bot-level-errors.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47195\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092615\/bot-level-errors.png\" alt=\"\" width=\"852\" height=\"388\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092615\/bot-level-errors.png 1943w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092615\/bot-level-errors-300x137.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092615\/bot-level-errors-1024x466.png 1024w\" sizes=\"auto, (max-width: 852px) 100vw, 852px\" \/><\/a><br \/><\/strong><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Scroll down to locate the <\/span><strong>Error Messages<\/strong><span style=\"font-weight: 400\"> section.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092607\/500-error.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47192\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092607\/500-error.png\" alt=\"\" width=\"509\" height=\"455\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092607\/500-error.png 708w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092607\/500-error-300x268.png 300w\" sizes=\"auto, (max-width: 509px) 100vw, 509px\" \/><\/a><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click the <\/span><strong>Edit<\/strong> <span style=\"font-weight: 400\"> icon for the code that you want to customize to open the <\/span><strong>Setup Error Message<\/strong><span style=\"font-weight: 400\"> dialog.<\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Message Type<\/strong><span style=\"font-weight: 400\"> field, select one of the following options:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><strong>Custom<\/strong><span style=\"font-weight: 400\"> \u2013 Displays a <\/span><strong>Custom Message<\/strong><span style=\"font-weight: 400\"> field to define an error-specific message for the end-user.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Source<\/strong><span style=\"font-weight: 400\"> \u2013 Displays the <\/span><strong>Error Paths<\/strong><span style=\"font-weight: 400\"> field where you can use to define the JSON path from the JSON response payload for HTTP Status codes other than those in the 2XX range (success messages).<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Action<\/strong><span style=\"font-weight: 400\"> field, specify the action to take when the number of consecutive errors defined in the <\/span><strong>Error Recurrence<\/strong><span style=\"font-weight: 400\"> field is reached. Select one of the following:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><strong>Disable<\/strong><span style=\"font-weight: 400\"> \u2013 The task is set to <\/span><strong>Inactive<\/strong><span style=\"font-weight: 400\"> when the error occurs. The end-user can activate the task when needed.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Reschedule<\/strong><span style=\"font-weight: 400\"> \u2013 Displays the <\/span><strong>Retry Interval<\/strong><span style=\"font-weight: 400\"> field used to define the elapsed time in minutes after which to retry the task when the error occurs.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Disable Auth<\/strong><span style=\"font-weight: 400\"> \u2013 When the error occurs, the authorization mechanism defined for the task is disabled. Any other task that uses the same authorization mechanism is also disabled.<\/span><\/li>\n<li style=\"font-weight: 400\"><strong>Notify<\/strong><span style=\"font-weight: 400\"> \u2013 Displays the error message in the end-user interface.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092619\/error-actions.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-47198\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092619\/error-actions.png\" alt=\"\" width=\"484\" height=\"430\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092619\/error-actions.png 709w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20221003092619\/error-actions-300x267.png 300w\" sizes=\"auto, (max-width: 484px) 100vw, 484px\" \/><\/a><\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Message<\/strong><span style=\"font-weight: 400\"> field (available only for the default messages), enter the text message displayed to the end-user.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">In the <\/span><strong>Error Recurrence<\/strong><span style=\"font-weight: 400\"> field, specify the number of consecutive error codes must be returned before the action is executed. By default, the <\/span><strong>Error Recurrence<\/strong><span style=\"font-weight: 400\"> field is set to \u201d <\/span><span style=\"font-weight: 400\">1<\/span><span style=\"font-weight: 400\"> \u201c.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Click <\/span><strong>Add<\/strong><span style=\"font-weight: 400\"> to save and close the <\/span><strong>Setup Error Message<\/strong><span style=\"font-weight: 400\"> dialog for your custom error message.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">To create a new HTTP Status code, click <\/span><strong>Add Error Message<\/strong><span style=\"font-weight: 400\">, define the fields for your new code as described in the preceding section, and then click <\/span><strong>Add.<\/strong><\/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","protected":false},"excerpt":{"rendered":"<p>In the XO Platform, each Virtual Assistant contains a set of predefined error messages along with actions for standard HTTP Status codes returned for an HTTP Request method. In most cases, the default response and action are sufficient for an end-user response, however, you may need to handle other HTTP Status codes not defined by&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65],"tags":[],"class_list":["post-21403","post","type-post","status-publish","format-standard","hentry","category-bot-settings"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/21403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=21403"}],"version-history":[{"count":8,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/21403\/revisions"}],"predecessor-version":[{"id":47203,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/21403\/revisions\/47203"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=21403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=21403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=21403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}