Guide to Filling Out the category_template.xlsx File
The category_template.xlsx file is used to define the hierarchical structure of product categories for a catalog. Each row represents a category, which can be either a leaf node (final category) or an intermediate node.
File Structure
The file contains the following columns:
| Column | Description |
|---|---|
| id | Optional, but subject to an important rule (see below). It's a unique numeric identifier for each category. If not available, it can be omitted, but you cannot mix rows with and without id in the same file. |
| cat_1 | Level 1 of the hierarchy (e.g., "Electronics") |
| cat_2 | Level 2 (e.g., "Smartphones") |
| cat_3 | Level 3 (e.g., "Accessories") |
| cat_4 | Level 4 (if applicable) |
| cat_5 | Level 5 (if applicable) |
| cat_6 | Level 6 (if applicable) |
Rules for the id Field
The id field is not mandatory.
However, the file must be internally consistent:
-
Either all rows have the
idfield filled in, -
Or none of the rows include the
id.
Files that mix rows with and without id are not allowed.
General Completion Rules
-
Each row represents a single category with its full path.
-
Levels must be filled in order, starting from
cat_1. If a levelcat_nis present, all previous levels (cat_1, ...,cat_{n-1}) must also be filled. -
The values in
cat_1tocat_6should represent the category name at that level. -
Duplicate path combinations (same set of levels) must be avoided.
Correct Example
| id | cat_1 | cat_2 | cat_3 | cat_4 | cat_5 | cat_6 |
|---|---|---|---|---|---|---|
| 16 | Audio & Video | |||||
| 20108 | Audio & Video | Audio Accessories | ||||
| 20067 | Audio & Video | Audio Accessories | iPod Accessories | |||
| 30001 | Home | Kitchen | Pots |
Or, without using the id field:
| id | cat_1 | cat_2 | cat_3 | cat_4 | cat_5 | cat_6 |
|---|---|---|---|---|---|---|
| Audio & Video | ||||||
| Audio & Video | Audio Accessories | |||||
| Audio & Video | Audio Accessories | iPod Accessories | ||||
| Home | Kitchen | Pots |
Common Mistakes to Avoid
-
Leaving
cat_1empty: all paths must start fromcat_1. -
Skipping levels (e.g., filling in
cat_1andcat_3but leavingcat_2blank). -
Using inconsistent formats or non-standardized category names.
-
Mixing rows with and without
id.
Suggestions
If you have an internal category coding system, it is advisable to fill in the id field to ensure stable references over time.
Otherwise, you can safely omit it, provided the entire file is free of id.