Skip to main content
Join Trailblazers for Dreamforce 2024 in San Francisco or on Salesforce+ from September 17-19. Register now

Create Categories

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain the value of a good category design strategy.
  • Explain how categories work in Salesforce B2C Commerce.
  • Describe how dynamic categorization works.
  • Describe the two types of category attributes.

Organize Your Products

Brandon Wilson, Cloud Kicks merchandiser, created his catalogs and is ready to take the next step—creating categories in Business Manager. Categories and subcategories let him organize and group products in his catalog and on his storefront. The Cloud Kicks storefront, for example, uses these categories.

New Releases

Footwear

Sportswear

Sports Equipment

Sales

The root category is the most important category. There is only one. In this example, the root category is cloud-kicks-usa, which does not appear on the storefront. Subcategories can appear as tabs across a page, in a navigation panel, or for mobile devices, in expandable tabs. While Brandon can create as many subcategory levels as he wants, he keeps it simple to avoid shopper confusion.

He can create categories that are part of his catalog but are not part of his storefront navigation. For example, he creates an Accessories subcategory that has a link in the Sportswear category, but is not part of his storefront menu navigation.

Before You Get Started

Before Brandon starts creating his categories, he develops a category design strategy that makes sense for his shoppers. He wants to make it easy for them to quickly find the products and services they want. A well-designed category strategy also helps him manage his products in Business Manager.

Here’s what Brandon’s category structure looks like.

New Releases

Footwear

Sportswear

Sports Equipment

Sales

New Season

Mens

Mens

Soccer

Past Season

New Looks

Womens

Womens

Basketball

Last Call


Kids

Kids

Football



Luxury

Accessories

Ice Hockey



Custom


Field Hockey





Tennis


He wants to configure additional subcategories. Here’s an example with the Footwear/Kids category.

Kids

Basketball Shoes

Cleats

Running Shoes

Ice Skates

Tennis Shoes

You can assign products to more than one category within and across catalogs. For example, ice skates are assigned to these subcategories.

  • Footwear/Kids/Ice Skates
  • Sports Equipment/Ice Hockey

Depending on seasonal timing, ice skates are also assigned to these subcategories.

  • New Releases/New Season
  • Sales/Last Call

Create a Category

Categories provide more than a hierarchical product data structure. Category attribute settings help you control how categories appear on a storefront. You can also configure how categories operate via scheduling, linking, search refinements, and results sorting.

Here’s how to create a category for a storefront catalog.

  1. Open Business Manager.
  2. Select site > Merchant Tools > Site > Products and Catalogs > Catalogs.
  3. Select a catalog: cloud-kicks-usa
  4. Click New.
  5. Create the root category (this does not appear in the storefront).
    • Enter the category ID: cloud-kicks-category
    • Enter the name: Cloud Kicks
    • Click Apply.
  6. Create a category.
    • Return to the Cloud Kicks category (click the breadcrumb).
    • Click the Cloud Kicks link.
    • Click New.
    • Enter a category ID: sports-equipment
    • Enter a name: Sports Equipment
    • Select Online.
    • Click Apply.
      In Business Manager, create a new category.
  7. Create another subcategory.
    • Return to the Sports Equipment category (click the breadcrumb).
    • Click the Sports Equipment link.
    • Click New.
    • Enter a unique category ID: ice-hockey
    • Enter a category name: Ice Hockey
    • Select Online.
  8. Click Apply.
Note

To show a category in the storefront menu navigation, assign available products to the subcategory, and select Show in Menu Navigation on the Category Attributes tab.

Configure Categories

You can configure category schedules, manage category search refinement definitions, and set category sorting rules.

Change Display Order

It’s easy to change the display order of catalogs on the storefront. For example, Brandon wants to switch the main categories to look like this.

New Releases

Footwear

Sports Equipment

Sportswear

Sales

Here’s how you change category order in the storefront.

  1. On the Catalogs page, select a catalog ID: cloud-kicks-usa
  2. Check the box beside the Sports Equipment category.
  3. Click the up arrow to move the category up one position.
    Sort categories in Business Manager for storefront display.

Dynamic Categorization

Brandon doesn’t have to do all the heavy lifting of assigning each product to the respective categories and subcategories. He can use B2C Commerce dynamic categorization rules to automate product category assignment. In Business Manager, he creates a rule set that defines the category assignment criteria. B2C Commerce dynamically assigns products to the category that fits that criteria.

