How to use conditions (IF) in rules
You use conditions, the IF part of a rule, to filter out specific items in your import data that you want to alter or affect with an action, the THEN part of a rule.
For example, to filter any items that are missing a title in the title field, you can set up your condition like this:
IF the title field is empty
Once you’ve set up your conditions, you can use actions to define what you want your rule to do to the items you have filtered.
Combine multiple conditions with ‘AND’
You can use AND to combine multiple conditions that items need to meet to be included in your selection.
Example: Filter items without a title and ID
IF the title field is empty
AND the id field is empty
Example: Filter items that are size small and pink
IF the color field is equal to ‘pink’
AND the size field is equal to ‘small’
Use ‘OR’ to apply rules when any specified conditions are met
You can use OR to filter and apply a rule to items that meet one or more parts of your criteria.
To do this, select OR and set up your second condition. This will filter items if they meet either the first or the second criteria.
Example: Filter items that are size large or are pink
IF the color field is equal to ‘pink’
OR the size field is equal to ‘large’
Combine ‘OR’ and ‘AND’ to make complex conditions
You can combine both OR and AND statements to make complex conditions.
Example: Filter items that are either blue or pink, and size small
IF the color field is equal to ‘pink’
OR the color field is equal to ‘blue’
AND the size field is equal to ‘small’
There is a hierarchy that determines how OR conditions can affect your other conditions. Each OR has an effect on the IF or AND condition that is directly before it.
If you set up these conditions:
IF the color field is equal to ‘pink’
AND the size field is equal to ‘small’
OR the size field is equal to ‘medium’
The OR condition will only affect the AND condition before it.
Once you have set up your conditions, you can add actions (THEN-statements) to continue building your rule.
Apply a rule to all of your items
To include all your items in a rule, use the condition all. In this situation, you don’t need to use ‘OR’ or ‘AND’ conditions. Instead, you can set your condition up like this:
IF all
Next, you need to add an action to complete the rule. Once you save your rule, all items will be affected by your rule.
Condition types
Last updated
Was this helpful?