Enrichment of metaproperties: measurement configuration
The enrichment_measurement_config
parameter in our application is used to add a configuration of formatting in case product metric attributes are used to enrich a Bynder asset as metaproperty information.
Usage
The configuration is not obligatory for enrichment of metric attributes to work. Without the configuration metric attributes will still be synced to the asset as a metaproperty enrichment if added as an enrichment attribute, but in a set structure of the numeric value with no or 3 decimals, without unit.
When adding this configuration to the connector, it automatically applies to all metric attributes mapped to be synced as enrichment information to a Bynder asset. The configuration consists of 3 parameters: the separator, count of decimals and whether or not the unit of the metric should be included.
Examples
You can find a few examples below of how metrics are interpreted with a given configuration:
#input: 1.000 cm
"enrichment_measurement_config": {
"separator": ".",
"decimals": "0",
"include_unit": true
}
#output: 1 cm
#input: 1.546 cm
"enrichment_measurement_config": {
"separator": ".",
"decimals": "2",
"include_unit": false
}
#output: 1.55
#input: 1.546 cm
"enrichment_measurement_config": {
"separator": ",",
"decimals": "1",
"include_unit": true
}
#output: 1,5 cm