Skip to main content
Skip table of contents

Categories in the Catalog Feed

Categories are an optional data point in your catalog feed that allow you to create logical groupings of products.

A product's category determines which subdimensions to ask about, and therefore what data to collect. Including categories in your catalog feed also enables more granular targeting for Community Q&A article assignment, expert answering, and reporting.

Category structures

Emplifi Ratings & Reviews supports flat categories and category trees. In a flat structure, categories are not related to one another. If your current set of categories is a list, you have flat categories. In a category tree, categories are arranged into a nested hierarchy. Each category contains products or other categories. Each category or product has one parent category. You can also think of the hierarchy as creating a product breadcrumb or path.

If you have a flat category structure, enter your categories into the CATEGORY field. If you have a category tree, enter your categories into the CATEGORYPATHJSON field. Do not populate both fields in the same catalog.

Flat categories

For a flat category structure, you only need to include the name of the product's category in the CATEGORY field.

Category trees (category path JSON)

Having a category tree makes it easier to apply subdimensions at the right level of granularity. For example, given a subdimension for "Ease of Installation", it is possible to select some categories at two levels deep (such as Parts > Control & Brakes) and others at three levels deep (such as Parts > Suspension > Ball Joints).

image-20240327-105524.png

If you do not select a category, your subdimension applies to all categories.

Category path JSON formatting requirements

Category path JSON formatting requirements:

  • Must be a JSON array of objects, not a single JSON object.

    • Example: [{ "id": "17", "name": "Home" }, { "id": "18", "name": "Wall Decor" }, { "id": "20", "name": "Framed Art" }]

  • For each item in the array, id and name are required and url is optional.

  • All fields must be formatted as strings.

  • A product can only belong to one category.

  • Each ID must be unique to a given category path. For more on this, see the Category path JSON examples.

  • If you have a double quote inside a JSON value, the double quote must be both JavaScript-escaped (using backslash) and CSV-escaped (using double quotes).

    • Example: If the name of your category is Category Name "One", it should look like this: "name":"Category Name \""One\"""

You should also meet the following requirements:

  • Do not use product SKUs as category IDs.

  • Do not use spaces in IDs.

  • Do not use name as id. IDs must be unique.

Category path JSON examples

The following scenarios identify how the category path JSON translates to a category tree. These scenarios use two-level or three-level category trees for simplicity. Emplifi Ratings & Reviews supports category trees of all sizes.

For readability, JSON examples in this section have line breaks, white space formatting, and omit the optional url field. In your catalog feed file, each product item should be on a single line, including content for the category path JSON field.

Scenario 1: Different top-level categories

Consider two category breadcrumbs: Women > Tall > Jeans and Men > Tall > Jeans. Because the top-level categories are different, the two "Tall" categories are different and must have distinct IDs, one for clothing for tall women, and one for clothing for tall men. The same reasoning applies to the two "Jeans" categories, which must also have distinct IDs.

image-20240327-111013.png

For a product in the Women > Tall > Jeans category, the category path JSON might look like this:

JSON
[{
    "id": "10",
    "name": "Women"
}, {
    "id": "12",
    "name": "Tall"
}, {
    "id": "17",
    "name": "Jeans"
}]

For a product in the Men > Tall > Jeans category in the same catalog, the category path JSON might look like this:

JSON
[{
    "id": "3",
    "name": "Men"
}, {
    "id": "24",
    "name": "Tall"
}, {
    "id": "65",
    "name": "Jeans"
}]

Scenario 2: Same top-level category

Each product in this set has the same top-level category, but different second-level categories. Therefore, all second-level and third-level categories must have unique ID values.

image-20240327-111849.png

For a product in the Women > Maternity > Jeans category, the category path JSON might look like this:

CODE
[{
    "id": "cat55",
    "name": "Women"
}, {
    "id": "cat76",
    "name": "Maternity"
}, {
    "id": "cat90",
    "name": "Jeans"
}]

For a product in the Women > Plus > Jeans category in the same catalog, the category path JSON might look like this:

CODE
[{
    "id": "cat55",
    "name": "Women"
}, {
    "id": "cat79",
    "name": "Plus"
}, {
    "id": "cat95",
    "name": "Jeans"
}]

For a product in the Women > Misses > Jeans category in the same catalog, the category path JSON might look like this:

CODE
[{
    "id": "cat55",
    "name": "Women"
}, {
    "id": "cat80",
    "name": "Misses"
}, {
    "id": "cat99",
    "name": "Jeans"
}]

Scenario 3: Same top-level and second-level categories

Each product in this set has the same top-level category and second-level category. So the first two category levels must have matching ID values, and the third-level categories must have unique ID values.

image-20240327-112041.png

For a product in the Home > Wall Decor > Mirrors category, the category path JSON might look like this:

CODE
[{
    "id": "17",
    "name": "Home"
}, {
    "id": "18",
    "name": "Wall Decor"
}, {
    "id": "19",
    "name": "Mirrors"
}]

For a product in the Home > Wall Decor > Framed Art category in the same catalog, the category path JSON might look like this:

CODE
[{
    "id": "17",
    "name": "Home"
}, {
    "id": "18",
    "name": "Wall Decor"
}, {
    "id": "20",
    "name": "Framed Art"
}]

For a product in the Home > Wall Decor > Clocks category in the same catalog, the category path JSON might look like this:

CODE
[{
    "id": "17",
    "name": "Home"
}, {
    "id": "18",
    "name": "Wall Decor"
}, {
    "id": "21",
    "name": "Clocks"
}]
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.