How do I create a more complex rule with nested conditions?
Standard segmentation rules can be very simple, with just one or two conditions, or you can group conditions and mix types to form more complex queries.
To do this, first create three or more conditions by clicking ADD CONDITION and setting the rules.
Using the mouse, click a condition and then drag it on top of a condition. A button will appear showing 'Drop Here'. Release the button to drop the condition and form a group. The new group will display options for type (AND, OR, NOT) in the upper right.
For example, you have created custom fields to indicate if a subscriber is a donor, donation date, donation amount, and the number of times donated.
|custom_donor||text||TRUE or FALSE (Not Exists also indicates FALSE)|
To make a rule to find the subscribers who have email domain 'gmail', are recurring donors and have contributed less than $1000.00 OR subscribers who have email domain 'gmail', made only one donation in the past three months, and have contributed more than $1000.00:
- Create the following conditions:
|6||Months between||custom_donation_date||and Today <=||3|
- Drag condition #5 and drop on condition #3. Set the Condition Type to OR.
- Drag condition #4 and drop on condition #3. Conditions #3 and #4 will form a subgroup. Set the Condition Type to AND.
- Drag condition #6 and condition #7 on condition #5. These will create a second subgroup. Set the Condition Type to AND.
The resulting rule will look like this: