Creating the rule-based sales category evaluation scheduled job
You can create the EvaluateRuleBasedCategories job command to reapply the rules for rule-based sales categories on a configured time interval. The evaluation time interval for each category begins from the last time that the rule was applied to that category. When the scheduled job runs, the existing catalog entry assignments for the category are replaced with the catalog entries that currently best match the rule.
After the UpdateSearchIndex job or di-buildindex utility runs successfully, an event listener triggers a call to the EvaluateRuleBasedCategories job to evaluate all rule-based sales categories. This event listener call ensures that rule-based sales categories include the latest search index contents.
If you do want to create and run a scheduled job to call the
EvaluateRuleBasedCategories job to evaluate the rule for all rule-based sales
categories, do not configure the job to run on a scheduled interval. If you want to evaluate the
rule for categories without waiting for the UpdateSearchIndex job to complete, run the job directly.
If you want to run the job because the rules are not evaluated and applied often enough, consider
decreasing the schedule interval of the UpdateSearchIndex job and configuring a shorter time
interval to automatically evaluate the rules instead. For more information about configuring the
evaluationTimeInterval
property in the wc-admin-component.xml
file, see Enabling rule-based sales categories.
Before you begin
- Deploy the WebSphere Commerce search server.
- Build or
rebuild the search index.
For WebSphere Commerce search to find catalog entries to assign to a rule-based sales category, the catalog entries must be indexed.
- Schedule the UpdateSearchIndex job to routinely
update the catalog search index.
If you plan to run the scheduled job to reapply the rule for categories frequently, schedule the UpdateSearchIndex job to run more frequently.
Procedure
Results
evaluationTimeInterval
configuration property.