{"id":1711,"date":"2022-01-07T01:42:20","date_gmt":"2022-01-07T01:42:20","guid":{"rendered":"https:\/\/multisite.korebots.com\/SearchAssist\/?p=1711"},"modified":"2022-02-24T09:56:40","modified_gmt":"2022-02-24T09:56:40","slug":"how-to-define-and-apply-business-rules","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/SearchAssist\/concepts\/personalizing-results\/how-to-define-and-apply-business-rules\/","title":{"rendered":"Configuring Business Rules"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row via_grid cols_1 laptops-cols_inherit tablets-cols_inherit mobiles-cols_1 valign_top type_default stacking_default\"><div class=\"wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3><span class=\"ez-toc-section\" id=\"Defining_Business_Rules\"><\/span><span id=\"Defining_Business_Rules\" class=\"ez-toc-section\">Defining Business Rules\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Business Rules allow you to define rules to personalize and fine-tune the search results based on various contexts.<\/p>\n<p>Rules for example can also be used in merchandising scenarios to launch promotions and offers to include quantity discounts or time-bound festive offers. Rules are set based on user context, search context, page context, or a combination of multiple contexts. Rules define the promoting, positioning or filtering of a set of results.<\/p>\n<p>For example, in an eCommerce site, based on the geographical location availability of certain products or their variants can be hidden, or if the user is logged in from a mobile device the number of search results displayed needs to be reduced due to limited screen space.<\/p>\n<h4>More About Business Rules<\/h4>\n<p>SearchAssist Platform lets you define two aspects of Business Rules:<\/p>\n<ol>\n<li aria-level=\"1\"><b>Conditions<\/b>\u00a0define when the event is triggered, based on the context and parameter values.\n<ul>\n<li aria-level=\"2\"><b>Context<\/b>\u00a0can be:\n<ul>\n<li aria-level=\"3\"><i>Search context<\/i> is based on the user search history and has predefined attributes such as Recent Searches, Current Search, Traits, Entities, Keywords, Semantic meanings\u00a0identified<\/li>\n<li aria-level=\"3\"><i>Page context<\/i> can be based on predefined attributes such as Device, Browser, Current page, Recent pages, and Location and other required attributes of a page can be passed from the website through the SDK<\/li>\n<li aria-level=\"3\"><i>User Context<\/i> can be based on user information that a website can pass through SDK<\/li>\n<\/ul>\n<\/li>\n<li aria-level=\"2\"><b>Parameters<\/b> include setting the preceding context to contain\/not contain\/equals\/not equals to a given keyword<\/li>\n<\/ul>\n<\/li>\n<li aria-level=\"1\"><b>Outcome<\/b>\u00a0\u2013 Using Outcome,\u00a0 define what happens when the condition mentioned in the condition matches.\n<ul>\n<li aria-level=\"2\"><b>Action<\/b>\u00a0can be one of the following:\n<ul>\n<li aria-level=\"3\"><i>Boost<\/i>\u00a0a particular response set \u2013 This is used to promote the results to display at the top<\/li>\n<li aria-level=\"3\"><i>Lower<\/i>\u00a0a particular response set \u2013 This is used to demote the results from displaying at the top<\/li>\n<li aria-level=\"3\"><i>Hide<\/i>\u00a0a particular response set \u2013 This is used to hide certain results from showing to the search user<\/li>\n<li aria-level=\"3\"><i>Filter<\/i>\u00a0a particular response set \u2013 This is used to filter certain search results by default to show to the search user.<\/li>\n<\/ul>\n<\/li>\n<li aria-level=\"2\"><b>Response<\/b> on which the preceding actions need to be applied can be specified by a field value containing\/being equal to a static keyword or a dynamic keyword taken from the context<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>The following are some scenarios where a business user can apply business rules:<\/p>\n<ol>\n<li aria-level=\"1\">Say, in a banking scenario, you want to present to your premium customers some credit card related offers, then you can define a rule as follows:<br \/>\nCONDITION: \u201cSearch Context: RecentSearches\u201d Contains \u201cCredit\u201d OR \u201cCard\u201d<br \/>\nAND \u201cUser Context: CustomerType\u201d Contains \u201cPremium\u201d<br \/>\nOUTCOME: \u201cBoost Results\u201d Containing \u201cTitle: Card Offers\u201d OR \u201cTitle: Card Rewards\u201d<\/li>\n<li>If the user is proven to be not creditworthy, then you do not want to show them any loan offers, then you can define a business rule as follows:<br \/>\nCONDITION: \u201cSearch Context: RecentSearches\u201d Contains \u201cLoan\u201d OR \u201cCredit\u201d<br \/>\nAND \u201cUser Context.CustomerInfo.CreditWorthy\u201d Contains \u201cPoor\u201d<br \/>\nOUTCOME: \u201cHide Results\u201d Containing \u201cLoans: Loan\u201d OR \u201cLoans: Credit\u201d<\/li>\n<li>If the user has only a savings account and is searching for account-related information, you do not want to show them information related to other types of accounts like checking accounts. In such a scenario, define a business rule as follows:<br \/>\nCONDITION: \u201cUser Context.AccountType\u201d Contains \u201cSavings\u201d<br \/>\nAND \u201cUser Context: AccountType\u201d Doesn\u2019t Contain \u201cChecking\u201d<br \/>\nAND \u201cPage Context: PageName\u201d Contains \u201cAccount\u201d OR \u201cBanking\u201d<br \/>\nAND \u201cSearch Context: CurrentSearch\u201d Contains \u201cInformation\u201d OR \u201cDetails\u201d<br \/>\nOUTCOME: \u201cFilter Results\u201d Containing \u201cTitle: Savings\u201d<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Applying_Business_Rules\"><\/span>Applying Business Rules<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">To add a business rule, take the following steps:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Click the <\/span><b>Indices <\/b><span style=\"font-weight: 400;\">tab on the top.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">On the left pane, under the <\/span><b>Search Configuration<\/b><span style=\"font-weight: 400;\"> section, click <\/span><b>Business Rules<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">On the Business Rules page, click <strong>+<\/strong><\/span><b>Add Rule<\/b><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"> on the upper-right.<\/span><\/span><\/span><a ref=\"magnificPopup\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/Manage_indices_Personalize-Results_add-biz-rules1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3336 size-large\" src=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/Manage_indices_Personalize-Results_add-biz-rules1-1-1024x155.png\" alt=\"\" width=\"640\" height=\"97\" srcset=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/Manage_indices_Personalize-Results_add-biz-rules1-1-1024x155.png 1024w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/Manage_indices_Personalize-Results_add-biz-rules1-1-300x45.png 300w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/Manage_indices_Personalize-Results_add-biz-rules1-1.png 1896w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">On the Add Rule dialog box, enter a name in the<\/span><b> Rule Name<\/b><span style=\"font-weight: 400;\"> field.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Under the <\/span><b>Conditions <\/b><span style=\"font-weight: 400;\">section,<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Select a context from the <\/span><b>Select Context<\/b><span style=\"font-weight: 400;\"> dropdown list:<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><em>Search Context<\/em> used to optimize search results based on the context provided by the user. For example, context-based on a recent search, current search, traits, etc.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Page Context\u00a0 assigns data specifically to a page. For example, context-based on the current page, recent page, browser, device, etc.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><em>User Context<\/em>\u00a0 assigns data specifically to a search user. For example, context based on the User Type (Premium User, Normal User, User Profile, Age)<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Configure the <\/span><b>parameters<\/b><span style=\"font-weight: 400;\"> as follows:<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Select the parameters available for the corresponding context from the <\/span><b>Set Parameters <\/b><span style=\"font-weight: 400;\">dropdown lists<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Set the <\/span><b>Data Type<\/b><span style=\"font-weight: 400;\"> expected for the parameter<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Set the condition to <\/span><i><span style=\"font-weight: 400;\">Contains\/Does not Contain\/Equals to\/Not Equals to<\/span><\/i><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Set the keyword to be compared with, add multiple keywords by hitting enter after each entry<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">To add more conditions, click <\/span><b>+Add Condition<\/b><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">.<\/span><\/span><\/span><a ref=\"magnificPopup\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/MI_PR_BizrulesAdd2-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-3337 size-large\" src=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/MI_PR_BizrulesAdd2-1-1024x580.png\" alt=\"\" width=\"640\" height=\"363\" srcset=\"https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/MI_PR_BizrulesAdd2-1-1024x580.png 1024w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/MI_PR_BizrulesAdd2-1-300x170.png 300w, https:\/\/multisite.korebots.com\/SearchAssist\/wp-content\/uploads\/sites\/18\/2022\/01\/MI_PR_BizrulesAdd2-1.png 1513w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Under the <\/span><b>Outcome <\/b><span style=\"font-weight: 400;\">section<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Select an action from the <\/span><b>Action <\/b><span style=\"font-weight: 400;\">dropdown:<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><em>Boost <\/em>the results by x times (max 5x times)<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><em>Lower <\/em>the results by x times (<\/span><span style=\"font-weight: 400;\">max<\/span><span style=\"font-weight: 400;\"> 5x times)<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><em>Hide<\/em> the results <\/span><span style=\"font-weight: 400;\">based<\/span><span style=\"font-weight: 400;\"> on the preceding conditions<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><em>Filter <\/em>filters the results based on the preceding conditions<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Select the parameters from the <\/span><b>Response <\/b><span style=\"font-weight: 400;\">dropdown:<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Field to be considered for the response<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Data Type for the field, auto-populated by the Search Assistant<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Set the condition to <\/span><i><span style=\"font-weight: 400;\">Contains\/Does not Contain\/Equals to\/Not Equals to <\/span><\/i><span style=\"font-weight: 400;\">as applicable<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Static keyword or a dynamic keyword based on the context values<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Set the keyword to be compared with, add multiple keywords by hitting enter after each entry<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">To add more outcomes, click <\/span><b>+Add Outcome<\/b><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400;\">Click <\/span><b>Add<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Once added, you can perform the following actions on the rules:<\/span><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Search for a given business rule by name<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Edit or Delete a business rule using the edit\/delete icons. You can also delete business rules in bulk with the Bulk Select option<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Using the handlebar against each business rule, you can specify the order in which the business rules can be\u00a0 applied<\/span><\/span>&nbsp;<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<\/div><\/div><\/div><\/div><\/div><\/div><\/section><section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row via_grid cols_1 laptops-cols_inherit tablets-cols_inherit mobiles-cols_1 valign_top type_default stacking_default\"><div class=\"wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"w-post-elm post_navigation layout_simple inv_false\"><a class=\"post_navigation-item order_first to_prev\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/concepts\/personalizing-results\/how-to-customize-results-ranking\/\" title=\"Tuning Results Ranking\"><div class=\"post_navigation-item-arrow\"><\/div><div class=\"post_navigation-item-meta\">Previous Post<\/div><div class=\"post_navigation-item-title\"><span>Tuning Results Ranking<\/span><\/div><\/a><a class=\"post_navigation-item order_second to_next\" href=\"https:\/\/multisite.korebots.com\/SearchAssist\/concepts\/content-sources\/manage-sources\/\" title=\"Overview\"><div class=\"post_navigation-item-arrow\"><\/div><div class=\"post_navigation-item-meta\">Next Post<\/div><div class=\"post_navigation-item-title\"><span>Overview<\/span><\/div><\/a><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"Defining Business Rules\u00a0 Business Rules allow you to define rules to personalize and fine-tune the search results based on various contexts. Rules for example can also be used in merchandising scenarios to launch promotions and offers to include quantity discounts or time-bound festive offers. Rules are set based on user context, search context, page context,...","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/1711"}],"collection":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/comments?post=1711"}],"version-history":[{"count":25,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/1711\/revisions"}],"predecessor-version":[{"id":3640,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/posts\/1711\/revisions\/3640"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/media?parent=1711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/categories?post=1711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/SearchAssist\/wp-json\/wp\/v2\/tags?post=1711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}