{"id":24846,"date":"2020-10-30T12:29:54","date_gmt":"2020-10-30T12:29:54","guid":{"rendered":"https:\/\/developer.kore.ai\/v8-1\/?p=24846"},"modified":"2021-05-18T09:04:45","modified_gmt":"2021-05-18T08:04:45","slug":"entity-rules","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v8-1\/docs\/bots\/how-tos\/entity-rules\/","title":{"rendered":"Entity Rules"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>Validating user input before processing these values goes a long way in improving the bot&#8217;s efficiency and user experience. While the entity type does impose some basic restrictions, these are not always sufficient and does not cater to the specific business requirements. <strong>Entity rules<\/strong> can be used for additional processing hints and validations.<\/p>\n<p>Entity rules can be added from the <strong>Entity Rules<\/strong> section under\u00a0<strong>Instance Properties<\/strong> of the corresponding entity. Add the rule in the JSON editor provided, <a href=\"\/v8-1\/docs\/bots\/bot-builder-tool\/dialog-task\/working-with-the-entity-node\/#Configure_the_Instance_Properties\" target=\"_blank\" rel=\"noopener noreferrer\">see here for how<\/a>.<\/p>\n<p>These rules can also be set in the script for an entity, in such cases, the rule needs to be set before the entity prompt in the dialog flow. Add a script node at the beginning of the dialog or just before the concerned entity node with the following script:<\/p>\n<pre>context.entityRules.&lt;entityName&gt; = {\r\n      \"ruleName\": \"value\"\r\n   }<\/pre>\n<p>Subentity rules can be part of the composite entity rules:<\/p>\n<pre>context.entityRules.&lt;compositeEntityName&gt; = {\r\n    &lt;subentityName&gt; : { \r\n      \"ruleName\": \"value\"\r\n     }\r\n   }<\/pre>\n<p>Below are the entity rules that can be entered in the JSON editor for the required entity or included as <code>ruleName<\/code> in the above script. We are continuously improving and updating this list. Any feedback or suggestions, kindly post in the <a href=\"https:\/\/community.kore.ai\/\">community forum<\/a> and our developers will accommodate it, if feasible.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Generic_rules\">Generic rules<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th><strong>ruleName<\/strong><\/th>\n<th><strong>Value<\/strong><\/th>\n<th><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>processLatestSentence<\/strong><\/td>\n<td>true\/false<\/td>\n<td>To restrict checking to the sentences only from the current volley.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/p>\n<pre>{\r\n \"processLatestSentence\": &lt;true\/false&gt;\r\n}<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>patternsOnly<\/strong><\/td>\n<td>true\/false<\/td>\n<td>To restrict matching to an entity pattern alone. By default, if the given entity patterns do not result in the extraction of entity value, the platform tries to find a value from user utterance. Setting this rule to true will disable that default processing.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/p>\n<pre>{\r\n\"patternsOnly\": &lt;true\/false&gt;\r\n}<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>allowConfirmation<\/strong><\/td>\n<td>true\/false<\/td>\n<td>The extracted entity value is presented to the user after each input and the flow would continue only after confirmation from the user. Currently, this rule is applicable only for LoV enumerated entity types.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/p>\n<pre>{\r\n\"allowConfirmation\": &lt;true\/false&gt;\r\n}<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>confirmYesSynonyms<\/strong><\/td>\n<td>&lt;concept names&gt;<\/td>\n<td>Additional words\/phrases to be used to confirm an entity value.<br \/>\nUsed in conjunction with allowConfirmation rule mentioned above.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/p>\n<pre>{\r\n\"confirmYesSynonyms\": [\"~concept1\", \"~concept2\"]\r\n}<\/pre>\n<p>where concept1: ok;<br \/>\nconcept2: affirmative<\/td>\n<\/tr>\n<tr>\n<td><strong>confirmNoSynonyms<\/strong><\/td>\n<td>&lt;concept names&gt;<\/td>\n<td>Additional words\/phrases to be used to cancel a confirmation entity. If selected\/uttered, the entity value will be set to null<br \/>\nUsed in conjunction with allowConfirmation\u00a0rule mentioned above.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/p>\n<pre>{\r\n\"confirmNoSynonyms\": [\"~concept2\", \"~concept3\"]\r\n}<\/pre>\n<p>where concept1: nope;<br \/>\nconcept2: wrong<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"String_type_entity\">String type entity<\/span><\/h3>\n<h3><span class=\"ez-toc-section\" id=\"Description_entity_type\">Description entity type<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>stripLeading<\/strong><\/td>\n<td>&lt;concept name&gt;<\/td>\n<td>To remove the words given in the concept from the start of the extracted string.<\/p>\n<p>The concept can be a single concept name or a space-separated list of concepts or an array of concept names.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{ \"stripLeading\": [ \r\n      \"~stringConcept\" \r\n    ]\r\n}<\/pre>\n<\/td>\n<td><strong>stringConcept:\u00a0<\/strong> city<\/p>\n<p><strong>Entity Pattern:<\/strong> I like *<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>I like city New York<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> New York<\/td>\n<\/tr>\n<tr>\n<td><strong>stripTrailing<\/strong><\/td>\n<td>&lt;concept name&gt;<\/td>\n<td>To remove words in a concept from the end of the extracted string.<\/p>\n<p>The value can be a single concept name or a space-separated list of concepts or an array of concept names.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{ \"stripTrailing\":\r\n    \"~stringConcept ~stringConcept1\"\r\n }<\/pre>\n<\/td>\n<td><strong>stringConcept:\u00a0<\/strong> city; <strong>stringConcept1:\u00a0<\/strong> airport<\/p>\n<p><strong>Entity Pattern:<\/strong> I like *<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>I like New York city<\/em>&#8221; or &#8220;<em>I like New York airport<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> New York<\/td>\n<\/tr>\n<tr>\n<td><strong>avoidSingleWord<\/strong><\/td>\n<td>&lt;concept name&gt;<\/td>\n<td>To ignore any value that is a member of the concept, unless it is the entire input.<\/p>\n<p>The value can be a single concept name or a space-separated list of concepts or an array of concept names.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"avoidSingleWord\": \r\n      \"~stringConcept\"\r\n}<\/pre>\n<\/td>\n<td><strong>stringConcept:\u00a0<\/strong> chess, cricket<\/p>\n<p><strong>Entity Pattern:<\/strong> like to watch * tournament<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>I like to watch chess tournament<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for entity value<\/p>\n<p><strong>User Utterance <\/strong>&#8220;<em>I like to watch golf tournament<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> golf<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>cricket<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> cricket, since it is the entire input<\/td>\n<\/tr>\n<tr>\n<td><strong>avoidSingleVerb<\/strong><\/td>\n<td>true<\/td>\n<td>If set to true, then any value that is just a verb is ignored, unless it is the entire input.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n\"avoidSingleVerb\": true\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern:<\/strong> I like * music<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>I like playing music<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for entity value<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>I like rap music<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> rap<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>play<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> play, since it is the entire input<\/td>\n<\/tr>\n<tr>\n<td><strong>extractOnlyNumbers<\/strong><\/td>\n<td>true<\/td>\n<td>if true, the entity will extract only numbers present in the string and set it as the entity value<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n\"extractOnlyNumbers\": true\r\n}<\/pre>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Number_type_entity\"><span id=\"Zipcode_entity_type\" class=\"ez-toc-section\">Number <\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>asString<\/strong><\/td>\n<td>true<\/td>\n<td>To capture a number as a string, preserving leading zeros<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"asString\": true\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern<\/strong> &#8211; by default numeric entries<\/p>\n<p><strong>User Utterance<\/strong> &#8220;OTP is <em>009944<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>009944&#8243;<\/em><br \/>\nwithout the rule, it would have been <em>&#8220;9944&#8221;<\/em><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Currency_type_entity\"><span id=\"Currency_entity_type\" class=\"ez-toc-section\">Currency\u00a0<\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>defaultCode<\/strong><\/td>\n<td>&lt;currency code&gt;<br \/>\nor<br \/>\n&lt;country code&gt;<\/td>\n<td>If no code is mentioned in user input, this value will be picked as code.<br \/>\nThe value needs to be a 3 letter currency code or two-letter country alpha-2 codes.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"defaultCode\": \"NZD\"\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern\u00a0<\/strong>pay *<\/p>\n<p><strong>User Utterance <\/strong>&#8220;<em>Pay 30<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>NZD30<\/em>&#8221;<\/p>\n<p><strong>User Utterance <\/strong>&#8220;<em>Pay USD30<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>USD30<\/em>&#8220;<\/td>\n<\/tr>\n<tr>\n<td><strong>maxDigits<\/strong><\/td>\n<td>&lt;number&gt;<\/td>\n<td>To restrict the amount length. If the amount length exceeds the value it will be discarded.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"maxDigits\":[\r\n    \"3\"\r\n   ]\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern\u00a0<\/strong>pay *<\/p>\n<p><strong>User Utterance <\/strong>&#8220;<em>Pay USD30<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>USD30<\/em>&#8221;<\/p>\n<p><strong>User Utterance <\/strong>&#8220;<em>Pay USD3000<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for value<\/td>\n<\/tr>\n<tr>\n<td><strong>currencyCodes<\/strong><\/td>\n<td>[&lt;currency code&gt;,&lt;currency code&gt;]<br \/>\nor<br \/>\n[&lt;country code&gt;,&lt;country code&gt;]<\/td>\n<td>To restrict the currency codes. If the user entered code is not in the given list then the value will be discarded.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"currencyCodes\": [\r\n    \"USD\",\r\n    \"INR\",\r\n    \"NZD\"\r\n  ]\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern\u00a0<\/strong>pay *<\/p>\n<p><strong>User Utterance <\/strong>&#8220;<em>Pay USD30<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>USD30<\/em>&#8221;<\/p>\n<p><strong>User Utterance <\/strong>&#8220;<em>Pay AUD30<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for a value<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"PersonName_type_entity\"><span id=\"PersonName_entity_type\" class=\"ez-toc-section\">PersonName\u00a0<\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>disablePatterns<\/strong><\/td>\n<td>An array of person name patterns to ignore &#8211; currently supporting only &#8220;<em>possessive<\/em>&#8220;<\/td>\n<td>To disable patterns in extracting a person\u2019s name when not applicable in specific scenarios.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"disablePatterns\": [\r\n    \"possessive\"\r\n  ]\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default capitalized words<\/p>\n<p><strong>User Utterance <\/strong>&#8220;schedule Bob&#8217;s review at 9 am&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>Bob<\/em>&#8220;<\/td>\n<\/tr>\n<tr>\n<td><strong>ignoreWords<\/strong><\/td>\n<td>&lt;concept name&gt;<\/td>\n<td>Words in the concept are not to be considered as names even when capitalized.<\/p>\n<p>The concept name could be a space-separated list of concepts or an array of concepts.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"ignoreWords\": [\r\n    \"review\",\r\n    \"~prepositionList\"\r\n  ]\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern<\/strong> &#8211; by definition capitalized words<\/p>\n<p><strong>User Utterance <\/strong>&#8220;meeting for Bob Review&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>Bob<\/em>&#8221;<br \/>\nwould have been &#8220;Bob Review&#8221; without the rule<\/td>\n<\/tr>\n<tr>\n<td><strong>negativePatterns<\/strong><\/td>\n<td>array of patterns<\/td>\n<td>Person names can be general capitalized words, or a name can be used in a sense where it is not meant to be taken as a person.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"negativePatterns\": [\r\n    \"about *\"\r\n  ]\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern<\/strong> &#8211; by definition capitalized words<\/p>\n<p><strong>User Utterance <\/strong>&#8220;schedule a meeting about Philip with Fred&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>Fred<\/em>&#8221;<br \/>\nwould have been &#8220;Philip&#8221; without the rule<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Company_type_entity\"><span id=\"PersonName_entity_type\" class=\"ez-toc-section\">Company <\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>ignoreWords<\/strong><\/td>\n<td>&lt;concept name&gt;<\/td>\n<td>Words in the concept are not to be considered as companies even when capitalized.<\/p>\n<p>The concept name could be a space-separated list of concepts or an array of concepts.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"ignoreWords\": [\r\n    \"atm\"\r\n  ]\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern<\/strong> &#8211; by definition capitalized words<\/p>\n<p><strong>User Utterance <\/strong>&#8220;find ATM&#8221;<br \/>\n<strong>Extracted Value<\/strong> none<br \/>\nwould have been &#8220;ATM&#8221; (an Italian company) without the rule<\/td>\n<\/tr>\n<tr>\n<td><strong>negativePatterns<\/strong><\/td>\n<td>An array of company name patterns to ignore<\/td>\n<td>To disable patterns in extracting a company name when not applicable in specific scenarios.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Date_type_entity\"><span id=\"Date_entity_type\" class=\"ez-toc-section\">Date\u00a0<\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>range<\/strong><\/td>\n<td>{ \u201cfrom\u201d : &lt;from-date&gt;, \u201cto\u201d : &lt;to-date&gt; }<\/td>\n<td>To extract dates only in the specified range. Either endpoint is optional.<\/p>\n<p>Values can be a date, YYYY-MM-DD, or a keyword: today, tomorrow, yesterday. The dates are inclusive.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n\"range\": {\r\n   \"from\": \"2020-01-01\",\r\n   \"to\": \"today\"\r\n  }\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;show schedule for 2019-02-03&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for a value<\/p>\n<p><strong>User Utterance <\/strong>&#8220;show schedule for tomorrow&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for a value<\/p>\n<p><strong>User Utterance <\/strong>&#8220;show schedule\u00a0 for 2020-02-03&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;2020-02-03&#8221;<\/td>\n<\/tr>\n<tr>\n<td><strong>referenceDate<\/strong><\/td>\n<td>&lt;date&gt;<\/td>\n<td>Sets the reference date to &lt;date&gt; and any date calculation to set the current date entity value is based on that date.<\/p>\n<p>Values should be a date, YYYY-MM-DD, or a keyword: today, tomorrow, yesterday.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"referenceDate\": \"2020-07-09\"\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;schedule after two days&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;2020-07-11&#8221;<br \/>\nwould have been two days from the current date without the reference date<\/td>\n<\/tr>\n<tr>\n<td><strong>preferredDateFormat<\/strong><\/td>\n<td>&#8220;yyyy-mm-dd&#8221;<\/td>\n<td>In case of ambiguity in date, it uses the preferred date format to resolve ambiguity.<br \/>\nValues can be:<\/p>\n<ul>\n<li>&#8220;yyyy-mm-dd&#8221;<\/li>\n<li>&#8220;yyyy-dd-mm&#8221;<\/li>\n<li>&#8220;ddmmyyyy&#8221;<\/li>\n<li>&#8220;mmddyyyy&#8221;<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"preferredDateFormat\": \"mm-dd-yyyy\"\r\n}<\/pre>\n<\/td>\n<td><strong>User Utterance <\/strong>&#8220;03-04-2021&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;2021-03-04&#8221;<br \/>\nNOTE: This rule comes into the picture only when there is an ambiguity in the user utterance. If the user\u2019s preference is already set as part of a previous conversation, then the user selected format would take precedence over the defined rule<br \/>\nFor example, a per the previous use case, if the user had selected the preferred format to be &#8220;dd-mm-yyy&#8221; previously in the conversation then the date would be taken as &#8220;2021-04-03&#8221;<\/td>\n<\/tr>\n<tr>\n<td><strong>returnOnlyMonthYear<\/strong><\/td>\n<td>&lt;true\/false&gt;<\/td>\n<td>When set to true, the platform would capture the month and year alone from the user input and update the context object accordingly. Even if the user gives a full input (like 20 Oct 2019), the system would only take Oct 2019 from that input. The user will not be prompted for the date if not provided<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"returnOnlyMonthYear\": true\r\n}<\/pre>\n<\/td>\n<td><strong>User Utterance <\/strong>&#8220;03-04-2021&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;04-2021&#8221;<strong>User Utterance <\/strong>&#8220;Apr 2021&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;04-2021&#8221;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Date_Period_type_entity\"><span id=\"Date_entity_type\" class=\"ez-toc-section\">Date Period <\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>range<\/strong><\/td>\n<td>{ \u201cfrom\u201d : &lt;from-date&gt;, \u201cto\u201d : &lt;to-date&gt; }<\/td>\n<td>To extract dates only in the specified range. Either endpoint is optional.<\/p>\n<p>Values can be a date, YYYY-MM-DD, or a keyword: today, tomorrow, yesterday. The dates are inclusive.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n\"range\": {\r\n   \"from\": \"2020-01-01\",\r\n   \"to\": \"today\"\r\n  }\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;show schedule for 2019-02-03&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for a value<\/p>\n<p><strong>User Utterance <\/strong>&#8220;show schedule for tomorrow&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for a value<\/p>\n<p><strong>User Utterance <\/strong>&#8220;show schedule\u00a0 for 2020-02-03&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;2020-02-03&#8221;<\/td>\n<\/tr>\n<tr>\n<td><strong>referenceDate<\/strong><\/td>\n<td>&lt;date&gt;<\/td>\n<td>Sets the reference date to &lt;date&gt; and any date calculation to set the current date entity value is based on that date.<\/p>\n<p>Values should be a date, YYYY-MM-DD, or a keyword: today, tomorrow, yesterday.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"referenceDate\": \"2020-07-09\"\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;schedule after two days&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;2020-07-11&#8221;<\/td>\n<\/tr>\n<tr>\n<td><strong>tense<\/strong><\/td>\n<td>past\/future<\/td>\n<td>To adjust the date period based on the tense when the year is not present in the user utterance.<\/p>\n<p>Without this rule, the year is set as the current year if the month\/day falls within 90 days from the current date else it would be set to the previous year. With this rule, you can force the year to current or past.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n \"tense\": \"past\"\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;get the statement for Jan&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;2020-01-01&#8221; if the current date is &#8220;2020-15-12&#8221;<br \/>\nwithout the rule, it would have been &#8220;2021-01-01&#8221;<\/p>\n<p><strong>\u00a0<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>preferredDateFormat<\/strong><\/td>\n<td>&#8220;yyyy-mm-dd&#8221;<\/td>\n<td>In case of ambiguity in date, it uses the preferred date format to resolve ambiguity.<br \/>\nValues can be:<\/p>\n<ul>\n<li>&#8220;yyyy-mm-dd&#8221;<\/li>\n<li>&#8220;yyyy-dd-mm&#8221;<\/li>\n<li>&#8220;ddmmyyyy&#8221;<\/li>\n<li>&#8220;mmddyyyy&#8221;<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"preferredDateFormat\": \"mm-dd-yyyy\"\r\n}<\/pre>\n<\/td>\n<td><strong>User Utterance <\/strong>&#8220;03-04-2021&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;2021-03-04&#8221;<br \/>\nNOTE: This rule comes into the picture only when there is an ambiguity in the user utterance. If the user\u2019s preference is already set as part of a previous conversation, then the user selected format would take precedence over the defined rule<br \/>\nFor example, a per the previous use case, if the user had selected the preferred format to be &#8220;dd-mm-yyy&#8221; previously in the conversation then the date would be taken as &#8220;2021-04-03&#8221;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"DateTime_type_entity\"><span id=\"DateTime_entity_type\" class=\"ez-toc-section\">DateTime <\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>range<\/strong><\/td>\n<td>{ \u201cfrom\u201d : &lt;from-datetime&gt;, \u201cto\u201d : &lt;to-datetime&gt; }<\/td>\n<td>To extract date-times only in the specified range. Either endpoint is optional.<\/p>\n<p>Values can be a date, YYYY-MM-DD, or a DateTime, YYYY-MM-DDTHH:MM:SS (user\u2019s timezone is assumed if none specified) or a keyword: today, tomorrow, yesterday, now. The dates are inclusive.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"range\": {\r\n    \"from\": \"2020-01-01T00:00:00+05:30\",\r\n    \"to\": \"2020-10-01T00:00:00+05:30\"\r\n  }\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date time patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;set alarm for 2019-02-03T10:00:00&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for a value<\/p>\n<p><strong>User Utterance <\/strong>&#8220;show schedule for 2021-12-20T10:00:00&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for a value<\/p>\n<p><strong>User Utterance <\/strong>&#8220;show schedule\u00a0 for 2020-02-03 T10:00:00&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;2020-02-03T10:00:00&#8221;<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\"><strong>preferredTimes<\/strong><\/td>\n<td>{ \u201cfrom\u201d : &lt;from-time&gt;,<br \/>\n\u201cto\u201d : &lt;to-time&gt; }<\/td>\n<td>To set the preferred time which can be used to interpret times when they are ambiguous. These times would be applicable to all days of the week.<\/p>\n<p>For example, \u201c3\u201d will become \u201c3 pm\u201d if the preferredTimes are 9 am to 6 pm.<\/p>\n<p>If the time cannot be placed inside the range then it will pick am\/pm based on which is closest. If there are two possibilities or equal distance then the \u201cdaylight\/standard awake\u201d hours will be used. The times should be ISO 8601 format, THH:MM<\/td>\n<\/tr>\n<tr>\n<td>{ \u201cfrom\u201d : [],<br \/>\n\u201cto\u201d : [] }<\/td>\n<td>This option is for setting preferred times different for different days of the week. The \u201cfrom\u201d and \u201cto\u201d keys can be arrays with 7 members representing the time for each day, from Sunday to Saturday. Each value should be in the in Thh:MM format or an empty string to indicate there is no preference.<\/td>\n<\/tr>\n<tr>\n<td>{ \u201cfavor\u201d : &lt;keyword&gt; }<\/td>\n<td>The \u201cfavor\u201d keyword can be used to set the preference in terms of \u201cfuture\u201d, \u201cpast\u201d, \u201cam\u201d, or \u201cpm\u201d.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre> \"preferredTimes\": {\r\n    \"from\": \"T12:00:00\",\r\n    \"to\": \"T18:00:00\"\r\n  }<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;remind me at 3&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;T15:00:00&#8221;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre> \"preferredTimes\": {\r\n    \"from\": [\r\n      \"\", \"T09:00\", \r\n      \"T09:00\", \"T21:00\", \r\n      \"T21:00\", \"T07:00\", \"\"\r\n    ],\r\n    \"to\": [\r\n      \"\", \"T18:00\",\r\n      \"T18:00\", \"T06:00\", \r\n      \"T06:00\", \"T16:00\", \"\"\r\n    ]\r\n  }<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;remind me at 3&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;T15:00:00&#8221;, if the current day is Monday\/Tuesday\/Friday;<br \/>\n&#8220;T03:00:00&#8221;, if the current day is Wednesday\/Thursday<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre> \"preferredTimes\": {\r\n    \"favor\": \"pm\"\r\n  }<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;remind me at 3&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;T15:00:00&#8221;<\/td>\n<\/tr>\n<tr>\n<td><strong>timeRangePossible<\/strong><\/td>\n<td>true\/false<\/td>\n<td>If true then the dialog will be looking for time range in the user input.<\/p>\n<p>Influences how \u201c10 to 4\u201d is interpreted. By default, this will be \u201c3:50\u201d but if there is the possibility of a range then will be decoded as 2 times \u201c10:00\u201d and \u201c16:00\u201d<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n\"timeRangePossible\": \"true\"\r\n}<\/pre>\n<\/td>\n<td>&nbsp;<\/p>\n<p><strong>\u00a0<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>preferredDateFormat<\/strong><\/td>\n<td>&#8220;yyyy-mm-dd&#8221;<\/td>\n<td>In case of ambiguity in date, it uses the preferred date format to resolve ambiguity.<br \/>\nValues can be:<\/p>\n<ul>\n<li>&#8220;yyyy-mm-dd&#8221;<\/li>\n<li>&#8220;yyyy-dd-mm&#8221;<\/li>\n<li>&#8220;ddmmyyyy&#8221;<\/li>\n<li>&#8220;mmddyyyy&#8221;<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"preferredDateFormat\": \"mm-dd-yyyy\"\r\n}<\/pre>\n<\/td>\n<td><strong>User Utterance <\/strong>&#8220;03-04-2021&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;2021-03-04&#8221;<br \/>\nNOTE: This rule comes into the picture only when there is an ambiguity in the user utterance. If the user\u2019s preference is already set as part of a previous conversation, then the user selected format would take precedence over the defined rule<br \/>\nFor example, a per the previous use case, if the user had selected the preferred format to be &#8220;dd-mm-yyy&#8221; previously in the conversation then the date would be taken as &#8220;2021-04-03&#8221;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Time_type_entity\"><span id=\"DateTime_entity_type\" class=\"ez-toc-section\">Time <\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td rowspan=\"3\"><strong>preferredTimes<\/strong><\/td>\n<td>{ \u201cfrom\u201d : &lt;from-time&gt;,<br \/>\n\u201cto\u201d : &lt;to-time&gt; }<\/td>\n<td>To set the preferred time which can be used to interpret times when they are ambiguous. These times would be applicable to all days of the week.<\/p>\n<p>For example, \u201c3\u201d will become \u201c3 pm\u201d if the preferredTimes are 9 am to 6 pm.<\/p>\n<p>If the time cannot be placed inside the range then it will pick am\/pm based on which is closest. If there are two possibilities or equal distance then the \u201cdaylight\/standard awake\u201d hours will be used. The times should be ISO 8601 format, THH:MM<\/td>\n<\/tr>\n<tr>\n<td>{ \u201cfrom\u201d : [],<br \/>\n\u201cto\u201d : [] }<\/td>\n<td>This option is for setting preferred times different for different days of the week. The \u201cfrom\u201d and \u201cto\u201d keys can be arrays with 7 members representing the time for each day, from Sunday to Saturday. Each value should be in the in Thh:MM format or an empty string to indicate there is no preference.<\/td>\n<\/tr>\n<tr>\n<td>{ \u201cfavor\u201d : &lt;keyword&gt; }<\/td>\n<td>The \u201cfavor\u201d keyword can be used to set the preference in terms of \u201cfuture\u201d, \u201cpast\u201d, \u201cam\u201d, or \u201cpm\u201d.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre> \"preferredTimes\": {\r\n    \"from\": \"T12:00:00\",\r\n    \"to\": \"T18:00:00\"\r\n  }<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;remind me at 3&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;T15:00:00&#8221;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre> \"preferredTimes\": {\r\n    \"from\": [\r\n      \"\", \"T09:00\", \r\n      \"T09:00\", \"T21:00\", \r\n      \"T21:00\", \"T07:00\", \"\"\r\n    ],\r\n    \"to\": [\r\n      \"\", \"T18:00\",\r\n      \"T18:00\", \"T06:00\", \r\n      \"T06:00\", \"T16:00\", \"\"\r\n    ]\r\n  }<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;remind me at 3&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;T15:00:00&#8221;, if the current day is Monday\/Tuesday\/Friday;<br \/>\n&#8220;T03:00:00&#8221;, if the current day is Wednesday\/Thursday<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre> \"preferredTimes\": {\r\n    \"favor\": \"pm\"\r\n  }<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default date patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;remind me at 3&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;T15:00:00&#8221;<\/td>\n<\/tr>\n<tr>\n<td><strong>timeRangePossible<\/strong><\/td>\n<td>true\/false<\/td>\n<td>If true then the dialog will be looking for time range in the user input.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<p>{<br \/>\n&#8220;timeRangePossible&#8221;: &#8220;true&#8221;<br \/>\n}<\/td>\n<td>Influences how utterances like \u201c10 to 4\u201d is interpreted. By default, this will be \u201c3:50\u201d but if there is the possibility of a range then will be decoded as 2 separate time values \u201c10:00\u201d and \u201c16:00\u201d<\/td>\n<\/tr>\n<tr>\n<td><strong>range<\/strong><\/td>\n<td>{ \u201cfrom\u201d : now,<br \/>\n}<br \/>\nor<br \/>\n{ \u201cto\u201d : now<br \/>\n}<\/td>\n<td>To extract date-times only in the specified range. Either endpoint is optional.<\/p>\n<p>Currently, support is extended to the value &#8220;now&#8221; alone<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"range\": {\r\n    \"from\": now\r\n  }\r\n}<\/pre>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"City_type_entity\"><span id=\"City_entity_type\" class=\"ez-toc-section\">City\u00a0<\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>ignoreWords<\/strong><\/td>\n<td>&lt;concept name&gt;<\/td>\n<td>For the words in the concept not to be considered as cities.<\/p>\n<p>The concept name could be a space-separated list of concepts or an array of concepts or space-separated strings.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"ignoreWords\": \"Send\"\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default capitalized words<\/p>\n<p><strong>User Utterance <\/strong>&#8220;Send destination to my email&#8221;<br \/>\n<strong>Extracted Value<\/strong> prompt for entity value, without the rule it would have been &#8220;Send&#8221; since it is a city name<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Zip_Code_type_entity\"><span id=\"Zipcode_entity_type\" class=\"ez-toc-section\">Zip Code <\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>preferredCountries<\/strong><\/td>\n<td>[&lt;\u201ccountry1\u201d&gt;,&lt;\u201ccountry2\u201d&gt;,..]<\/td>\n<td>To restrict zip code from the given set of preferred countries along with the user location country and the gleaned countries from the input.<\/p>\n<p>Need to add two-letter country alpha-2 codes in place of<br \/>\n&lt;\u201ccountry1\u201d&gt;,&lt;\u201ccountry2\u201d&gt;,&#8230;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"preferredCountries\": [\r\n    \"GB\"\r\n  ]\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern <\/strong>&#8211; by default zip code patterns<\/p>\n<p><strong>User Utterance <\/strong>&#8220;check delivery to <em>PO16 7GZ<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>PO16 7GZ<\/em>&#8220;, without the rule this might have been ignored if the user is not in the UK region<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Location_type_entity\"><span id=\"Zipcode_entity_type\" class=\"ez-toc-section\">Location <\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>preferredCountries<\/strong><\/td>\n<td>[&lt;\u201ccountry1\u201d&gt;,&lt;\u201ccountry2\u201d&gt;,..]<\/td>\n<td>To restrict location from the given set of preferred countries along with the user location country and the gleaned countries from the input.<\/p>\n<p>Need to add two-letter country alpha-2 codes in place of<br \/>\n&lt;\u201ccountry1\u201d&gt;,&lt;\u201ccountry2\u201d&gt;,&#8230;<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"preferredCountries\": [\r\n    \"GB\"\r\n  ]\r\n}<\/pre>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"List_of_Items_enum_type_entity\"><span id=\"Zipcode_entity_type\" class=\"ez-toc-section\">List of Items (enum) <\/span>type entity<\/span><\/h3>\n<table>\n<thead>\n<tr>\n<th width=\"25%\">ruleName<\/th>\n<th width=\"25%\">Value<\/th>\n<th width=\"50%\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td width=\"25%\"><strong>ownership<\/strong><\/td>\n<td width=\"25%\">include\/<br \/>\nexclude<\/td>\n<td width=\"50%\">To look for potential \u201cownership\u201d phrasing, e.g. \u201cis mine\u201d to determine if a potential choice should be included or excluded from the entity value.<br \/>\nExamples of ownership phrases are \u201cis mine\u201d, \u201cbelongs to me\u201d, etc.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"ownership\": \"include\"\r\n}<\/pre>\n<\/td>\n<td><strong>Input Options<\/strong> &#8211; Pick your item: &#8220;pen&#8221;, &#8220;watch&#8221;, &#8220;bottle&#8221;, &#8220;book&#8221;, &#8220;cap&#8221;<\/p>\n<p><strong>User Utterance<\/strong> &#8220;first two are mine&#8221;<br \/>\n<strong>Extracted Value<\/strong> [&#8220;pen&#8221;, &#8220;watch&#8221;]<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"ownership\": \"exclude\"\r\n}<\/pre>\n<\/td>\n<td><strong>Input Options<\/strong> &#8211; Pick your item: &#8220;pen&#8221;, &#8220;watch&#8221;, &#8220;bottle&#8221;, &#8220;book&#8221;, &#8220;cap&#8221;<\/p>\n<p><strong>User Utterance<\/strong> &#8220;first two are mine&#8221;<br \/>\n<strong>Extracted Value<\/strong> [&#8220;bottle&#8221;, &#8220;book&#8221;, &#8220;cap&#8221;], since the rule is to exclude the ownership values.<\/td>\n<\/tr>\n<tr>\n<td><strong>includeWords<\/strong><\/td>\n<td>&lt;concept name&gt; or array of words<\/td>\n<td>The list of words that supplement to the ownership phrases.<br \/>\nThe value can be an array of strings or a concept.To be used along with <em>ownership: include<\/em> rule<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"ownership\": \"include\",\r\n  \"includeWords\": \"great\"\r\n}<\/pre>\n<\/td>\n<td><strong>Input Options<\/strong> &#8211; Pick your item: &#8220;pen&#8221;, &#8220;watch&#8221;, &#8220;bottle&#8221;, &#8220;book&#8221;, &#8220;cap&#8221;<\/p>\n<p><strong>User Utterance<\/strong> &#8220;first two are mine&#8221;<br \/>\n<strong>Extracted Value<\/strong> [&#8220;pen&#8221;, &#8220;watch&#8221;]<\/p>\n<p><strong>User Utterance<\/strong> &#8220;first two are great&#8221;<br \/>\n<strong>Extracted Value<\/strong> [&#8220;pen&#8221;, &#8220;watch&#8221;]<\/td>\n<\/tr>\n<tr>\n<td><strong>excludeWords<\/strong><\/td>\n<td>&lt;concept name&gt; or array of words<\/td>\n<td>The list of words that can be used as non-ownership phrases.<br \/>\nThe value can be an array of strings or a concept. To be used along with <em>ownership: exclude<\/em> rule<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"ownership\": \"exclude\",\r\n\u00a0 \u00a0\"excludeWords\": \"~lovConcept\"\r\n}<\/pre>\n<\/td>\n<td><strong>Input Options<\/strong> &#8211; Pick your item: &#8220;pen&#8221;, &#8220;watch&#8221;, &#8220;bottle&#8221;, &#8220;book&#8221;, &#8220;cap&#8221;<br \/>\n<strong>lovConcept<\/strong> &#8211; dubious<strong>User Utterance<\/strong> &#8220;first two are dubious&#8221;<br \/>\n<strong>Extracted Value<\/strong> [&#8220;bottle&#8221;, &#8220;book&#8221;, &#8220;cap&#8221;]<\/td>\n<\/tr>\n<tr>\n<td width=\"25%\"><strong>noIndexMatch<\/strong><\/td>\n<td width=\"25%\">true<\/td>\n<td width=\"50%\">To disable the alphabet and number Index match, would not allow the user to select the items using an index.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Example<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"noIndexMatch\": \"true\"\r\n}<\/pre>\n<\/td>\n<td><strong>Input Options<\/strong> &#8211; Pick your item: &#8220;pen&#8221;, &#8220;watch&#8221;, &#8220;bottle&#8221;, &#8220;book&#8221;, &#8220;cap&#8221;<\/p>\n<p><strong>User Utterance<\/strong> a<br \/>\n<strong>Extracted Value<\/strong> prompt for input, without the rule it would have been [&#8220;pen&#8221;]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"Validating user input before processing these values goes a long way in improving the bot's efficiency and user experience. While the entity type does impose some basic restrictions, these are not always sufficient and does not cater to the specific business requirements. Entity rules can be used for additional processing hints and validations. Entity rules...","protected":false},"author":14,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74],"tags":[],"class_list":["post-24846","post","type-post","status-publish","format-standard","hentry","category-how-tos"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/24846","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/comments?post=24846"}],"version-history":[{"count":13,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/24846\/revisions"}],"predecessor-version":[{"id":26992,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/posts\/24846\/revisions\/26992"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/media?parent=24846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/categories?post=24846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-1\/wp-json\/wp\/v2\/tags?post=24846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}