Attribute = the
ProductAttribute entity. The catalog is owned by the
Product Attribute module (MercurModules.PRODUCT_ATTRIBUTE, id prefix
pattr). Products are the shared master catalog. Attributes never belong to a
store. Sellers list against master products through offers.Key features
- Five typed forms:
single_select,multi_select,text,unit, andtoggle, each with its own validation and UI shape. - Variant axes: a
multi_selectattribute markedis_variant_axismirrors a native MedusaProductOptionand generates product variants. - Global or inline: reuse a global catalog attribute across products, or attach a one-off attribute scoped to a single product.
- Storefront filtering: an
is_filterableflag exposes an attribute as a shopper-facing facet. - Batch attach: attach, detach, and update all of a product’s attributes through a single engine workflow.
- Ordered and governed:
rank,is_active, andis_requiredcontrol ordering, availability, and required-field enforcement.
Get started
Learn how the domain fits together.Attribute types
The five attribute types and the values they hold.
Variant axes
How
is_variant_axis mirrors a ProductOption and generates variants.Global vs inline
Catalog-wide attributes, product-scoped attributes, and filtering.
Examples
Build against the Attribute domain in your own code.Create an attribute
Run
createProductAttributesWorkflow from a route or seed script.Attach to a product
Attach, detach, and update attributes in one batch call.
Create a variant axis
Generate variants from a
multi_select axis attribute.Resources
Data models, links, workflows, service methods, and events for the Attribute domain.Data models
The
ProductAttribute and ProductAttributeValue entities.Links
How the Attribute domain links to products, categories, and options.
Workflows
Catalog and product-attachment workflows.
Service
Module service methods for working with records directly.
Events
Events emitted as attributes and values change.