Category navigation rules

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

Use navigation rules, we can drive sales by setting a display order for products in a category. For instance, we can sort products globally by using criteria such as price (that is, define a sort order for all categories). Alternatively, we might opt to bring a particular set of products to the top of the navigation page. We can also change the product display sequence based on an explicit customer segment; for instance, we 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.

In addition, the only action we 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,


Creating a navigation rule for one category

We 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.

If you do not have ‘Current Page’ target in the Search Rule Builder, 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. We 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 WebSphere Commerce server and Search server.


Disable 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, we 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. We can set the value of this property in the following wc-component.xml files.

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.

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, "".