When importing your catalog, make sure to consider product attributes.
Although product attributes can be numeric, the product attribute value is only a string. Strings are the lowest common denominator of all supported attribute types. The import logic validates operator and attribute values based on metadata definitions. These definitions are similar to what exist for custom product attributes in catalog imports.
The following are the validation rules:
This table illustrates the validation rules.
Value Type | Value | Multiple 'attribute-value' elements allowed? | Operator |
---|---|---|---|
String | - | yes | - |
Integer | numeric value without decimal places | no | Operator "less than" is mapped to internal operator "less than or equals". Operator "greater than" is mapped to internal operator "greater than or equals". |
Boolean | value equals to 'true' or 'false' | no | - |
Set of String | - | yes | - |
Set of Integer | numeric value without decimal places | no | Operator "less than" is mapped to internal operator "less than or equals". Operator "greater than" is mapped to internal operator "greater than or equals". |
Enum of String | one of the values of attribute definition | no | - |
Enum of Integer | numeric value without decimal places | no | Operator "less than" is mapped to internal operator "less than or equals". Operator "greater than" is mapped to internal operator "greater than or equals". |
This table shows how B2C Commerce evaluates attribute conditions based on their type.
Value Type | Supported Operators | Multiple Values Supported | Client-side Value Editor | Sample Condition |
---|---|---|---|---|
String | equals | yes (OR combined) | text field | product attribute "size" equals "10" |
Integer | greater than or equals, equals, less than or equals | no | text field | product attribute "size" greater than or equals "4" |
Boolean | equals | no | combo box | product attribute "enabled" is "true" |
Set of String | equals | yes (OR combined) | text field | product attribute "Image Aspect Ratio" equals "16:9" |
Set of Integer | greater than or equals, equals, less than or equals | no | text field | product attribute "width" greater than or equals "3" |
Enum of String | equals | no | combo box | product attribute "weight" equals "27 lbs" |
Enum of Integer | greater than or equals, equals, less than or equals | no | combo box | product attribute "width" equals "3" |