# Classifications

Classification categories help organize products by applying consistent, reusable attribute structures across your catalog. These categories define classification mixins - standardized attribute schemas that are automatically applied to all products assigned to them.

Classification categories can create their own mixins and inherit mixins from parent classification categories. When a product is assigned to a classification category, it automatically receives all mixins from that category and its parent hierarchy, ensuring consistent, validated product data.

When creating a subcategory or assigning a parent category, both the parent and child categories must be of the same type - `STANDARD` or `CLASSIFICATION`. You cannot have a `CLASSIFICATION` category as a child of a `STANDARD` category, or the other way round.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-b81e6af5c7caafd895c11728f256651c93942dbf%2Fclassifications.png?alt=media" alt=""><figcaption></figcaption></figure>

You can switch to the classifications tree view to see the category hierarchy. You can sort and reorder classification categories using the arrows ↑↓ to move a category up or down. The position is recalculated based on the move. Reordering is possible only within the same level—for example, you can sort subcategories within the same parent, or reorder categories at the parent level.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-4a3801c62bc9295cbfea95667e87470f2477f0ae%2Fclassification_tree.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Reordering has no effect when two categories share the same position value. Use unique position values for each category at the same level so that sorting works correctly.
{% endhint %}

### Prerequisites

Before creating a classification category, ensure that you have:

* A **schema URL** for each classification mixin you want to define. The schema defines the structure and validation rules for the mixin attributes.
* A **code** for the classification category. This is mandatory and is used to construct unique mixin paths.

### Multiple classification mixins

You can define multiple classification mixins for a single classification category. This allows you to group related attributes together and apply them to products assigned to that category.

For example, an "Electronics" classification category might have:

* A `technicalSpecs` mixin for technical specifications
* A `warrantyInfo` mixin for warranty information

Both mixins would be automatically applied to products assigned to the Electronics category.

