{"id":24846,"date":"2020-10-30T12:29:54","date_gmt":"2020-10-30T12:29:54","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=24846"},"modified":"2023-12-20T06:31:32","modified_gmt":"2023-12-20T06:31:32","slug":"entity-rules","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-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 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=\"\/docs\/bots\/bot-builder-tool\/dialog-task\/working-with-the-entity-node\/#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>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<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>preConditions<\/strong><\/td>\n<td>user defined preconditions<\/td>\n<td>To define preconditions for all entity types to process entity extraction if one of the conditions is true. If the condition is invalid the entity extraction is skipped entirely.<\/p>\n<p><strong>Use Case Examples:<\/strong><\/p>\n<ul>\n<li><strong>Example1<\/strong>: A composite entity matches with a set of identification numbers, such as membership ID, provider ID, and RX number. You can set the precondition rule as <code>\"preConditions\" : [\"checkMemberID\"]<\/code>.<\/li>\n<li><strong>Example 2<\/strong>: A VA has two static list of values (LOV) in a composite entity, you can add precondition to customer specific LOV to enable it.<\/li>\n<li><strong>Example 3<\/strong>: If you don\u2019t want to extract entity values for simple utterances, then add preconditions to skip the extraction entirely.<\/li>\n<li><strong>Example 4<\/strong>: Add a precondition for each car make type to simplify the extraction of valid car models based on the car make. The car make can be a custom concept entity with an output tag based on the extracted entity value followed by a composite of individual LoVs for each model. Each list has a pre-condition corresponding to the make.<\/li>\n<\/ul>\n<p>The pre-condition can be expressed as a context tag or trait (like an intent\u2019s pre-condition) or when enclosed in parentheses, as a pattern. For example:<\/p>\n<pre>\"entityRules\" : {\r\n    \"preConditions\" : [\"checkMemberID\"]\r\n}\r\n<\/pre>\n<p>This will only extract an entity value when the current context has a checkMemberID context tag set or a trait with that name has been found.<\/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\"preConditions\": \r\n[ \u201cisCustomerX\u201d ]\r\n}\r\n<\/pre>\n<\/td>\n<td><strong>Entity type<\/strong>: LoV Entity with Premium as one of the choices. But the list is only appropriate for Customer X.<\/p>\n<p>A previous script node has set the \u201cisCustomerX\u201d context tag.<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>check my premium account<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> \u201cPremium\u201d<\/p>\n<p>A previous script node has not set the \u201cisCustomerX\u201d context tag.<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>check my premium account<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> \u201cnone\u201d<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{ \r\n\"preConditions\u201d : \r\n[ \u201c( buy )\u201d ]\r\n}\r\n<\/pre>\n<\/td>\n<td><strong>Entity type<\/strong>: Number Entity<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>buy 10 apples<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> \u201c10\u201d<\/p>\n<p><strong>User Utterance<\/strong> &#8220;<em>search for 10 apples<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> \u201cnone\u201d<\/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>discardAsCommand<\/strong><\/td>\n<td><strong>Concept Name:<\/strong> ~bot_commands_override_discard<\/p>\n<p><strong>Synonyms:<\/strong> abort, abort_all, cancel, clear_screen, discard, discard all, exit, exit_all, quit, quit_all, restart, start_over, startover, stop, stop_all<\/td>\n<td>If the rule is set to true, then the discard commands entered at a string entity node are not considered as valid string inputs, and the task gets discarded.<\/td>\n<\/tr>\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<tr>\n<td><strong>letters<\/strong><\/td>\n<td>number<br \/>\nOr<br \/>\nrange<\/td>\n<td>To extract a word of a specific length, or a sequence of individual characters that meet the length criteria.<br \/>\nThe rule value is either:<\/p>\n<ul>\n<li>A single number, <code>letters=3<\/code>, where the word(s) matched is composed of that many alphabetic (a-z) letters.<\/li>\n<li>A range, <code>letters=5-8<\/code>, indicates that 5, 6, 7, and 8 letters are valid.<\/li>\n<\/ul>\n<p>Words or sequences of letters having only alphabets are matched. The words containing punctuation or numbers are not considered. Also, the return value is converted to all caps.<\/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\"letters\": 2 \r\n}\r\n<\/pre>\n<\/td>\n<td><strong>Entity Pattern<\/strong> &#8211; <em>\u201cletters = 2&#8243;<\/em><\/p>\n<p><strong>User Utterance<\/strong> 234 XY<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>XY<\/em><\/p>\n<p><strong>User Utterance<\/strong> 234 x y<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>XY<\/em><\/p>\n<p><strong>User Utterance<\/strong> 234 alpha bravo<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>AB<\/em><br \/>\nThis value is extracted as part of a phonetic alphabet.<br \/>\n<strong>User Utterance<\/strong> 234 X Y Z<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>Nothing<\/em><br \/>\nNo alphabet matches with letters value defined.<\/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\"letters\": 5-8 \r\n}\r\n<\/pre>\n<\/td>\n<td><strong>Entity Pattern<\/strong> &#8211; <em>\u201cletters = 5-8&#8243;<\/em><\/p>\n<p><strong>User Utterance<\/strong> Kore.ai is the best platform in artificial intelligence of recent times.<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>platform, recent, times<\/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=\"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<tbody>\n<tr>\n<td><strong>digits<\/strong><\/td>\n<td>single number<br \/>\nOr<br \/>\na range of values<\/td>\n<td>To enforce a number of digits to match in a Number entity. This rule will not ignore leading zeros. The word(s) matched are composed of that many digits after NL processing. When a range is provided for the rule, it passes only if the utterance value matches within that valid range<\/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  \"digits\": \"3\"\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern<\/strong> &#8211; Numeric or string entries<\/p>\n<p><strong>User Utterance<\/strong> &#8220;CVV is <em>034<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>034&#8243;<\/em><br \/>\nThe value is a match as the digits = 3. If the value of the digits is 2, then it would be a no match in this example.<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n  \"digits\": \"13-17\"\r\n}<\/pre>\n<\/td>\n<td><strong>Entity Pattern<\/strong> &#8211; Numeric or string entries<\/p>\n<p><strong>User Utterance<\/strong> \u201cMy credit card number is 4012 8888 8888 1881&#8243;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>4012 8888 8888 1881&#8243;<\/em><br \/>\nIt is a match as the number of digits in the credit card number is 16, and within the range.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"height: 18px; width: 100%; border-collapse: collapse; background-color: #fffbea;\" border=\"1\">\n<tbody>\n<tr style=\"height: 18px;\">\n<td style=\"width: 100%; height: 18px;\"><strong>Note:<\/strong> The presence of the digits rule is an implicit <code>asString=true<\/code> and <code>integerOnly=true<\/code>, which means the entity value is always returned as a string even if the number is short and does not have a leading zero. Floating point\/decimal numbers and ordinals (For example, \u201cfirst\u201d, \u201ctwenty-third\u201d) are not matched.<\/p>\n<p>The rule does not split a word or number. For example, if the utterance is \u201ctwo thousand and twenty three\u201d and the rule is <code>\"digits\": 3<\/code>, then it is a no match. The utterance &#8220;twenty twenty three&#8221; would also be a no match. The rule should be <code>\"digits\": 4<\/code> for all the inputs to match.<\/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\": 3 \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<tr id=\"ignoreOnlyCode\">\n<td><strong>ignoreOnlyCode<\/strong><\/td>\n<td>&lt;true\/false&gt;<\/td>\n<td>If the value is true, the currency entity requires both the currency code\/symbol AND the amount. Otherwise, the entered value is unaccepted, resulting in an error message displayed to the user.<\/p>\n<p>If the value is false, the currency entity accepts the currency code or symbol even without the amount.<\/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  \"ignoreOnlyCode\": true  \r\n}<\/pre>\n<\/td>\n<td>In a scenario where the rule is set to true:<\/p>\n<p><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 AUD<\/em>&#8221;<br \/>\n<strong>VA Response<\/strong>: I apologize, I did not recognize the currency you entered. Please enter the currency you would like to use. An example of currency is $ 100.<\/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=\"Model_Number_for_Composite_entity_type\"><span id=\"composite_number_entity_type\" class=\"ez-toc-section\">Model Number for Composite entity type<\/span><\/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>modelNumber<\/strong><\/td>\n<td>&lt;true&gt;<br \/>\nor<br \/>\n&lt;a character&gt;<\/td>\n<td>To capture a model number that is composed of letters and numbers such as membership number, social security number, country of origin code, and other ticket numbers.<br \/>\nThe rule is especially useful to capture structured data on a voice channel where a custom regex pattern is not flexible or is too cumbersome to account for every variation.<br \/>\nFor example:<\/p>\n<ul>\n<li>\u201cMy id is six twenty seven dash forty four eighty nine<\/li>\n<li>\u201cMy seat is 20 3 sea\u201d<\/li>\n<li>\u201cThe account number is alpha bravo slash six two one oh seven\u201d<\/li>\n<li>\u201cI was in row 35 seat d\u201d<\/li>\n<\/ul>\n<p>Each part of the structured data is a subentity, and the composite entity patterns define the order of those elements. The modelNumber rule means that the value stored in context.entities will be a concatenated string of the matched subentities instead of a JSON object.<\/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  \"modelNumber\": true\r\n}\r\n<\/pre>\n<\/td>\n<td><strong>Entity Pattern\u00a0<\/strong>\u2013 @AccountNumbers @AccountSuffix<br \/>\n@AccountNumbers is a Number entity with \u201cdigits\u201d:8 entity rule.<br \/>\n@AccountSuffix is a String entity with \u201cletters\u201d:2 entity rule<strong>User Utterance <\/strong>&#8220;<em>\u201cAccount Number is 3 3 1 3 4 2 1 2 X Y&#8221;<\/em><br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>\u201c33 13 42 12 X Y\u201d<\/em><strong>User Utterance <\/strong>&#8220;<em>\u201cAccount Number is 33134212 &#8211; XY&#8221;<\/em>&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em>\u201c33134212XY\u201d<\/em>&#8220;<strong>User Utterance <\/strong>&#8220;<em>\u201cAccount Number is 33 13 42 12 alpha bravo&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em> \u201c33134212AB\u201d<\/em>&#8220;<\/em><strong>User Utterance <\/strong>&#8220;<em>\u201cAccount Number is thirty three thirteen forty two twelve a like apple b as in boy&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em> \u201c33134212AB\u201d<\/em>&#8221;<br \/>\n<strong>Composite Patterns<\/strong> \u2013 {row} @RowNumber {seat} @Seat<\/em>@RowNumber is a Number entity with \u201cdigits\u201d:2 and \u201crange\u201d: (\u201cfrom\u201d:1,\u201dto\u201d,35} entity rules.<\/p>\n<p>@Seat is a Custom concept entity using a concept ~seatletters ( A B C D E F )<\/p>\n<p><strong>User Utterance <\/strong>&#8220;<em>\u201cI am sitting in 33 A&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em> \u201c33A\u201d<\/em>&#8220;<\/em><\/p>\n<p><strong>User Utterance <\/strong>&#8220;<em>\u201c\u201cI am in row thirty three seat sea&#8221;<br \/>\n<strong>Extracted Value<\/strong> &#8220;<em> \u201c33C\u201d<\/em>&#8220;<\/em><\/td>\n<\/tr>\n<tr>\n<td><strong>composite number<\/strong><\/td>\n<td>&lt;single number&gt; or &lt;a range of values&gt;<\/td>\n<td>To extract a composite number using the Letters and Number entities. This rule will extract a number composed of subgroups with a specific number of digits and number of letters. For example:<\/p>\n<ul>\n<li>A provider ID could be 8 digits and 1 or 2 letters<\/li>\n<li>An SSN is 3 digits then 2 digits then 4 digits<\/li>\n<li>A Jira ticket is a project id plus a number.<\/li>\n<li>An airline seat is 1 or 2 digits and 1 letter (though not all 2 digits or all letters).<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"height: 18px; width: 100%; border-collapse: collapse; background-color: #fffbea;\" border=\"1\">\n<tbody>\n<tr style=\"height: 18px;\">\n<td style=\"width: 100%; height: 18px;\"><strong>Note:<\/strong> Note: A <code>modelNumber<\/code> composite entity is a voice-compatible replacement for a Custom regex entity.<br \/>\nA regex is a strict character-matching expression, the input must be an exact match that generally works on text-based channels though those expressions can become complicated when optional elements like punctuation are involved &#8211; users don\u2019t necessarily know if they have to provide them or not.<br \/>\nOn voice channels, an ASR can (mis)transcribe speech, for example \u201cC\u201d becomes \u201csea\u201d or \u201csee\u201d. A user could pause so \u201c23\u201d becomes \u201c20 3\u201d. The Number and String entity types, along with the digits and letters entity rules, can handle all of these variations.<br \/>\nThe example above of <code>( @AccountNumbers @AccountSuffix ) can replace a regex like \\d{8}\\-?[a-zA-Z]{2}<\/code><\/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;dd-mm-yyyy&#8221;<\/li>\n<li>&#8220;mm-dd-yyyy&#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 only applies 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 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>range<\/strong> with <strong>strict<\/strong><\/td>\n<td>{ \u201cfrom\u201d : &lt;from-date&gt;, \u201cto\u201d : &lt;to-date&gt;,<br \/>\n\u201cstrict\u201d: &lt;true\/false&gt; }<\/td>\n<td>If the value is <em>true<\/em>, the Date Period entity accepts values that are strictly in the defined date range.<br \/>\nIf the value is <em>false<\/em>, the Date Period entity accepts values that are in the range or overlapping with the range.<\/td>\n<td colspan=\"3\">Examples<\/td>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n\"range\": {\r\n   \"from\": \"2022-01-01\",\r\n   \"to\": \"2023-03-05\",\r\n   \"strict\" = \"true\"\r\n  }\r\n}<\/pre>\n<\/td>\n<td><strong>User Utterance<\/strong>: &#8220;2022-05-05 &#8211; 2022-06-05&#8221;<br \/>\n<strong>Expected Value<\/strong>: &#8220;Selected date range&#8221;<br \/>\n(The user utterance is within the defined date range. As strict is true, any value strictly in the defined date range is a valid input and is accepted.)<strong>User Utterance<\/strong>: &#8220;2021-05-05 &#8211; 2022-05-05&#8221;<br \/>\n<strong>Extracted Value<\/strong>: &#8220;I\u2019m sorry, I am unable to recognize the string. Please enter again.&#8221;<br \/>\n(The user utterance is not strictly in the defined date range, it\u2019s overlapping. As strict is true, any overlapping input is an invalid input and is rejected with an error.)<\/td>\n<td colspan=\"2\">JSON<\/p>\n<pre>{\r\n\"range\": {\r\n   \"from\": \"2022-01-01\",\r\n   \"to\": \"2023-03-05\",\r\n   \"strict\" = \"false\"\r\n  }\r\n}<\/pre>\n<\/td>\n<td><strong>User Utterance<\/strong>: &#8220;2021-05-05 &#8211; 2022-05-05&#8221;<br \/>\n<strong>Expected Value<\/strong>: &#8220;Selected date range&#8221;<br \/>\n(The user utterance is overlapping with the defined date range. As strict is false, any overlapping input is a valid input and is accepted.)<\/td>\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<td colspan=\"3\">Example<\/td>\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<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<td colspan=\"3\">Example<\/td>\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<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<td colspan=\"3\">Example<\/td>\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 only applies 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 only applies 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 : &#8220;now&#8221;,<br \/>\n}<br \/>\nor<br \/>\n{ \u201cto\u201d : &#8220;now&#8221;<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<tr>\n<td><b>timeOnly<\/b><\/td>\n<td><span style=\"font-weight: 400;\">true\/false<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Rule to include or exclude the character \u201cT\u201d and the offset value in the time.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Possible values are:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>True <\/b><span style=\"font-weight: 400;\">&#8211; Obtains only the time and excludes the character \u201cT\u201d and the offset value.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>False <\/b><span style=\"font-weight: 400;\">&#8211; Obtains the time along with character T and the offset value.<\/span><\/li>\n<\/ul>\n<p><b>Note<\/b><span style=\"font-weight: 400;\">: The timeOnly rule supports multilang excluding English, German, French and Spanish.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For example:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">User Input: 6 pm<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Result (with &#8220;timeOnly&#8221; rule): 18:00:00<\/b><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Result (without &#8220;timeOnly&#8221; rule): T18:00:00+5:50<\/span><\/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><span style=\"font-weight: 400;\">{<\/span>\r\n<span style=\"font-weight: 400;\">\u201ctimeOnly\u201d: \u201ctrue\u201d<\/span>\r\n<span style=\"font-weight: 400;\">}<\/span><\/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_Values_LoV_type_entity\"><span id=\"Zipcode_entity_type\" class=\"ez-toc-section\">List of Values (LoV) <\/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>ignoreLemmaWords<\/strong><\/td>\n<td width=\"25%\">true\/<br \/>\nfalse<\/td>\n<td width=\"50%\">If <code>ignoreLemmaWords<\/code> is true, lemmatization is not performed on the given user input in the LoV lookup entity to predict the output. If it is set to false, lemmatization is performed.<\/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\"ignoreLemmaWords\": false\r\n}\r\n\r\n{\r\n\"ignoreLemmaWords\": true\r\n}\r\n<\/pre>\n<\/td>\n<td><strong>Input Options<\/strong> &#8211; \u201cticket\u201d, \u201ctickets\u201d.&#8221;<\/p>\n<p><strong>User Utterance<\/strong> \u201cI need a ticket,\u201d \u201cI need tickets.\u201d<\/p>\n<p><strong>Extracted Value<\/strong> When <code><strong>ignoreLemmaWords<\/strong><\/code> is set to false, the LoV entity extracts \u201cticket\u201d for both the inputs &#8211; \u201cticket\u201d and \u201ctickets\u201d.<br \/>\nWhen it is set to true, the entity extracts \u201cticket\u201d only when the input contains \u201cticket\u201d. For a different input like \u201ctickets\u201d, the bot responds that it is not a valid option.<\/td>\n<\/tr>\n<tr>\n<td width=\"25%\"><strong>ignoreWords<\/strong><\/td>\n<td width=\"25%\"><\/td>\n<td width=\"50%\">The rule for the list of values (LOV) entity type to extend support to ignore words defined in the stop words or ignore words list.<br \/>\nThis rule helps to ignore words that are not part of every choice and if a particular word is either causing a specific match or an ambiguity. It assesses the common synonyms (common meaning present in more than one choice) and boost partial match score for same choice.<br \/>\n<strong>Syntax<\/strong><br \/>\n<code><br \/>\n{<br \/>\n\"ignoreWords\": [<br \/>\n\"\"<br \/>\n]<br \/>\n}<br \/>\n<\/code><br \/>\n<strong>Note<\/strong>: You can enter multiple synonyms as a comma-separated list of words to be ignored.<\/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\"~size\"\r\n]\r\n}\r\n<\/pre>\n<\/td>\n<td><strong>Input Options<\/strong> \u2013 \u201c~extra large size t-shirt\u201d, \u201c~large size t-shirt\u201d, \u201c~medium size t-shirt\u201d, \u201c~short size t-shirt\u201d. \u201c~child t-shirt, \u201c~ men t-shirt\u201d \u201c~women t-shirt\u201d<\/p>\n<p><strong>User Utterance<\/strong> \u2013 \u201cI need extra large size t-shirt\u201d, \u201cI need large size t-shirt.\u201d, \u201cI need medium size t-shirt\u201d \u201cI need t-shirt for men\u201d<\/p>\n<p><strong>Extracted Value<\/strong> \u2013 When <strong>ignoreWords<\/strong> is set to <em>size<\/em>, the LoV entity ignores the word \u201csize\u201d in the user input.<\/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=\"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 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 can be...","protected":false},"author":1,"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\/v10-1\/wp-json\/wp\/v2\/posts\/24846","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=24846"}],"version-history":[{"count":70,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/24846\/revisions"}],"predecessor-version":[{"id":60872,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/24846\/revisions\/60872"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=24846"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=24846"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=24846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}