You can check all the condition operators available for the Macro editor feature here.
Text conditions
contains/doesn't contain
You can select an attribute value that contain/don't contain specific texts.
Example:
Use attribute as input to the condition:
sku - attribute values 'wpd011', 'msj003', 'ace001', 'ace002'
Define the following operations:
contains '01'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
true', 'false', 'true', 'false'
Example:
Use attribute as input to the condition:
sku - attribute values 'wpd011', 'msj003', 'ace001', 'ace002'
Define the following operations:
don't contain
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'false', 'true', 'false', 'true'
is equal to/is not equal to
You can select an attribute value that is equal to/is not equal to a specific text.
Example:
Use attribute as input to the condition:
sku - attribute values 'wpd011', 'AD-01-yellow-1', 'ace001', 'ace002'
Define the following operations:
is equal to 'AD-01-yellow-1'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'false', 'true', 'false', 'false'
Example:
Use attribute as input to the condition:
sku - attribute values 'wpd011', 'AD-01-yellow-1', 'ace001', 'ace002'
Define the following operations:
is not equal to 'AD-01-yellow-1'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'true', 'false', 'true', 'true'
starts with/doesn't start with
You can select an attribute value that starts with/doesn't start with a specific text.
Example:
Use attribute as input to the condition:
sku - attribute values 'wpd011', 'AD-01-yellow-1', 'ace001', 'SAD-01-red-1'
Define the following operations:
starts with 'AD'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'false', 'true', 'false', 'false'
Example:
Use attribute as input to the condition:
sku - attribute values 'wpd011', 'AD-01-yellow-1', 'ace001', 'SAD-01-red-1'
Define the following operations:
doesn't start with 'AD'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'true', 'false', 'true', 'true'
ends with/doesn't end with
You can select an attribute value that ends with/doesn't end with a specific text.
Example:
Use attribute as input to the condition:
sku - attribute values 'wpd011', 'AD-01-yellow-1', 'ace001-AD', 'SAD-01-red-1'
Define the following operations:
ends with 'AD'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'false', 'false', 'true', 'false'
Example:
Use attribute as input to the condition:
sku - attribute values 'wpd011', 'AD-01-yellow-1', 'ace001-AD', 'SAD-01-red-1'
Define the following operations:
doesn't end with 'AD'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'true', 'true', 'false', 'true'
is empty/isn't empty
You can select an attribute value that is empty/isn't empty.
Example:
Use attribute as input to the condition:
sku - attribute values - 'wpd011', 'AD-01-yellow-1', 'ace001-AD', '' - ( '' means empty)
Define the following operations:
is empty
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'false', 'false', 'false', 'true'
Example:
Use attribute as input to the condition:
sku - attribute values - 'wpd011', 'AD-01-yellow-1', 'ace001-AD', '' - ( '' means empty)
Define the following operations:
isn't empty
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'true', 'true', 'true', 'false'
length exceeds/length doesn't exceed
You can select an attribute value that length exceeds/length doesn't exceed a specific value.
Example:
Use attribute as input to the condition:
sku - attribute values - 'wpd011', 'AD-01-yellow-1', 'ace001-AD', 'SAD-01-red-1'
Define the following operations:
length exceeds '13'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'false', 'true', 'false', 'false'
Example:
Use attribute as input to the condition:
sku - attribute values - 'wpd011', 'AD-01-yellow-1', 'ace001-AD', 'SAD-01-red-1'
Define the following operations:
length doesn't exceed '13'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'true', 'false', 'true', 'true'
word count exceeds/word count doesn't exceed
You can select an attribute value that word count exceeds/word count doesn't exceed a specific value.
Example:
Use attribute as input to the condition:
sku - attribute values - 'Tailored/Slim fit. Long sleeves. Button cuff. Cotton. Imported.', 'Acetate frame. Polycarbonate lenses.'
Define the following operations:
word count exceeds '5'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'true', 'false'
Example:
Use attribute as input to the condition:
sku - attribute values - 'Tailored/Slim fit. Long sleeves. Button cuff. Cotton. Imported.', 'Acetate frame. Polycarbonate lenses.'
Define the following operations:
word count doesn't exceed '5'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'false', 'true'
contains any of/doesn't contain any of
You can select attribute values that contain/don't contain specific texts. You can check multiple values. Each value should be placed in a separate row.
Example:
Use attribute as input to the condition:
sku - attribute values - 'wpd041', 'AD-02-yellow-1', 'ace003-AD', 'SAD-01-red-1'
Define the following operations:
contains any of '01' or '02'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'false', 'true', 'false', 'true'
Example:
Use attribute as input to the condition:
sku - attribute values - 'wpd041', 'AD-02-yellow-1', 'ace003-AD', 'SAD-01-red-1'
Define the following operations:
doesn't contain any of '01' or '02'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'true', 'false', 'true', 'false'
is equal to any/isn't equal to any
You can select attribute values that are equal to any/isn't equal to any specific texts. You can check multiple values. Each value should be placed in a separate row.
Example:
Use attribute as input to the condition:
sku - attribute values - 'wpd041', 'AD-02-yellow-2', 'ace003-AD', 'SAD-01-red-1'
Define the following operations:
is equal to any of 'AD-01-yellow-1' or 'AD-02-yellow-2'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'false', 'true', 'false', 'false'
Example:
Use attribute as input to the condition:
sku - attribute values - 'wpd041', 'AD-02-yellow-2', 'ace003-AD', 'SAD-01-red-1'
Define the following operations:
isn't equal to any of 'AD-02-yellow-2' or '11'
set 'true' if the condition is met
set 'false' if the condition is not met
As a result, the values below are exported to the feed:
'true', 'false', 'true', 'true'
Number conditions
is greater than
You can select an attribute value that is greater than a specific value.
is greater or equal to
You can select an attribute value that is greater or equal to a specific value.
is less than
You can select an attribute value that is less than a specific value.
is less or equal to
You can select an attribute value that is less or equal to a specific value.
Advanced conditions
is true - attribute true... - e.g., "Is_Parent is true" (only parent products are listed in the feed)
is false - attribute false ... - e.g., "Is_Parent is false" (only non-parent products are excluded from the feed)
matches regex - e.g., "Name matches regex /.*color$/" (only products with a name ending with "color" are listed in the feed). You can use regular expressions to match.
doesn't match regex - e.g., "Name doesn't match regex /.*color$/" (only products with names not ending with "color" are listed in the feed). You can use regular expressions to match.
To use a regex, enclose it between /
delimiters, placing the pattern between the slashes (e.g., /pattern/
matches 'pattern'). The slashes indicate the start and end of the regex.