Rule-based sales category overview

Rule-based sales categories use a search-based, business user-defined rule with WebSphere Commerce search to find, and automatically assign catalog entries to the category. By enabling support for applying the rule, we can reduce the time needed for business users to assign or update the catalog entries for a category. For instance, in addition to displaying the categories in the storefront, business users can use the categories in promotions, marketing activities, and Commerce Composer widgets. Business users can also view, approve, work on, and undo changes for the categories in workspaces. Users cannot use rule-based sales categories as parent categories or create versions of the categories.

Applying or reapplying the rule to a rule-based sales category involves the following process:

1 When an event triggers the process to evaluate and potentially apply the rule, a call is made to the RuleBasedCategoryHelper utility class to begin the process. This class provides helpers to call the commands for evaluating which rules need to be applied or reapplied, for retrieving the catalog entries to assign to each category, and for assigning the catalog entries to the categories. The following events can trigger the call to the RuleBasedCategoryHelper class to begin the process:

When the call for evaluating the rule is for all categories flagged in the database as needing the rule evaluation, the process runs to evaluate rules that have one of the following values in the CATGRPRULE.EVALUATING database column:

After the rule is evaluated, and if needed reapplied, the time interval resets and the column value is reset to "0". 2 Depending on how the rule evaluation and application process is triggered, the RuleBasedCategoryHelper class can call either of the following commands:

The RuleBasedCategoryEvaluationCmdImpl command calls the following operations to evaluate whether a rule needs to be applied to a category, and if necessary to apply the rule.

8 When the rule application process completes for all categories that were being evaluated, a call is made to WebSphere Commerce search to rebuild the index for the updated categories.


Enable rule-based sales categories

By default, business users can create, change, and rule-based sales categories and define the rule for a category, but not apply the rule. To apply the rule to a rule-based sales category, we must enable the application of the rule. After enabling the application of rules, we can configure the rule evaluation process to automatically reapply the rule for each category after a specific amount of time elapses from the last time that the rule was reapplied. See Enable rule-based sales categories.


Considerations and limitations

Before you enable support for applying rule-based sales category rules, ensure that you review and are aware of the following considerations and limitations:


Related concepts
Rule-based sales categories


Related tasks
Defining the rule for assigning catalog entries to a rule-based sales category
Reapplying the rule to assign catalog entries to a rule-based sales category
Collecting MustGather data for search Rules Based Sales Categories issues