Rule Sets

A rule set contains the product to category assignment logic. Rule sets can dynamically narrow or broaden the range of products assigned to a category, via AND and OR operators. 

Here are the rule set rules.

  • All conditions within a rule-set use AND by default.
  • All rule sets for a category use OR by default.
  • A rule set can have a maximum of five conditions that use AND.
  • A category can have a maximum of five rule sets that all use OR.

Brandon wants to add all Sparkle Shoe products with the word “fairy” in their product name to the Last Call category. He also wants to add all Sparkle Shoe products available online until 1/1/2023 to the same Last Call category. That means he needs two rule sets to create his dynamic category.

Attribute

Operator

Value

Brand

Equals

Sparkle Shoe

Product name

Contains

fairy

OR



Online from

Less than

1/1/2023

After Brandon creates and verifies a rule set, he can run the rule set manually or run it as a bulk job. To run it as a bulk job, select Include Rule Set in Bulk Job Run in the Categorization Rules > Settings section. For information on bulk jobs, see Creating Jobs

Create a Dynamic Rule Set

Here’s how to create a dynamic rule set.

  1. Select Merchant Tools > Products and Catalogs > Catalogs.
  2. Select a catalog: cloud-kicks-usa
  3. Select the category: Cloud Kicks/New Releases
  4. Click Edit.
  5. Click the Categorization Rules tab.
  6. Click New.
  7. Leave the default locale.
  8. Select a category type: Classification or Primary
    The classification category defines the attributes of the product in the product catalog, while the primary category defines the breadcrumbs on the product details page.
    Create a categorization rule set in Business Manager.
  9. Click Add Rule.
  10. Select an attribute, operator, and value for the first condition.
    • Attribute: Brand
    • Operator: equals
    • Value: RunFast
  11. Click Add Condition and Add Rule to add rules and conditions.
    Conditions use the AND operator and are processed first. Rules use the OR operator and are processed next.
    Configure a categorization rule in Business Manager.
    • Attribute: Color
    • Operator: equals
    • Value: green
  12. Click Save.
    B2C Commerce automatically assigns green Runfast brand products to the Cloud Kicks/New Releases category.
  13. To preview the rule set, click Preview.
  14. To manually run the rule set, click Run. If the rule set is configured to run as a bulk job, review the results after the bulk job runs.

B2C Commerce does not automatically assign green Runfast brand products to the Cloud Kicks/New Releases category. Brandon must run these rules after importing new products. Dynamic categorization works on staging and sandbox instances, but not on production. That’s because when category data is replicated to production, it overwrites what’s already there.

Manage Category Attributes

Category attributes let you define how categories look on the storefront. They come in two flavors: default attributes and custom attributes. You can use or modify the default category attributes, which include settings for SEO, sitemap, presentation, search ranking, and customer attribute options. Here’s how to configure default attributes.

  1. Select Merchant Tools > Products and Catalogs > Catalogs.
  2. Select the catalog: cloud-kicks-usa
  3. Select the category: Cloud Kicks/Sportswear/Kids
  4. Click Edit.
  5. Click the Category Attributes tab.
  6. Enter details for the following:
    • Search engine optimization
    • Sitemap attributes
    • Presentation attributes
    • Search ranking
    • Custom
      Manage category attributes in Business Manager.
  7. Click Apply.

You can customize category attribute options by setting, adding to, or deleting attributes from the category system object in Business Manager. For example, Brandon wants to provide shoppers with a size chart that appears with products in the Sportswear category. 

Here’s how he does it.

  1. Add a size chart attribute to the catalog system object in Business Manager.
    • Select Administration > Site Development > System Object Types.
    • Select the Catalog object.
    • Click the Attribute Definitions tab.
    • Add the sizeChart (Size Chart) attribute.
  2. Assign the attribute to the Sports Apparel category.
    • Select Merchant Tools > Products and Catalogs > Catalogs.
    • Select the catalog: cloud-kicks-usa
    • Click Edit beside the Sportswear category.
    • Click the Category Attributes tab. You should see the attribute in the Custom section.

Next Steps

In the unit, you learned how to design a category strategy and how categories and dynamic categorization work in B2C Commerce. You also learned about category attributes and how to customize them to meet your business requirements. Next, learn how to configure products and assign them to categories.

Resources