How to use and/or conditions in ActiveCampaign segments

Marketing_Lite_Plus_Professional_Enterprise

Sales_Plus_Professional_Enterprise

Creating segments using AND/OR logic can often be confusing, especially when segment results display information you're not expecting to see. In this document, we'll explain both "AND" logic and "OR" logic and explain how each works when using positive conditions (eg, is in list, tag exists, etc) and negative conditions (eg, not in list, tag does not exist, etc).

Example Contacts

Throughout this article, to help explain how each of the operators works in a segment, we will use the following example contacts and tags:

  • Jane Doe - Tags: engaged, champion, new
  • Martino Doe - Tags: engaged
  • Macy Doe - Tags: none

"AND" logic condition

With the “AND” logic condition, our system will include contacts who meet all conditions in your segment. Using “AND” logic narrows the number of contacts that match because each of these conditions must be met.

Below are three examples illustrating "AND" logic and what outcomes you can expect to see:

Example 1: "AND" Logic with positive conditions

Let's say you are creating a segment that is using “AND” logic with the following positive conditions:

Example 1 AND with positive conditions.png

Our system will look for and include contacts who meet all three conditions. A contact that does not meet at least one of the three conditions will not be included in the segment.

Use case with example contacts

How this works using the example contacts and the image above: 

  • Jane Doe is the only contact that will appear in this condition. They are the only contact with all three tags: "engaged," "champion," and "new." Therefore, they meet all three of the conditions

Example 2: "AND" logic with negative conditions

Now, let's say you are creating a segment using “AND” logic with negative conditions:

Example 2 AND negative conditions.png

Our system will look for and include only contacts who do not have all of the tags listed in your segment.

For example, if a contact has the “champion” tag but not the "new" tag, they will not be included in the above segment. This is because they failed the “Tag does not exist champion” condition.

Since we are using the "AND" logic condition, the segment will only match contacts that meet all conditions.

Use case with example contacts

How this works using the example contacts and the image above: 

  • Macy Doe and Martino Doe will both appear in this condition. They do not have the “champion” tag, and they do not have the “new” tag. Therefore, they meet all the segment conditions. Note that Macy Doe does not have any tags, so they also meet this segment
  • Jane Doe has both of the tags and will not appear

Example 3: "AND" logic with both positive and negative conditions

As a third example, let's say you are creating a segment that uses a mix of positive and negative conditions with the “AND” logic:

Example 3 AND positive and negative conditions.png

Our system will include contacts who have the “engaged” tag and who do not have both the “champion” and “new” tag.

Since we are using the “AND” logic condition, the segment will only match contacts that meet all these conditions.

Use case with example contacts

How this works using the example contacts and the image above: 

  • Martino Doe will appear because they have the “engaged” tag, and not the “champion” tag and not the “ new” tag
  • Jane Doe will not appear because though they have the “engaged” tag, they also have the “champion” and “new” tags. This condition is looking for contacts without the “champion” tag and “new” tags
  • Macy Doe will not appear and does not meet this condition because they do not have the “engaged” tag

"OR" logic condition

With the “OR” logic condition, our system will look at each condition independently. This means that contacts only need to meet one of your conditions in order to be included. Conditions in this type of segment are NOT dependent on each other, so “OR” conditions will broaden your results.

Below are three examples illustrating "OR" logic and what outcomes you can expect to see:

Example 1: "OR" Logic with positive conditions

Let's say you are creating a segment that is using “OR” logic with positive conditions:

Example 1 OR positive conditions.png

This is how our system looks for and includes contacts based on this type of segment:

  1. We will first check to see if any of your contacts have the "engaged" tag. If we locate any contacts with that tag, they are included in your segment.
  2. We will then check to see if any of your contacts have the "champion" tag. If we locate any contacts with that tag, they are also included in your segment.
  3. Lastly, we will check to see if any of your contacts have the "new" tag. If we locate any contacts with that tag, they are also included in your segment.

Because these conditions are independent of each other, it will include contacts who meet at least one of the three conditions. For example, if a contact has the "engaged" tag but does not have the other two tags, they will still be included in your segment.

Use case with example contacts

How this works using the example contacts and the image above: 

  • Martino Doe and Jane Doe will both appear because they have at least one of the tags in the segment
  • Macy Doe does not appear as they do not have any tags and do not meet the segment

Example 2: "OR" logic with negative conditions

Now, let's say you are creating a segment using “OR” logic with negative conditions:

Example 2 OR negative conditions.png

This is how our system looks for and includes contacts based on this type of segment:

  1. We will first check to see if any of your contacts do NOT have the "engaged" tag. If we locate any contacts that do not have that tag, they are included in your segment.
  2. We will then check to see if any of your contacts do NOT have the "champion" tag. If we locate any contacts that do not have that tag, they are also included in your segment.
  3. Lastly, we will check to see if any of your contacts do NOT have the tag "new." If we locate any contacts that do not have that tag, they are also added to your segment.

Again, since we are using the "OR" logic condition, a contact only needs to meet one of those conditions in order to be included in your segment. It does not matter if they do not meet the other conditions. They will still be included in your segment.

This means that if a contact does NOT have the "new" tag but DOES have the "engaged" tag, they will be included in your segment. This is because they met the “Tag does NOT exist new” condition.

If you want to exclude contacts who do not have the "new" tag, and who do not have the "engaged" tag, and who do not have the "champion" tag, then we recommend using an “AND” statement rather than an “OR” statement.

Use case with example contacts

How this works using the example contacts and the image above: 

  • Martino Doe appears because although he does have the “engaged” tag, he does not have the “champion” tag and therefore meets the “Tag does NOT exist champion” condition. Since Martino meets at least one condition, they will appear in the segment. However, Martino also meets the “Tag does NOT exist new” condition
  • Macy Doe appears because she does not have any tags and meets the “Tag does NOT exist engaged” condition. Again, since Macy meets at least one condition, they will show up in the segment, but they technically meet all three conditions
  • Jane Doe will not appear as she has all three of these tags and doesn’t meet any of the conditions

Example 3: "OR" logic with both positive and negative conditions

As a third example, let's say you are creating a segment that uses a mix of positive and negative statements with the “OR” logic condition:

Example 3 OR positive and negative conditions.png

This is how our system looks for and includes contacts based on this type of segment:

  1. We first look for contacts who have the "engaged" tag. If we locate any contacts who have that tag, they are included in your segment.
  2. We then look for contacts who do NOT have the "champion" tag. If we locate any contacts who do NOT have that tag, they too are included in your segment.
  3. Lastly, we'll look for contacts who DO have the tag, "new." If we locate any contacts who DO have that tag, they too are added to your segment.

Again, since we are using the "OR" logic condition, a contact only needs to meet one of those conditions in order to be included in your segment. It does not matter if they do not meet the other conditions. They will still be included in your segment.

Use case with example contacts

Using our example contacts and the image above, all three appear. Here is why:

  • Macy Doe appears because they do not have any tags and meet the “Tag does NOT exist champion” condition. Since Macy meets at least one condition, they will appear in the segment. However, they also meet the “Tag does NOT exist new” condition
  • Martino Doe appears because they have the engaged tag and meet the “Tag exists engaged” condition. Since Martino meets at least one condition, they will appear in the segment. However, they also meet the “Tag does NOT exist engaged” and “Tag does NOT exist champion” conditions
  • Jane Doe appears because they have the engaged tag and meet the “Tag exists engaged” condition

Because these contacts each meet at least one of the conditions, they appear in the segment.

Was this article helpful?
31 out of 59 found this helpful

Have more questions? Submit a request

Start free trial