---
title: Assigning taxes to products automatically
related:
  - https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/products.md
  - https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-taxes.md
  - https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/products/categorizing-products/departments.md
  - https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-product-page-types.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

When you [import or add products](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-products/importing-products.md), you may want to automatically assign [taxes](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-taxes.md) to the [products](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/products.md). With Xperience, you are able to do this using [departments](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/products/categorizing-products/departments.md).

Departments are a tool for logical [categorizing of products](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/products/categorizing-products.md). If you do not display departments on the live site, you will see departments only in the administration interface where the departments serve as a logical separator for products. You can set a default tax class for each department, which is then automatically assigned to every new product belonging to the given department.

> **Tip:** You cannot set taxes automatically for already existing products. If you do not know the logical division of the products, but they use the same tax, you can create just one department with a default tax class and add all products to this department. You can change the department of products later at any time.

## Creating departments with a default tax class

You can manage your departments in the **Store configuration** application or in the **Multistore configuration** application if you want to create [global](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/choosing-site-or-global-e-commerce-configuration.md) departments.

1. Open the **Store configuration** application (or the **Multistore application** for global departments) and switch to the **Departments** tab.

   > **Tip:** If you are not sure what to choose, see [Choosing site or global e-commerce configuration](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/choosing-site-or-global-e-commerce-configuration.md). If you are not sure about specifics of configuring in these applications, see [Configuring e-commerce settings for a specific site or globally](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/choosing-site-or-global-e-commerce-configuration/configuring-e-commerce-settings-for-a-specific-site-or-globally.md).
2. To create a department, click **New department**.
3. Type the name of the department in the **Display name** field and click **Save**.
   - The system creates a new department.
4. Select a **Default tax class** for the department.
5. Click **Save**.

   ![Selecting the default tax class for a department](https://docs.kentico.com/docsassets/13/assigning-taxes-to-products-automatically/department_tax_class.png "Selecting the default tax class for a department")

The department now uses the selected default tax class for new products. If you create a new product in the **Products** application and assign the created department to the product before you save the product for the first time, the system automatically assigns the given default tax class to the product.

> **Info:** To create a product, you need to [create a product page type](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-product-page-types.md), which is one of the later [configuration steps](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores.md).

> **Tip:** When [creating product page types](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-product-page-types.md), you can also have the department pre-filled while creating a product.

See more detailed information about departments in [Departments](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/products/categorizing-products/departments.md).
