Base Unit ID, Name, and Value Aspects
Data for attributes that include a unit can be extracted using the following base unit aspects:
- Base Unit ID - Extracts the ID of the base unit that is associated with the unit of the attribute value.
- Base Unit Name - Extracts the name of the base unit that is associated with the unit of the attribute value.
- Base Unit Value - Extracts the attribute value according to the base unit. This aspect can be applied when established associations exist between units, and where one unit is the base unit.
For general information on setting a Transformation aspect, refer to the Aspect - Transform Outbound topic.
For example, for the Width attribute on a product, the value '3' is associated with the unit 'ft.'
The Width attribute has a Number validation base type, and allows units of cm (centimeters), mm (millimeters), in (inches), and ft (feet).
Each of the units is associated with the same base unit of m (meters) and include a conversion factor. For example, feet are multiplied by .3048 to get meters. The base unit of meters includes all required conversion rules. For more information on base units, refer to the Units topic in the System Setup documentation.
Configuration
In addition to the ID and name of the product, the values identified above are mapped using the Select Attribute data source and the specified aspect.
Note: The name of the selected aspect is displayed after the name of the mapped attribute.
- Width attribute is mapped with the aspect of 'Value and unit.'
- Width attribute is mapped with the aspect of 'Base Unit ID.'
- Width attribute is mapped with the aspect of 'Base Unit Name.'
- Width attribute is mapped with the aspect of 'Base Unit Value.'
Results
Product 179915 is exported with the following output:
- ID is 179915.
- Name is 179915.
- Width attribute with the value aspect of 'Value' is '3 ft.'
- Width attribute with the value aspect of 'Base Unit ID' aspect is 'unece.unit.MTR.' Since attribute value uses the 'ft' unit, and it is associated with the meters base unit, the meters ID is used.
- Width attribute with the value aspect of 'Base Unit Name' aspect is blank.
- Width attribute with the value aspect of 'Base Unit Value' aspect is '0.9144.' The attribute value is converted from 3 ft to the corresponding number in m, so the foot conversion of .3048 is multiplied by the attribute value of 3.