Category and subcategory creation in the Commerce app
Key Takeaway
To create a subcategory, create a new category and select an existing category as its parent category. After you create or change a category, rebuild the search index, because buyers don't see the change until you do.
Categories group the products in a B2B Commerce store into a parent-child hierarchy, so buyers can find products through navigation menus, search and filters. A subcategory is a category that has a parent category. You create both in the Commerce app for the selected store, under "Merchandising | Categories".
How categories are organized
A category is a logical grouping of products in a store's catalog. Categories form a tree of parents and children. The Category object represents both categories and subcategories. The category structure controls how buyers search for and navigate to products.
Each store connects to exactly one catalog. When you create a store, it gets a default catalog with one Products category. You build your own structure from there.
You can create up to 15,000 categories, with up to five levels of categories and subcategories. A hierarchy that needs a sixth level must be flattened.
A product can belong to more than one category. For example, buyers could find safety glasses under both Safety Equipment and Lab Supplies. You can assign one category as primary. The store uses the primary category to build the breadcrumb path on the Product Detail page.
Salesforce recommends mapping out the category structure before you create it. Salesforce also recommends keeping the structure as simple as possible without hurting product discoverability.