Contents
- Combine multiple conditions with ‘AND’
- Use ‘OR’ to apply rules when any specified conditions are met
- Combine ‘OR’ and ‘AND’ to make complex conditions
- Apply a rule to all of your items
- Condition types
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
To filter any items that are missing a title in the title field, and to filter any items that are missing an id in the id field, you can set up your condition like this:
- IF the title field is empty
- AND the id field is empty
Example: Filter items that are size small and pink
To create a rule that applies to items that are both pink and size small, you can set up your condition like this:
- 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 and pink
To filter items that are either pink or size large, you can set your condition up like this:
- 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
To filter items that are size small, and are either blue or pink, you can set your condition up like this:
- 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
All
The All condition selects all items from your import data. You can use this condition to select all your items to make the same change to all of your items.
Example:
- IF all
Contains any of
The Contains any of condition filters items that contain specified values in a field. You can use this condition to search for values in other fields.
Example:
- IF description contains any of
- sneaker
- shoe
- trainer
Equals any of
The Equals any of condition filters items that contain specified values that are of the same value in a field. You can use this condition to search for exact matches on values in other fields.
Example:
- IF GTIN equals any of
- 4006381333931
- 5901234567890
- 7622305678195
Is before
The Is before condition requires the current date to be before a specified date and time to make changes to a field. You can use this condition for setting up sale pricing.
current_date
. Example:
- IF current_date is before date
Is empty
The Is empty condition filters fields with missing data. You can use it to check if any of your products are missing a required field (for example, title, description).
Example:
- IF title is empty
Is less or equal to
The Is less or equal to condition filters items with a field that contains a numerical value that is smaller or equal to a specified value.
Example:
- IF price is less or equal to
Is less than
The Is less than condition filters items with a field that contains a numerical value that is smaller than a specified value.
Example:
- IF price is less than
Is not valid
The Is not valid condition filters items with an invalid value in the GTIN or EAN field.
Example:
- IF GTIN Is not valid
Is on or after
The Is on or after condition requires the current date to be on or after a specified date and time to change a field. You can use this condition for setting up sale pricing.
current_date
. Example:
- IF current_date is on or after date