Boolean Logic

Updated
January 13, 2024

The Composer supports Boolean logic to form complex rules, allowing you to specify multiple requirements within a certain timeframe that need to be met simultaneously or offer alternative criteria. Boolean logic in the Composer uses AND and OR operators.

AND Operator

The AND operator allows you to specify that multiple conditions should be met within the same timeframe. For instance, over the last 30 days (acos > 20% AND clicks > 1000) means that within the last 30 days, the Advertising Cost of Sales should be more than 20%, and the number of clicks should be more than 1000.

OR Operator

The OR operator allows you to offer alternative conditions within the same timeframe. For instance, over the last 30 days acos > 20% OR sales < $1000 means that within the last 30 days, either the Advertising Cost of Sales being more than 20% or the sales being less than $1000 would be enough for the condition to be met.

Precedence of Operators

In Boolean logic, the AND operator usually takes precedence over OR. This means if you have a rule like:

over the last 30 days (acos > 20% OR sales < $1000 AND clicks > 1000)

The AND operation (sales < $1000 AND clicks > 1000) will be evaluated first and then the OR operation will be evaluated.

Need more help?