Skip to main content

List value operators

If the value is of type list, then you will have to choose one of the multi-operators to create your conditions. Auto tags support the following multi-operators:

  • "Any of" will evaluate to True if any of the sub-condition evaluates to True.
  • "All of" will evaluate to True if all of the sub-condition evaluate to True.
  • "None of" will evaluate to True if none of the sub-condition evaluates to True.

Examples

Let's say a product has two variants -- V1 with inventory quantity set to 1 and V2 with inventory quantity set to 0.

Since a product has multiple variants, Product -> Variants -> Inventory Quantity will return a list containing inventory quantity for each variant. In this specific example, Product -> Variants -> Inventory Quantity will evaluate to [1, 0].

Any of Product -> Variants -> Inventory Quantity is greater than 0 -> evaluates to True

In order to evaluate the above condition, the app will first evaluate all the sub-conditions:

  • 1 is greater than 0 -> evaluates to True
  • 0 is greater than 0 -> evaluates to False

Then it will check if any of the sub-conditions evaluates to True, then it will return True. In this case, since one sub-condition evaluates to True, the condition will also evaluate to True.

All of Product -> Variants -> Inventory Quantity is greater than 0 -> evaluates to False

In order to evaluate the above condition, the app will first evaluate all the sub-conditions:

  • 1 is greater than 0 -> evaluates to True
  • 0 is greater than 0 -> evaluates to False

Then it will check if all of the sub-conditions evaluates to True, then it will return True. In this case, since not all sub-conditions evaluates to True, the condition will evaluate to False.

None of Product -> Variants -> Inventory Quantity is greater than 0 -> evaluates to False

In order to evaluate the above condition, the app will first evaluate all the sub-conditions:

  • 1 is greater than 0 -> evaluates to True
  • 0 is greater than 0 -> evaluates to False

Then it will check if none of the sub-conditions evaluates to True, then it will return True. In this case, since one sub-condition evaluates to True, the condition will evaluate to False.

Here's the result of other conditions for the above example product:

  • Any of Product -> Variants -> Inventory Quantity is less than 0 -> evaluates to False
  • All of Product -> Variants -> Inventory Quantity is less than 0 -> evaluates to False
  • None of Product -> Variants -> Inventory Quantity is less than 0 -> evaluates to True
  • Any of Product -> Variants -> Inventory Quantity is 1 -> evaluates to True
  • All of Product -> Variants -> Inventory Quantity is 1 -> evaluates to False
  • None of Product -> Variants -> Inventory Quantity is 1 -> evaluates to False