Category navigation rules

You can use navigation rules to sort products in a category via a specific criterion such as price.

Using navigation rules, you can drive sales by setting a display order for products in a category. For instance, you can sort products globally by using criteria such as price (that is, define a sort order for all categories). Alternatively, you might opt to bring a particular set of products to the top of the navigation page. You can also change the product display sequence based on an explicit customer segment; for instance, you might choose to preferentially promote a particular set of coffee makers to VIP customers.

Use and limitations

Since they use the same user interface as search rules, category navigation rules might appear to work the same way. In fact, navigation rules can be used only with the following targets.
  • 'Current Page' target with the "Customer is viewing a category" behavior only.
  • 'Customer Segment' target with explicit customer segments only. Implicit customer segments are not supported.
In addition, the only action you can use with navigation rules is the 'Change Search Result Order' action. No other targets and actions are supported, nor are branches or experiments.

Creating a navigation rule for all categories

To create a navigation rule that applies to all categories, build a search rule that targets the _nav_ keyword.

For example,
Screen shot showing Navigation rule form

Creating a navigation rule for one category

You can configure a navigation rule for a specific category by building a search rule that targets the _nav_ keyword. This keyword uses the ‘Current Page’ target to restrict the navigation rule to a specific category.


Screen shot showing how to build a rule for the current page

If you do not have ‘Current Page’ target in the Search Rule Builder, you must add it. The target is used to configure the navigation rule to a specific category viewed by the shopper.
  1. Edit the file SearchActivityBuilder.xml. You can find the file in the following location:
    • LOBTools/WebContent/WEB INF/src/xml/commerce/marketing/propertiesViews/SearchActivityBuilder.xml
  2. Within SearchActivityBuilder.xml, add the element <Element objectType="currentPage"/> to the following group.
    <Group helpLink="concepts/csbsearchtargets.htm" helpText="help_palette_targets" 
    name="targets" resourceBundle="mktMarketingResources">
  3. Update the behaviorxml definition of the ‘Current Page’ target to include AjaxCatalogSearchView by running the following SQL query.
    update dmeletemplate set behaviorxml='<BehaviorRule command="AjaxCatalogSearchView,CategoryDisplay,SearchDisplay" action="">
    <Variable name="categoryId" value="MARKETING_categoryIdList" type="MARKETING_type"/></BehaviorRule>' 
    where name='currentCustomerBehaviorCategoryBrowsing';
    Note: Ensure that rules for individual categories have higher priority than any rules that apply to all categories. This will make sure that the action of the category-specific rule takes precedence over the action of the general rule.
  4. Restart the HCL Commerce server and Search server.

Disabling the category navigation rules feature

Navigation rules are enabled by default, and in normal operation you do not need to disable them. If you do need to disable this feature, you can do so using the following procedure.

Category navigation rules are triggered by search rules that use the _nav_ keyword. The value of this keyword is defined by the NavigationTrigger property. You can set the value of this property in the following wc-component.xml files.
  • workspace-dir/Search/xml/config/com.ibm.commerce.catalog-ext/wc-component.xml
To disable category navigation rules, edit the com.ibm.commerce.catalog-ext/wc-component.xml file . Add the following code under the <_config:configgrouping name="SearchConfiguration"> section.
<_config:property name="NavigationTrigger" value=""/>
If the property does not exist, create it. If it does exist, make sure you set the property's value parameter to an empty string, "".