Promotion Product Rule Attribute Conditions

When importing your catalog, you need to consider product attributes. Although product attributes can be numeric, the value of product attribute can only be a string. This is the lowest common denominator of all supported attribute types. The import logic validates operator and attribute values based on meta data definitions similar to what exists for custom product attributes in catalog imports.

The following are the validation rules:

The following 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".

How Salesforce B2C Commerce Processes Attributes

This table show 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 "27lbs"
Enum of Integer greater than or equals, equals, less than or equals no combo box product attribute "width" equals "3"