Create and Manage Rules
To build a rule, the first step is to use the rule editor to define the conditions in the shopper’s query text that trigger the associated events. Then, complete the rule details, test the results, and publish the rule.
Create a rule
- In the left rail, go to Merchandising > Merchandising Rules.
- Click Create rule to launch the rule editor.
In the Build your rule section, you define specific search criteria, conditions, and ranking types.
-
In the Name field, enter a name for the rule. All rule names must be unique.
-
In the Description field, enter a description for the rule.
-
In the Date range field, specify the date or range of dates you want the rule to be active.
-
In the Rule applies to section, you have two options: All product listings or Specific conditions.
- All product listings - This is essentially your default rule and is applied to all search queries, unless a more specific search query is defined. You can only create one default rule and it cannot contain any conditions. Choose the Intelligent ranking type and any manual rankings you want applied to all default searches.
- Specific conditions - See the next section to learn about the types of conditions you can set for your rule.
Conditions
Conditions are the requirements to trigger an event. A rule can have up to ten conditions and 25 events. A default rule cannot have any conditions.
Single condition
-
Under Build your rule, select the Condition to be met, and follow the instructions to complete the statement.
- Search query contains - Enter the string of text that must be in the shopper’s query. The Match setting determines the degree to which the shopper’s query matches the catalog. Options:
Any - Any part of the shopper’s query text can match the condition.
All - All of the shopper’s query must match the condition. - Search query is - Enter a string of text that exactly matches the shopper’s query. For example: “yoga pants”. Rules with
Search query is
and MatchAll
can have only one condition. - Search query starts with - Enter a character or string of text that must be at the beginning of the shopper’s query.
- Search query ends with - Enter a character or string of text that must be at the end of the shopper’s query.
The results appear immediately in the Test your rule pane and are numbered by priority. You can use the Results per row slider in the upper right to change the number of products in each row.
- Search query contains - Enter the string of text that must be in the shopper’s query. The Match setting determines the degree to which the shopper’s query matches the catalog. Options:
-
To test other queries, change the query text in the Test your rule search box and press Return.
Initially, the test pane renders the query from the Conditions search box. But now it is rendering the query from the test query box. The test pane renders only one query at a time. -
If you like the result, update the text in the Conditions search box. Then, click anywhere on the page to update the results in the test pane.
Multiple conditions
-
To build a rule with multiple conditions, click Add condition.
A rule can have up to ten conditions. The logical operator that joins two conditions is based on the current Match setting. By default, Match isAll
and the logical operator isAND
. -
Select the second condition and enter the required query text.
-
To change the logic of the rule, change the Match setting to determine how closely the shopper’s search criteria must match the query condition. Set Match to one of the following:
- Any - (Default) All logical operators in the rule are set to
OR
and the results appear in the test pane. - All - All logical operators in the rule are set to
AND
and the results appear in the test pane.
The Match value determines the logical operator that is used to join multiple conditions. Changing the Match setting changes all logical operators in the rule. It is not possible to combine
AND
andOR
in the same rule.In this example, rather than searching for “yoga pants”, there are two separate queries that search for “yoga” or “pants”. This rule is less specific and is triggered more often in the storefront than the other.
- Any - (Default) All logical operators in the rule are set to
-
To add another condition, click Add condition and repeat the process.
Intelligent ranking
Intelligent ranking combines user behaviors and site statistics to determine product ranking.
Store owners can set up the following types of ranking strategies:
- Most purchased: This ranks products by total purchases per SKU in the previous 7 days.
- Most added to cart - Ranks in order of total “Add to Cart” activities in the previous 7 days.
- Most viewed: Ranks the total views per SKU in the previous 7 days.
- Recommended for you - Uses the
viewed-viewed
data point - Shoppers who viewed this SKU also looked at these other SKUs. - Trending: Looks back at page view events over the past 72 hours for background events and 24 hours for foreground events.
- None: Products are ordered by Relevance.
Select the type of strategy for the rule. The Test your rule window displays the expected results.
Caveats
- Apostrophes and quotes in queries may lead to some minor issues with ranking and relevance in some languages.
- To ensure the intelligent ranking works correctly, make sure that the Search Weight for any attributes that are used for search or filtering (facets) is
5
or less.
For information about setting search weights, see the .
Manual Ranking
Manual ranking are actions that modify the search results when defined conditions are met. A single rule can have up to 25 events.
- Boost - Moves a product higher in the search results.
- Bury - Moves a SKU lower in the search results.
- Pin a product - Product is displayed in the selected “Position” on the page.
- Hide a product - Excludes a SKU from the search results.
The easiest way to pin a product is by drag and drop.
- Click and drag a product in the Test pane. Drag and drop it at the desired position. The Product and Postion fields are automatically populated in the Events pane.
You may also click the pin icon to pin a product to its current location. Use the ellipsis context menu to “Pin to top” or “Pin to bottom”.
Or events can be set manually:
-
Under Events, choose the Event to take place when the associated conditions are met.
For example, choose
Hide a product
. Then, enter the name of the product that you want to hide. Products are suggested as you type. -
For multiple events, choose any other events that you want to trigger when conditions are met.
Finalizing the rule
-
Examine the results of the rule in the test pane.
-
If the rule has multiple queries, test each one that might be affected by the rule.
-
When complete, click Save and publish.
The rule is added to the list in the Rules workspace.
-
Although active rules go into effect immediately, you might have to wait up to 15 minutes for the cached query results in the storefront to be refreshed.
Edit, view, and delete rules
Follow these instructions to update the properties of existing rules.
Edit rule
- On the Merchandising rules workspace, find the rule in the grid that you want to edit and click More (…) options.
- Click Edit to access the rule editor.
- Update the conditions, operators, and events as needed.
- Update the name, start and end date, and description fields as needed. All rule names must be unique.
- Test the rule.
- Publish the changes.
The rule is added to the list in the Rules workspace. Although active rules go into effect immediately, it might take up to 15 minutes for cached query results in the storefront to be refreshed.
View details
This option provides a quick way to see all the rule parameters, while staying on the Rules table.
- On the Merchandising rules worksapce, find the rule in the grid that you want to edit and click More (…) options.
- Click View details to view the rule parameters.
- Choose Edit or Delete, or click the X to close the panel.
Delete rule
- On the Rules workspace, find the rule in the grid that you want to edit and click More (…) options.
- Click Delete.
Field descriptions
Conditions (if)
Logical operators
OR
compares two conditions and meets the requirements to trigger an event if at least one condition is true.AND
compares two conditions and meets the requirements to trigger an event if both conditions are true.Match operators
OR
and returns the set of matching products.AND
and returns the set of matching products.