Defining Business Rules
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, or a combination of multiple contexts. Rules define the promoting, positioning or filtering of a set of results.
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.
More About Business Rules
SearchAssist Platform lets you define two aspects of Business Rules:
- Conditions define when the event is triggered, based on the context and parameter values.
- Context can be:
- Search context is based on the user search history and has predefined attributes such as Recent Searches, Current Search, Traits, Entities, Keywords, Semantic meanings identified
- Page context 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
- User Context can be based on user information that a website can pass through SDK
- Parameters include setting the preceding context to contain/not contain/equals/not equals to a given keyword
- Context can be:
- Outcome – Using Outcome, define what happens when the condition mentioned in the condition matches.
- Action can be one of the following:
- Boost a particular response set – This is used to promote the results to display at the top
- Lower a particular response set – This is used to demote the results from displaying at the top
- Hide a particular response set – This is used to hide certain results from showing to the search user
- Filter a particular response set – This is used to filter certain search results by default to show to the search user.
- Response 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
- Action can be one of the following:
The following are some scenarios where a business user can apply business rules:
- 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:
CONDITION: “Search Context: RecentSearches” Contains “Credit” OR “Card”
AND “User Context: CustomerType” Contains “Premium”
OUTCOME: “Boost Results” Containing “Title: Card Offers” OR “Title: Card Rewards” - 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:
CONDITION: “Search Context: RecentSearches” Contains “Loan” OR “Credit”
AND “User Context.CustomerInfo.CreditWorthy” Contains “Poor”
OUTCOME: “Hide Results” Containing “Loans: Loan” OR “Loans: Credit” - 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:
CONDITION: “User Context.AccountType” Contains “Savings”
AND “User Context: AccountType” Doesn’t Contain “Checking”
AND “Page Context: PageName” Contains “Account” OR “Banking”
AND “Search Context: CurrentSearch” Contains “Information” OR “Details”
OUTCOME: “Filter Results” Containing “Title: Savings”
Applying Business Rules
To add a business rule, take the following steps:
- Click the Indices tab on the top.
- On the left pane, under the Search Configuration section, click Business Rules.
- On the Business Rules page, click +Add Rule on the upper-right.
- On the Add Rule dialog box, enter a name in the Rule Name field.
- Under the Conditions section,
- Select a context from the Select Context dropdown list:
- Search Context 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.
- Page Context assigns data specifically to a page. For example, context-based on the current page, recent page, browser, device, etc.
- User Context assigns data specifically to a search user. For example, context based on the User Type (Premium User, Normal User, User Profile, Age)
- Configure the parameters as follows:
- Select the parameters available for the corresponding context from the Set Parameters dropdown lists
- Set the Data Type expected for the parameter
- Set the condition to Contains/Does not Contain/Equals to/Not Equals to
- Set the keyword to be compared with, add multiple keywords by hitting enter after each entry
- To add more conditions, click +Add Condition.
- Select a context from the Select Context dropdown list:
- Under the Outcome section
- Select an action from the Action dropdown:
- Boost the results by x times (max 5x times)
- Lower the results by x times (max 5x times)
- Hide the results based on the preceding conditions
- Filter filters the results based on the preceding conditions
- Select the parameters from the Response dropdown:
- Field to be considered for the response
- Data Type for the field, auto-populated by the Search Assistant
- Set the condition to Contains/Does not Contain/Equals to/Not Equals to as applicable
- Static keyword or a dynamic keyword based on the context values
- Set the keyword to be compared with, add multiple keywords by hitting enter after each entry
- To add more outcomes, click +Add Outcome
- Select an action from the Action dropdown:
- Click Add.
Once added, you can perform the following actions on the rules:
-
- Search for a given business rule by name
- Edit or Delete a business rule using the edit/delete icons. You can also delete business rules in bulk with the Bulk Select option
- Using the handlebar against each business rule, you can specify the order in which the business rules can be applied