---
title: Auto-Assign Parent Categories on Import
description: How to use the Auto-assign parent categories option to automatically expand category paths during product import in Shopware 6.
---

When importing products with category paths, you no longer need to manually include each parent category in the `categories_all_paths` field. With the **Auto-assign parent categories** option enabled, the system automatically expands each category path to include all its parent categories.

## Without the Feature

You must explicitly list every level:

```
categories_all_paths: "Home|Home/ATCart1|Home/ATCart1/ATCart2"
```

## With Auto-Assign Enabled

Simply provide the deepest path:

```
categories_all_paths: "Home/ATCart1/ATCart2"
```

The system will automatically assign the product to all relevant categories: **Home**, **ATCart1**, and **ATCart2**.

> ☝ **Tip:** You can include multiple paths, separated by a vertical bar (|). For example:
> `"Home/ATCart1/ATCart2|Store/Electronics/Phones"`
> will assign the product to all parent categories in both hierarchies.

## Technical Overview

- **Config option:** `auto_assign_parent_categories`
- **Backend logic:** `CategoriesProvider::expandCategoriesWithParents()`
- **UI control:** Toggle switch in the import profile wizard

This feature saves time, reduces errors, and ensures consistent category assignment during bulk imports.
