Map category paths

This guide explains how to map your category hierarchy structure using the category_paths system attribute.

What is category_paths

The category_paths is a product-level system attribute that stores your product categorization data for use across Bloomreach products.

This attribute supports both hierarchical categories (with multiple levels, such as Home > Furniture > Chairs) and flat categories (single-level).

Category paths help Data hub understand your product's categorization regardless of how your source data stores that information.

When to use category_paths

Use the category_paths attribute to:

  • Map hierarchical category structures with multiple levels.
  • Handle products that belong to multiple category paths (multiple breadcrumbs).
  • Combine the separate category ID and name fields into a unified structure.
  • Work with delimited category data in flat file formats.

How to map category_paths

After adding the category_paths attribute, you can choose from four mapping options: Compound fields, Record field, JSON path, or Custom expression.

Compound fields

The compound fields option helps you build and structure your category data from the source fields. Select how your source data organizes category information:

  • One field: Use when both category IDs and names are stored together in a single field structure.

  • Multiple fields: Use when category IDs and names are stored in separate fields that need to be combined into category levels.

One field

Configure the following settings under the Category IDs path and Category names path tabs.

  • Field name: Enter the field name containing category IDs. Example: collections or categories.

  • Categories delimiter: Specify the symbol that separates category levels. Example: Enter > if your data looks like "electronics>computers>laptops". Keep this empty if you only have one category per path.

  • Paths delimiter: Specify the symbol that separates multiple category paths. Keep this empty if you only have one path per field.

Multiple fields

Configure the following under the Category IDs path and Category names path tabs.

  • Enter the field name containing category IDs for the first level.

  • Click Add field to add additional category levels if you have hierarchical data.

Record field

Map directly to a field name in your source records.

JSON path

Enter the JSON path expression to access your category data using JMESPath syntax.

Custom expression

Write Python-like code to build the category_paths structure programmatically. Read the custom expressions documentation for detailed syntax and examples.

After configuring the mapping, click Save changes.