Creating segments using the AND/OR logic can be confusing, especially if the segmentation results do not show what you expected. In this article, we will explain both the 'AND' and 'OR' logic for both positive conditions (in list, tag is, etc.) and negative conditions (NOT in list, tag is NOT, etc.).
The 'AND' logic
With the 'AND' logic, the system will include contacts that meet all conditions in your segment. When using the 'AND' logic, the number of contacts will be fewer as they must meet all of the specified conditions.
Below are 3 examples outlined with the 'AND' logic and the expected outcomes:
Example 1: 'AND' logic with positive conditions
Imagine creating a segment using the 'AND' logic with the following positive conditions:
The system will then search for contacts that meet all 3 conditions and add them to the segment. A contact that does not meet all 3 conditions will not be added to this segment.
Example 2: 'AND' logic with negative conditions
Now, imagine creating the same segment using the 'AND' logic but with negative conditions:
In this case, the system looks for contacts that do not have any of the listed tags in the segmentation. These contacts are added to the segment. For example, if a contact has the tag 'purchase' but not the tags 'challenge' or 'e-book download', this contact will not be added to the segment. This is because they already do not meet the condition 'tag is NOT purchase'.
It is easier to view the 'AND' logic in combination with negative conditions as an 'and also not'. So: contact does not have the tag purchase, and also not the tag challenge, and also not the tag e-book download -> then this contact will be added to the segment.
Example 3: 'AND' logic with both positive and negative conditions
Imagine creating a segment with the 'AND' logic and a mix of positive and negative conditions:
The system will include contacts that have the tags 'purchase' and 'e-book download' and do not have the tag 'challenge'. If a contact has all three tags, they will not be included in the segment because they do not meet the condition 'tag is NOT challenge'.
The 'OR' logic
When using the 'OR' logic, the system will check each condition separately. This means that a contact only needs to meet one specified condition to be added to the specified segment. Conditions using this logic are not dependent on other specified conditions, which broadens your final results.
Below are three examples using the 'OR' logic and the results you can expect:
Example 1: 'OR' logic with positive conditions
Imagine creating a segment using the 'OR' logic combined with positive conditions:
This is how the system searches for contacts to add to the segment:
1. First, it checks if there are contacts with the tag 'purchase'. If so, these contacts are immediately added to your segment.
2. Then the system checks if there are contacts with the tag 'challenge'. Anyone with this tag will be added to the segment.
3. Lastly, the system checks if there are contacts with the tag 'e-book download'. All contacts with this tag will be added to the segment.
Since the conditions are evaluated separately, it will include contacts that meet any of the specified conditions. For example, if someone has the tag 'purchase' but not the tags 'challenge' or 'e-book download', this contact will still be added to the segment.
Example 2: 'OR' logic with negative conditions
If you create a segment using 'OR' logic combined with negative conditions:
This is how the system searches for contacts to add to the segment:
1. First, the system checks for contacts that do NOT have the tag purchase. If there are contacts without this tag, they are added to this segment.
2. Then the system checks for contacts that do NOT have the tag challenge. If there are contacts without this tag, they are added to the segment.
3. Lastly, the system checks for contacts that do NOT have the tag e-book download; these contacts are added to the segment.
Again, if a contact meets only one condition, they will be added to the segment. It does not matter if they meet another specified condition to be added to this segment.
This means that if a contact does NOT have the tag purchase, but DOES have the tag challenge, this contact will still be added to the segment. This is because this contact meets the specified condition 'tag is NOT purchase'.
If you want to exclude contacts that do NOT have the tag 'purchase' AND do NOT have the tag 'challenge' AND do NOT have the tag 'e-book download', we recommend using the 'AND' condition instead of 'OR' logic.
Example 3: 'OR' logic with both positive and negative conditions
If you create a segment using 'OR' logic and a mix of positive and negative conditions:
This is how the system searches for contacts to add to this segment:
1. First, the system checks for contacts with the purchase tag, they are then directly added to the segment.
2. Then the system checks for contacts that do NOT have the tag challenge, all of them are included in the segment.
3. Next, the system checks for contacts with the tag e-book download; these are added to the segment.
If a contact has the purchase tag AND does NOT have the challenge tag, they are also included in the segment. This is because this contact meets the first specified condition 'tag is purchase'.