Meta UI presets

Meta UI Presets provide a structured and validated way to manage metadata in the Crystallize Admin UI. Instead of relying on free-form key/value fields, presets allow you to define type-safe input components with validation and contextual behavior.

This ensures metadata remains consistent, predictable, and reliable across editors, projects, and tenants.

Overview

Crystallize metadata is intentionally flexible, allowing teams to attach arbitrary data to items, products, orders, and other entities. While powerful, this flexibility can lead to inconsistent or invalid data when values are entered manually.

Meta UI Presets introduce structured UI components for metadata, enforcing rules directly in the Admin UI. By defining presets, you control how metadata is entered, validated, and presented to editors.

Meta UI Presets enable:

  • Strongly typed metadata input
  • Required and optional field enforcement
  • Context-aware and conditional UI behavior
  • A more intuitive and consistent editing experience

Meta UI Presets are built on top of existing metadata. They do not change how metadata is stored or processed on the server. Validation is applied only in the Admin UI. The backend does not validate metadata against presets, and presets are not considered during metadata persistence.

Why meta UI presets matter

Without meta UI presets

  • Editors can enter inconsistent or incorrectly formatted values
  • Required metadata fields may be omitted
  • Metadata editing experiences vary across projects and teams

With meta UI presets

  • Metadata is entered using structured input types such as booleans, numbers, and select components
  • Validation is enforced directly in the Admin UI
  • Manual input errors are significantly reduced
  • Metadata remains consistent and type-safe across tenants

This is especially important in commerce scenarios where metadata often drives business logic, automation, and third-party integrations.

Preset definition

A Meta UI Preset is a configuration that defines how a metadata field behaves in the Admin UI.

Each preset includes the following properties:

Property

Description

Meta key name

The label displayed in the Admin UI

Meta key

The metadata key the preset maps to

Key type

The data type (Boolean, Number, Text, Select, etc.)

Validation rules

Constraints such as required fields or value limits

Scope limitations

Defines which item or entity types the preset applies to

Presets allow metadata fields to be clearly defined, validated, and reused across relevant entities.

Supported input types / components

Meta UI Presets support a range of common input types for structured metadata.

Type

Description

Boolean

Checkbox or toggle for true/false values

Number

Numeric input with optional minimum and maximum validation

Text

Single-line text input

Select

Dropdown with predefined options

Multiselect

Selection of multiple predefined options

These input types ensure metadata values are entered consistently and correctly.

Using presets in the admin UI

After presets are defined and their scope conditions are met, the Admin UI automatically displays the relevant presets for an item.

  • If a preset is required, it is shown automatically
  • If multiple presets match an item, editors can add additional presets manually

Data format expectations

Most preset components store metadata as strings, which works transparently in most cases. However, some components expect specific formats:

  • Boolean component
    Expects "true", "false", or an empty value
  • Multiselect / checkbox components
    Expect a stringified array of strings, for example:
    ["morning","noon","afternoon"]

Ensuring metadata follows these formats allows presets to function correctly in the Admin UI.

;