---
schema_version: "1"
id: aa7610b9c93370772e787c01589cb01bb2dcd1873d290dd351515675ad513acb
title: Categorization Rule Sets for B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_dynamic_categories.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_dynamic_categories.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f6b10b1dc77f0a7ce1887371b48af12d0e02e4e5772a808a1b60f738a5e4d06f
description: Categorization rule sets automatically assign products to specific categories. To create a rule set, use attributes, operators, and values to define the conditions a product has to meet to be included in a particular category.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Categorization Rule Sets for B2C Commerce

Categorization rule sets automatically assign products to specific categories. To create a rule set, use attributes, operators, and values to define the conditions a product has to meet to be included in a particular category.

## Operators

Use operators as filter criteria to precisely assign products to categories.

  
| Operator | Description | Example |
| --- | --- | --- |
| Equals | The field value must match the specified value exactly. This selects only products that have the exact color "Red." | Product Color equals "Red" |
| Not Equals | The field value must not match the specified value. This selects products that don't have the color "Red." | Product Color not equals "Red" |
| Contains | The field value must include the specified value (anywhere in the field). This selects products whose name contains the word "Phone". For example, Smartphone, Mobile Phone. | Product Name contains "Phone" |
| Starts With | The field value must start with the specified value. This selects products whose name starts with "Smart". For example, Smartphone, Smart Watch. | Product Name starts with "Smart" |
| Is Defined | The field must have a value. For example, it’s not empty or null. This selects products that have a description filled in. | Product Description defined |
| Is Not Defined | The field must not have a value. For example, it’s empty or null. This selects products that don't have a description filled in. | Product Description isn't defined |
| Is One Of | The field value must match one of the specified values. This selects products where the color is either "Red," "Blue," or "Green." | Product Color is one of "Red", "Blue", "Green" |
| Not One Of | The field value must not match any of the specified values. This selects products where the color is neither "Red," "Blue," nor "Green." | Product Color isn't one of "Red", "Blue", "Green" |

## Rule Sets

A rule set is a collection of categorization criteria that products must meet to be assigned to a category. These rules use standard attributes, which are predefined characteristics that you can apply across products. Not all standard attributes are available as options to create rule sets and define conditions for categorizing products. Run rule sets to either narrow or broaden the range of products assigned to a category.

You configure rule set logic with the AND and OR operators. All conditions within a given rule set use AND by default. And all rule sets for a given category use OR by default. A rule set can have a maximum of five conditions, which use AND. A category can have a maximum of five rule sets that use OR.

For example, you want to add all Brand-XYZ products with the word Retro in their product name to a Clearance category. And you want to add all Brand-XYZ products available online until 1/1/2019 to the same Clearance category. You need two rule sets to create this category.

Rule Set 1   
| Attribute | Operator | Value |
| --- | --- | --- |
| Brand | Equals | XYZ |
| Product Name | Contains | Retro |

OR

Rule Set 2   
| Attribute | Operator | Value |
| --- | --- | --- |
| Online to | Less than | 1/1/2019 |

After you create and verify a rule set, run the rule set manually or have it run as a bulk job. For information on how to create a bulk job, see [Creating Jobs](https://documentation.b2c.commercecloud.salesforce.com/DOC1/topic/com.demandware.dochelp/content/b2c_commerce/topics/jobs/b2c_creating_jobs.html?cp=0_5_14_5). To run the rule set as a bulk job, select Run in the Categorization Rules tab.

New products that fit the criteria aren’t automatically assigned. Run the job again to update the category. Rule-based categorization is intended for users on non-production instances and has a processing limit of 100,000 products per category.

A product can be assigned only one primary category and one classification category. In cases where multiple categorization rules are applicable with either checkboxes checked, the last categorization job executed determines the primary category and classification. Salesforce recommends that you run two `ExecuteCategorizationRules` jobs sequentially. The first job determines the category assignment, while the second job controls which category is set as primary or classification.

#### See Also

- [Assign Products to Categories (Video)](https://salesforce.vidyard.com/watch/1ZEcPZ5TPA7JRaUJzWDgdU)