Rule-based sales categories

You can create and use rule-based sales categories in a sales catalog to help you create sales categories quickly and more efficiently. Rule-based sales categories are a type of sales category that uses a search-based, user-defined rule with HCL Commerce search to find and automatically assign catalog entries to the category. By using rule-based sales categories, such as for large categories or frequently changing categories, you can reduce the time that is needed to assign or update the catalog entries for the category.

You can have an administrator configure rule-based sales categories so the rules are automatically reapplied after a specific time interval elapses since the last time the rule was reapplied. This configuration ensures that the categories always remain up-to-date and include the catalog entries that best match the rule for each category.

You can create and use rule-based sales categories for almost the same purposes that you use regular sales categories. For instance, in addition to displaying the categories in your storefront, you can also use the categories in promotions, marketing activities, and Commerce Composer widgets. You cannot use rule-based sales categories as parent categories or create versions of the categories.

When you use regular sales categories in a sales catalog, you must manually search for each catalog entry to assign to the category or remove from the category. With rule-based sales categories, however, you define search filter conditions that identify the catalog entries to assign to the rule-based sales category. You can base these search filters on catalog entry properties, attribute dictionary attributes that are for use in merchandising, and the parent sales and master categories for catalog entries.

You can still manually search for and assign specific catalog entries to the rule-based sales category similar to how you can assign catalog entries to sales categories. When you save and apply the rule, the catalog entries that match your search conditions and the catalog entries that you manually specified are assigned to the rule-based sales category. To find the catalog entries that match your search conditions, HCL Commerce search uses the search filters to retrieve the matching catalog entries.

For example, you can create a rule-based sales category, "Clearance sale on dresses", which includes any dress that is marked for clearance." When you create a rule for the category, you can include the following search filter conditions to find catalog entries. Each search condition is used to find catalog entries that match the conditions:
  • The catalog entry property "Manufacturer Name" matches one of the following values: "Gusso" or "Alibini".
  • The master category that includes the catalog entry matches one of the following values: "Dresses".
  • The catalog entry is assigned the attribute "Clearance" with a value that matches one of the following values: "Clearance".
Screen capture of search conditions.

Along with defining the search filter conditions for the category, you can define sort criteria to arrange how the catalog entries are sequenced in the category. The sort criteria applies to only the catalog entries that match the search filter conditions. The specific catalog entries that are directly assigned to the category must be sequenced manually.

By basing a search filter on the attribute, you can manage catalog entry assignments for the category simply by managing which catalog entries are assigned the attribute and then reapplying the rule. When you reapply the rule, the catalog entry assignments for the category updates. The current products that are assigned to the category are all removed. HCL Commerce search then finds the current products that are assigned the Clearance attribute, and the Catalogs tool automatically assigns the products to the category. Any product that is no longer assigned the attribute, no longer displays in the category.

HCL Commerce EnterpriseIf your site uses an extended sites store model, you can create rule-based sales categories in your extended site store and inherit rule-based sales categories from your catalog asset store. You can create or place an extended site store rule-based sales category in both an extended site store or inherited asset store sales category. If your extended site store includes an inherited rule-based sales category, you can view the category within the extended site store, but you cannot edit the category or reapply the rule.

HCL Commerce Version 9.0.1.11 or later

Rule-based sales categories and product variants

Rule-based sales categories support a search filter named the “Catalog entry type.” You can use this to help filter out category members with specific catalog entry types. For example, the following “Winter” rule-based sales category defines two search filters: finding all catalog entries with manufacturer name as “Hermitage Collection,” and catalog entry types defined as “Variant:”

This category also lets you assign specific variants before or after the search filter result.

Rule-based sales categories in workspaces

If workspaces are enabled, you can create, manage, preview, and delete, rule-based sales categories in a workspace. When you are working with or approving changes for a rule-based sales category in a workspace, ensure that you review the behavior for these categories in a workspace:
  • You can apply or reapply the rule for a category while you are working in a workspace.
  • When the rule for a rule-based sales category is modified and applied in a workspace, you can view only the category in the change history for the workspace. The changes to the catalog entry assignments for the category do not display in the change history.
  • When you undo changes for a rule-based sales category, you undo all changes that are made to the category in the workspace.
  • When you approve the changes for a rule-based sales category, the rule for the category is identified as needing to be evaluated. Any configured time interval for reapplying the rule is ignored. The next time a rule evaluation and application process runs, such as when the search index is being updated, the rule is reapplied to the category.
  • You cannot use quick publish to publish a rule-based sales category and the catalog entry assignments for the category to production.
  • When the process to evaluate and apply the rule for rule-based sales categories runs, the job does not evaluate the rule for categories in a workspace. When you create or update catalog entries that match the rule for a category, the process to automatically reapply the rule to the category does not assign those catalog entries. To include those catalog entries, you must manually reapply the rule or wait until the task group that includes the catalog entries is approved. When the task group is approved, the job to reapply the rules runs automatically and then assigns new or changed catalog entries to the category.

Considerations and limitations

Before you begin creating rule-based sales categories, ensure that you review the following considerations and limitations:
  • Do not create rule-based sales categories or reapply the rule for the categories in your production environment. Applying the rule to a category in your production environment can affect performance. If you want to update a category that is in your production environment with catalog entries that exist in only your production environment, request that an administrator copy the data into your authoring or staging environment. Then, run the rule in your authoring or staging environment and then have the administrator propagate the updated category to the production environment.
  • You cannot use a rule-based sales category in a search filter condition for another rule-based sales category. If you use a sales category that includes both a rule-based sales category and a regular sales category as child categories, only the catalog entries from the child sales category can be included by the rule that you are defining.
  • You cannot create or place a rule-based sales category as a parent category. Rule-based sales categories can exist in a sales catalog hierarchy only as child categories.
  • You cannot manually assign catalog entries to a rule-based sales category by adding the catalog entries to the Catalog Entries List for the category. You can manually assign catalog entries to a rules-based sales category within the Add specific catalog entries to this category section of the properties view Rule tab for the category.
  • You must use attribute dictionary attributes that are for use in merchandising when you select to use an attribute in a search filter condition.
  • You must index catalog entries with HCL Commerce search before the catalog entries can be found and assigned to any rule-based sales category.
  • You cannot create, update, or delete rule-based sales categories with any loading utilities, such as Catalog Upload.
  • You cannot use content versioning with rule-based sales categories.
  • You cannot link a rule-based sales category to another sales category.
  • When workspaces are enabled, you cannot use quick publish to publish a rule-based sales category and the catalog entry assignments for the category to production. Request that an administrator publish your rule-based sales category data with the stagingprop utility and update the search index with the indexprop utility.
  • You cannot include multiple categories in rule-based sales categories. This is due to the filter combining the categories using AND logic, which is more restrictive than OR logic. As an alternative, ask your site administrator to enable deep search sequencing, which is used to enhance the storefront by using Category-based browsing flows that customers can use to browse products.

Enabling rule-based sales categories

By default, you can create, change, and delete rule-based sales categories and you can define the rule for a category, but you cannot apply the rule. To apply the rule that finds and assigns catalog entries to a rule-based sales category, an administrator must enable the evaluation and application of the rule.

After enabling the application of rules, an administrator 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. By having an administrator enable this behavior, you do not need to manually reapply the rule in the Catalogs tool to keep a rule-based category up-to-date.

For more information, see Enabling rule-based sales categories.