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

In Management Dashboard, you can extend the data model for the following entities: cart, category, company, coupon, customer, customer address, order, price list, product, quote, return and custom entity.

Defining a schema manually

  1. Go to Settings -> Mixin Schemas and choose Add new mixin schema.

  2. 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.

  1. Choose the Confirm button.

  2. Go to Fields tab and choose + icon to add a mixin field.

  • Type: Select a field type relevant to its purpose.

The following field types are supported: array, boolean, date, date_time, decimal, enum, number, object, text, and time. The array mixin types support values of different types as well: boolean, date, date_time, decimal, enum, number, object, text, and time.

  • 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.

  • 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 null values.

    • 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.

  1. Save a field with Confirm button.

Repeat these steps to add as many fields as you require for the given entity.

  1. If you've added fields of object type or of array of objects type, choose + icon within the given row to define the object's fields (only for object and array of objects types).

  1. When you're done with defining mixin schema fields, confirm schema creation with Save. This action generates the schema for a particular entity or entities.

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 json file

Updating schema by json file might be useful when you have an already defined data model.

If you want to learn how to create json schema file, see Prepare a JSON schema definition.

  1. Go to Settings -> Mixin Schemas and choose Add new schema.

  2. Choose an entity or multiple entities that you want to customize from the dropdown menu and enter the name for the schema.

  3. Choose the schema file from your device or drag and drop it to the selected area and choose Confirm.

  4. Confirm the new schema creation with Save.

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

  1. Go to Settings -> Mixin Schemas and select the schema you want to change. Choose the Edit icon to modify it.

  2. Make changes to the schema or to particular fields in the schema:

    • In Schema tab, you can select or unselect entities types you want to apply the schema to.

    • In Fields tab, you can change settings for particular fields, add more or remove fields from the schema.

  3. Confirm your changes with Save and confirm you want to update the existing schema.

Result: A new version of the schema has been uploaded and is now in use.

If you have a schema applied to multiple entities, it is possible to modify the schema for each entity separately. You need to select the entities you want your changes to apply to when editing the schema. Then, the new schema version is in use only for the selected entities while the other ones still use the previous version.

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.

  1. Go to the selected entity view and choose the Orchestration icon.

  1. In the Mixins section, look for the mixin fields you want to add as filter columns. Or, choose Add custom mixin to add a new mixin field.

The selected mixin fields appear in the list.

  1. Adjust the way how the columns are displayed with Edit icon. You can edit the displayed label of the mixin column.

  1. Save the selection. The columns appear instantly in the entity list view.

Unassigning a schema

If you no longer want to apply the latest version of a schema to an entity, you can unassign it.

  1. Go to Settings -> Mixin Schemas and select the schema you want to remove from an entity.

  2. Choose Unassign icon to remove connection between the latest schema version and entity.

  1. Confirm the action with Yes.

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.

Last updated

Was this helpful?