Skip to main content

Attributes Engine & EAV Management

The Attributes module allows you to introduce structured, dynamic fields across the system (product, project, event, merchant, brand, organization, and place) without writing backend code.


1. Creating an Attribute​

Basic Configuration​

  • Label: The display name shown in forms and storefront filter sidebars (e.g., Fabric Type).
  • Unique Key: The programmatic identifier code (e.g., fabric_type). Validated via the /check endpoint to prevent duplicates.
  • Entity Type: The entity domain this attribute belongs to (product, project, event, merchant, brand, organization, place).
  • Data Type: Supported types include STRING, NUMBER, BOOLEAN, DATE, SELECT, MULTISELECT, SOURCE, and OBJECT.

Input Configuration & Validation​

  • Placeholder & Tooltip: Guidance text rendered in management inputs.
  • Unit of Measurement: Optional unit suffix (e.g., GSM, kg, cm, hours).
  • Validation Rules: Set Required, Min/Max boundaries, character length limits, and custom Regex patterns.

Dynamic Source Options (SOURCE)​

For SOURCE type attributes, options are populated dynamically from linked system entities (e.g., pulling active merchant names or dictionary taxonomies) via the /source-options API.

Nested Object Fields (OBJECT)​

When type is set to OBJECT, this attribute acts as a composite subdocument holding nested sub-fields, each with its own data type and validation rules.


2. Integration with Custom Forms (mappedAttributeId)​

Attributes defined in the Common Attribute engine can be bound directly to fields in the Custom Forms module:

  1. When designing an application form (e.g., MERCHANT_APPLICATION), select Map to Entity Attribute.
  2. Select the target attribute from the dropdown.
  3. When the application is reviewed and approved, submitted answers automatically convert into the entity's normalized EAV attributes array ({ attributeId, value, unit }).