Categories are hierarchical tree structures that allow you to organize items, variants, and bundles into groups based on similar attributes. This document covers the process of importing multiple categories using a CSV file. You can also add categories individually.

CSV File Guidelines

You can import categories using CSV files only, fabric doesn’t support any other data or file formats. Here are the key points to consider:

  • The headers, represented in the first row of the CSV file, should match the attributes of the category.
  • While category titles aren’t case-sensitive, maintaining case consistency with the original category titles is recommended.
  • Empty rows and columns are ignored.
  • fabric recommends that you download the template file to use as a guide when creating your own CSV file for import to minimize errors during the import process.

Category Data Formatting

When preparing your CSV file for import, ensure that the category data format aligns with the column requirements. Different columns have specific data input requirements:

HeaderDescription
ActionAccepts one of the following commands:
  • Create: Adds a new category.
  • Update: Replaces the details of an existing category.
  • Upsert: Creates a new category or replaces the details of an existing category. If no action is specified for a row, upsert is the default action.
  • Delete: Removes an existing category.
If the field is blank, the default value is Create.
Node IDRepresents the Category ID.
  • When creating a category, this field must be left blank; otherwise, an error will occur.
  • When updating, upserting, or deleting a category, enter the Node ID or Node Name.
Parent CategorySpecifies the parent category for the new category you want to create or update unless you are creating a primary or root category.
Node NameSpecifies the name of the root, branch, or leaf categories being created or updated.
OrderSpecifies the order in which a category should appear among sibling categories. If multiple categories share the same order, the newly added ones appear in alphabetical order.
Product AttributesSpecifies the attributes of products associated with a category. You must assign relevant product attributes to categories. For more information on assigning product attributes in Copilot, see the Adding Product Attributes section.
Category AttributesSpecifies the attributes of a category. You must assign relevant category attributes to categories. For more information on assigning category attributes in Copilot, see the Adding Category Attributes section.

Example

Category import supports up to two category levels. For example, if you have the category Dog > Food > Wet Food, the third level, Wet Food, won’t be imported. You must manually add categories through Copilot starting from the third level. For more information on adding categories using Copilot, see the Adding a Category page.

ActionNode IDParent CategoryNode NameOrderProduct AttributesCategory Attributes
CreateDog1salmon; beef; chickenwet food
CreateDogFood1salmon; beef; chickenwet food
CreateCat1salmon; beef; chickenwet food
CreateCatFood1salmon; beef; chickenwet food

Prerequisites

Ensure that you have access to Product Catalog in Copilot. For more information, see the Product Catalog Role-Based Access Control page.

Procedure

Importing a CSV file will overwrite existing data. To preserve your data, use your previously imported CSV file, add the new categories to it, and rename the file. For more information on downloading the import file, see the Viewing Import History section.
  1. In the left menu, click Product Catalog > Categories.
    The Categories page is displayed.
  2. Click Import.
    The Import CSV file window is displayed. This window provides a link to download an example template for the CSV file.
  3. Download the sample template by clicking template here.
  4. To import a CSV file, do one of the following:
    • Drag and drop the CSV file into the window.
    • Click Select a File from your computer.
  5. Click Import file.

The CSV file is imported and the changes you indicated to your categories are made.