Additional property
Additional Properties
Additional Properties is a general Hii Retail concept designed to handle any data need without requiring schema changes or additional development.
There are two main reasons to use Additional Properties:
- To meet the needs of services consuming your data (e.g., POS, electronic shelf labels, label printing, reporting, stock management).
- To enrich data with custom information for your own use cases (e.g., displaying extra info in a UI).
Most entities in Hii Retail support Additional Properties.
What is it?
Additional Properties is an array on the entity, allowing you to extend it with dynamic information. These are key-value pairs with metadata: Id (identifier) and Value (stored as a string).
Each property must have a correct data type for proper visualization and processing.
When displaying Additional Properties, always consider the data type to ensure correct rendering (e.g., show a checkbox for boolean values).
Example: The property "MyCustomProperty.IsVisibleInUI" with data type
BOOL
should be rendered as a checkbox.
How does it work?
Additional Properties defined on an entity are inherited by lower levels in a hierarchy or through distribution calculations.
For example, Item Categories with Additional Properties will inherit from their parent and propagate the accumulated set of properties to child categories and, eventually, to Items in that category.
Item Categories Additional Properties Inheritance
Set = Locally set Additional Property
Acc = Accumulated Additional Properties
This allows you to define default values at higher levels (like Item Categories), which are aggregated at lower levels. Items in a category receive all inherited properties, but if a property is also defined on the Item, the Item-level value takes precedence.
Additional Property Types
Note: Hii Retail does not strictly validate values. Ensure the value matches the selected type for correct rendering and parsing.
Data type | Description |
---|---|
BOOL | Boolean (true , false ). Display as a checkbox or equivalent. |
INT | Signed integer. Numeric input without decimals. |
LONG | Large signed integer. Numeric input without decimals. |
DECIMAL | Floating point number (~15-17 digits). Numeric input with decimals. |
DOUBLE | Floating point number (28-29 digits). Numeric input with decimals. |
STRING | Text input. No character restrictions. |
DATE | Date only, ISO 8601 format. Not validated. |
DATETIME | Date and time, ISO 8601 format. Not validated. |
CURRENCY | Numeric with decimals, presented with currency info. |
IMAGE | Text link to a picture. |
BINARY | Binary blob, stored in Cloud Storage as a link. |
LINK | URL to any resource. Must be a valid link. |
ARRAY | List of strings, separated by commas. |
KEY-VALUE | List of key-value pairs, separated by pipe ( |
JSON | JSON structure. Validated for errors. |
XML | XML structure. Validated for errors. |
TIME | Time value, ISO 8601 format. Not validated. |
UNKNOWN | Should not be used; may be set if errors occur. |