Appearance
Attributes β
Attributes allow you to enrich customer, order and item data with custom details tailored to your use case. These can include marketing texts, specific measurements (such as height, weight, or length), or any other relevant data. Attributes are flexible and support various types to suit different scenarios.
Before you can add an attribute to a record, you must first create its definition, which specifies the attribute type.
Attribute type β
| Type | Description |
|---|---|
locale-text | A text field that supports multiple language translations. |
text | A plain text field for a single language. |
checkbox | A boolean value representing 'Yes' or 'No'. |
number | A number used for things like height, length, or weight. It's stored as a decimal with up to 25 digits in total, including 10 digits after the decimal point. |
These attribute types ensure that items in the Orisha Commerce Platform can be fully enriched with both business and marketing data.
Every attribute with the same attribute key is required to be the same type. You cannot combine a number and a text under the same attribute key.
Attribute key β
Each attribute must have a unique key.
Illegal characters β
This key must not contain any of the following characters:
- " ", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "-", "+", "=", "{", "}", "[", "]", ";", ":", "'", """, "<", ">", ",", ".", "/", "?"
Using clean and valid keys ensures smooth usage and integration throughout the platform.
Prefix authorization β
Attribute keys are required to start with a prefix (e.g., MKR-Width, MKR-Height). Prefixes have a required format of [A-Z]{3}-, meaning exactly three uppercase letters, followed by a dash. Prefixes are used to control which attributes a user can manage.
The following permissions can be managed per identity via the OCP Admin portal:
- Attribute prefix: Users may create, update, or delete attributes with keys that start with their assigned prefix.
- Grant access to edit all attributes: Administrators or users with this permission can modify attributes with any prefix.
Working with non-authorized prefixes β
Users without permission for a specific prefix:
- Can view attributes with that prefix.
- Cannot create, update or delete attributes with that prefix.
- Still have to include them in update (PUT) requests, with the following requirements:
- The values remains unchanged.
- The order remains unchanged.
These rules ensure that attribute management stays within a userβs assigned scope, while still allowing complete update payloads without triggering authorization errors.
Known limitations β
- Changing the type of the attribute to different type isn't allowed. Remove and recreate the attribute if a different type is needed.
- Attribute prefixes are fixed once created. To change a prefix, remove and recreate the attribute with the new prefix.