{% hint style="info" %}
For technical details about classifications, see the [Classification Tutorial](https://app.gitbook.com/s/d4POTWomuSS7d3dnh4Dg/api-guides/catalogs-and-categories/category-tree/classification) in the Emporix API Reference.
{% endhint %}

## Creating a classification category

{% stepper %}
{% step %}

#### Navigate to classifications

Go to **Catalogs** -> **Classifications** and choose **Add new classification**.
{% endstep %}

{% step %}

#### Add basic information

Fill in the **Name** and **Code** fields for your classification category.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-515f70964eb0e7dfcbe709e610913576aa2670ae%2Fclassification_start.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
The **Code** field is mandatory for classification categories because it's used to construct unique mixin paths.
{% endhint %}
{% endstep %}

{% step %}

#### Save the category

Choose **Save** to create the classification category. You need to save the category first before you can apply classification mixins to it.
{% endstep %}

{% step %}

#### Add classification mixins

Go to the **Classification** tab to add mixin schemas. You can either use the schema that is already created in the Management Dashboard, or upload a new one, not available in the system yet.

* Choose **Emporix mixin schema** if you want to use a schema that is already available in the tenant. If it's not created yet, you can add it in Management Dashboard under **Settings** → **Mixin Schemas**. It must be of the **Classification** type.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-58268fcaa7080593cf349fea2be33d8f7f2a69a1%2Fclassification_mixins.png?alt=media" alt=""><figcaption></figcaption></figure>

Once the schema has been created, choose the Emporix mixin schema and select it from the drop-down list.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-47a897ccd4833d59278bb0b58a3b7d7c867a9022%2Fclassification_emporix_mixins.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To learn how to create and manage mixin schemas in the Management Dashboard, see [Mixin Schemas](https://developer.emporix.io/ce/management-dashboard/settings/mixin-schemas).
{% endhint %}

* Choose **My own mixins schema** to create a custom schema by providing a schema URL. Use this option if the mixin schema you want to use for the classification category is not available in the Emporix system. Enter the schema details and add a URL with a valid schema JSON file.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-ae8430ce45eb99a5508916b527e08c5a61ba2b90%2Fclassification_own_mixin.png?alt=media" alt=""><figcaption></figcaption></figure>

If you want the mixin fields to be mandatory for products assigned to this classification category, set the **Required** toggle to active.
{% endstep %}

{% step %}

#### Optional: Choose a parent category and position

If the classification category you create should be a child category of a different one, you can define a path to the parent category in the **Path** tab.

The position indicates the order in which the classification category is displayed among its siblings in the classifications tree view. The position value is used when sorting categories - use unique values for each category at the same level so that reordering works correctly.

For example, you create a Corder Power Tools category, which is a child of the Power Tools one.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-5791fa9c6b40057647f1dcb282dc1bd7716b3c2d%2Fclassification_path.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Set the classification category validity

If needed, choose the validity period for the schema in the **Validity** tab. This allows you to define when the classification category should be active.

The **Published** box indicates whether the classification category is available for use. When published, the classification category is active and visible in the product view for products assigned to that category.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-c1b56a98f0050b3abd1e85515ede76c3a85ec4ee%2Fclassification_validity.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

**Result**: When the classification category is ready, it's visible in the **Classifications** view list. Products assigned to this category automatically inherit all classification mixins defined for it.

## Assigning products to classification categories

When you assign a product to a classification category, it inherits the relevant classification mixins:

* assigning a product to a **parent** classification category makes only the attributes defined at that parent level available
* assigning a product to a **child** classification category makes the attributes defined in the child classification category available, along with all attributes inherited from its parent categories of `CLASSIFICATION` type

By inheriting attributes from the entire category hierarchy, products maintain consistent data more easily across related categories.

The inherited mixin attributes are visible in a separate **Classification** tab within the product view.

### Required mixin validation

If a classification mixin is marked as **Required**, products assigned to that category must include values for all required fields defined in the mixin schema. The system validates this when products are created or updated, ensuring data completeness.

If a product is missing required fields, you get a validation error indicating which required properties are missing.

## Classification schema versions

Whenever you change a mixin schema for the classification category, the changes are displayed in the classification and you can review what is different. You can either keep the old classification version or apply the new one. The change is visible in product data only after the new version is applied.

{% stepper %}
{% step %}

#### Open the classification category

Choose the classification category you want to view and go to the **Classification** tab.
{% endstep %}

{% step %}

#### Review the schema changes

When the schema applied to the classification category has changed, you can view the details of the changed fields. A version number appears next to the classification category name, and you can switch between the old and new version to compare the changes. Changed fields are highlighted accordingly - blue for new, yellow for the changed ones.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-db1cb3646f66dfbc378b319bc491c48b0552e80d%2Fclassification_version.png?alt=media" alt=""><figcaption><p>Classification schema change</p></figcaption></figure>
{% endstep %}

{% step %}

#### Decide on the classification category version

Choose whether to keep the old (current) classification category version or switch to the new version with the changes.

* To keep the previous version with no changes applied, choose **Keep Old Version**.
* To apply the new version and have the changed fields applied, choose **Apply Version (number)**. The new or changed attributes are visible on the list.
  {% endstep %}

{% step %}

#### Save your changes

If you decided to apply the new version, choose **Save** to keep your changes. The changes are applied to products that use this classification only after you save.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-d3716be4bbfc3110f7c107c721d612856bd53a06%2Fclassification_version_save.png?alt=media" alt=""><figcaption><p>Classification schema save</p></figcaption></figure>

**Result**: The new or changed fields are automatically fetched and displayed in the product view.

* If you have the classification mixin schema **Saved** in the **Classification** tab in the product view, you can still view the changes and decide if you want to apply them or keep the old version.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-ed3d595545bf2ca7068f924a869e7d7488af47e3%2Fclassification_version_product_review.png?alt=media" alt=""><figcaption><p>Updated product view with new version to review</p></figcaption></figure>

* If the schema is not saved there, the Classification tab in the product view always takes the latest Classification category version automatically.

<figure><img src="https://3057647601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbTY7EwZtYYQYC6GOcdTj%2Fuploads%2Fgit-blob-c8f3aeaa61f438d21aae871adf21975bb9220a2e%2Fclassification_version_product.png?alt=media" alt=""><figcaption><p>Updated product view with automatically updated version</p></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}

* To learn more about Mixin Schemas, see [Mixin Schemas](https://developer.emporix.io/ce/management-dashboard/settings/mixin-schemas) in Management Dashboard guides.
* If you're looking for code tutorials, see [Classification Tutorial](https://app.gitbook.com/s/d4POTWomuSS7d3dnh4Dg/api-guides/catalogs-and-categories/category-tree/classification) in the Emporix API Reference.
* If you're looking for API reference? see [Category Service](https://app.gitbook.com/s/d4POTWomuSS7d3dnh4Dg/api-guides/catalogs-and-categories/category-tree) in the Emporix API Reference.
  {% endhint %}
