Mixin Schemas
Create schemas for custom mixin properties.
The Mixin Schemas section allows extending entities in Management Dashboard, for example a product, with customized fields of different types.

Creating a mixin schema
There are two ways to define a new schema in Management Dashboard:
defining a schema manually
uploading a JSON file
Defining a schema manually
Choose the entity
Select an entity or multiple entities that you want to customize from the dropdown menu and enter the name for the schema. You can also provide a key value for your new schema, which then works as its unique identifier. If you don't provide the key value on your own, it's generated automatically.

The localized name you define for the schema later appears as a separate tab in the modified entity.
Define mixin fields
Go to Fields tab and choose + icon to add a mixin field.
Type: Select a field type relevant to its purpose.
Key: Define a name of the field.
Name: Provide the name to display and its translation in desired languages.
Array Type (only for the Array type): Choose the relevant type of values in an array.
Values (only for Enum type): Define the default values for the field. Confirm each value with Enter key.
Reference Type (only for Reference type and Reference in Array Type): Select entity you want to establish reference to. This is supported for custom entity schemas only.
Provide relevant configuration in Settings:
Localized (only for Text type): Decide whether the field is translated to other languages.
ReadOnly: Decide whether the field is non-editable.
Required (except for Boolean type): Decide whether the field is mandatory.
Nullable: Decide whether the field can accept
nullvalues.Array Localized (only for Text in Array Type): Decide whether texts within the array are localized.
Array Values (only for Enum in Array Type): Define the default values for the field. Confirm each value with Enter key.


Result: The new schema is in use. It means that if, for example, you've created a schema called Size for a product entity, next time you create or edit a product, the new fields are available in a Size tab.

The schemas of object type display the defined objects as nested within a hierarchical structure:

The schemas of array of objects type also allow for adding objects with the defined fields:

Uploading a JSON file
Updating schema by JSON file might be useful when you have an already defined data model.
Result: The new schema is in use. It means that if, for example, you've updated a schema for a product entity, next time you create a product, the new fields are available in a separate tab called the same as your schema.
Editing mixin schemas
Each time you edit a schema, you generate its new version. This behavior is to prevent validation errors for the objects that were created/edited earlier and use the older schema versions. The latest schema version is always applied by default.
Result: A new version of the schema has been uploaded and is now in use.
Mixin schema versioning
When you edit a mixin schema that is already assigned to an entity, your changes become visible in the entity view.
For example, suppose you have a custom instance schema for mobile phones. If you update the schema to add new fields or modify existing field types, those changes automatically appear in the entity that uses the schema.
When a mixin schema is used in an entity, an indicator in the view displays the mixin schema version number.
Each time you update the mixin schema and open the entity that uses it, you can see which fields were added or modified. For instance, in the mobile phone instance schema below, the newly added and updated fields are highlighted accordingly - blue for new, yellow for the changed ones.

In this view, you can compare the current mixin schema version with the new one. You can either keep the old version, or decide to use the new one.

New fields and updates are highlighted only if the instance already has previously saved mixin values. If the entity uses the same mixin schema but has no saved values, it automatically updates to the latest schema version without displaying a preview of the changes. For example:

If you need a more detailed, technical comparison of all your changes, choose the Technical button. This opens a side-by-side comparison of the current and updated schemas in a JSON format. At the top, you can see a list of differences showing the unique keys of the newly added fields. The format of these keys depends on whether they were custom-defined or auto-generated.

See other examples for Product and Customer entities:


Displaying mixins in entity list view
You can add a mixin field as a column in the list view of a selected entity. The mixin field can serve as a filter so that you can find the items of your interest.
Only the mixins defined in the Schema Service can serve as column filters. If you use the API to create mixins instead of the Schema Service, you won't be able to add the mixin fields from the API upload. To get around this, first define the mixin fields for a given entity in the Schema Service.
Adding mixins as column filters is possible for the following entities: category, company, coupon, customer, customer address, order, price list, product, quote, and return.
Unassigning a schema
If you no longer want to apply the latest version of a schema to an entity, you can unassign it.
Result: The particular entity uses the previous version of the schema that exists in the database. If you had only one schema version and you unassign it from an entity, the schema tab is no longer visible when you create or edit objects of that type.
The unassigned schemas are not displayed in the Management Dashboard. To retrieve, edit or delete an unassigned schema, use API mechanism. See more in Schema Service.
Last updated
Was this helpful?








