|22.214.171.124.4 Right operand << 126.96.36.199.5 >> 188.8.131.52 Product targeting with condition tree|
184.108.40.206.5 Multiple conditions, parenthesis and condition evaluation orderIf campaign has more than one condition, the conditions are connected to each other via a logical connective:
Each condition has plus (+) and minus (-) buttons to the left and right of the condition. The buttons on the left are used to add/remove parenthesis to the left of the condition, the right buttons to add/remove parenthesis to the right of the condition. With parenthesis, multiple conditions can be grouped/paired together, in which case the group is evaluated first as a whole, before its result is evaluated to other parts of the expression. The innermost group is always evaluated first. Parenthesis can be nested.
When parenthesis are used, they must be balanced. When adding or removing parenthesis, they are colored black (in balance) or red (not in balance) to indicate whether all the parenthesis as a whole are in balance. A campaign with non-balanced parenthesis in the conditions can not be saved. If condition is removed from a condition expression that has parenthesis, then all of the parenthesis are automatically removed, and they must be added back manually.
Below is a simple example. The conditions are in a top-to-bottom order, as they are in the condition editor. In the first expression, if condition 1 is true, the expression as a whole is true, and conditions 2 and 3 are never evaluated. If condition 1 is true in the second expression, then condition 3 must also be true, for the expression as a whole to be true.
condition1 OR condition2 AND condition3 (condition1 OR condition2) AND condition3
The use of parenthesis is not mandatory, and for simple cases that only contain one or two conditions, they are usually not needed.