
Understanding Logic in the Advanced Segment Builder
by Intuit•1• Updated 1 week ago
The advanced segment builder takes our basic segment builder to the next level with unlimited and nested conditions that combine “and” and “or” logic. It can take some time to learn how to create complex segments in Mailchimp. Segmentation is a useful tool that can be used to analyze audience data in a variety of ways once it is understood.
In this article, you'll learn about the logic that powers the advanced segment builder.
Things to know
Here are some things to know.
- The advanced segment builder is included with the Standard plan, or higher.
- Before you read this explanation of segmentation logic, make sure you’re familiar with these segmentation basics.
- To better understand how to use segmentation, check out these common segmentation combinations and a list of all the segmenting options.
- Basic segments are available to you if you don't need complex segmentation. Check out these common combinations and a complete list of segmenting options.
About the logic
All segmentation in Mailchimp uses “and” or “or” logic that applies to the conditions within it. Use this chart to understand how This means you can create a group of contacts who meet any of your conditions, or all of them together.
Logic type | Meaning | Example |
---|---|---|
or | This logic tells our system to show you contacts who meet one or more of your conditions. | Contacts from either Boston or Chicago. |
and | This logic tells our system to show you contacts who meet all of your conditions. | All contacts who opened your last email and made a purchase in your store. |
The basic segment builder can only support one "and" or "or" logic relationship. The advanced segment builder can support both "and" and "or" logic together in one segment. This is because advanced segments contain groups of conditions that each use their own “and” or “or” logic. Think of an advanced segment as combining several basic segments into one.
Example
Let’s say you want to view all of the subscribed contacts who opened your last email and are either tagged Atlanta or have an address that contains Atlanta.
To do this, use the Segment Filters drop-down to select and for the top-level logic. Next, in the Select or search a filter drop-down, choose Campaign interaction, then select has opened as the operator. Set the email campaign and timeframe as needed. This will make up your first condition.
Next, you’ll add a new condition group that uses “or” logic, then add the appropriate Tags and Address conditions to the group.
It should look something like this.
For step-by-step instructions on how to create a segment, check out Save and Manage Segments.
Applying and/or logic
It's important to think through the logic you plan to use when you build your segment. If you take the time to set up your segment correctly, it’ll be easier to manage and take less time to generate.
To determine the correct logic and conditions, it can be helpful to write a sentence that represents your segment. After you've defined the relationship between the conditions, and the goal of each, you'll be able to easily choose your segmentation options.
When to use "or"
Use or for the top-level logic in your segment when you want to find contacts who meet one or more of your conditions or groups of conditions.
Example: Find any subscribed contact who's either a member of the “Tropical” Plant Interest Types group, or the “Rare” Plant Interest Types group.
This segment includes only subscribed contacts, uses or logic as the top-level filter, and has 2 stand-alone conditions. The first condition is for members of the Tropical Plant Interest Types group. The second condition looks for members of the Rare Plant Interest Types group. If a subscribed contact doesn’t meet at least 1 of these conditions, they won't be pulled into the segment.
When to use "and"
Use and as your top-level logic to find contacts who meet all of your conditions and condition groups.
Example: Find all members of the Tropical Plant Interest Types group who are either engaged, subscribed contacts, or made an e-commerce purchase.
This segment includes only subscribed contacts, uses "and" logic as the top-level filter, and has 1 stand-alone condition and 1 group of conditions. The first condition looks for members of the Tropical Plant Interest Types group. The condition group uses or logic and looks for subscribed contacts who either have a high contact rating or made an e-commerce purchase.
When to simplify your logic
If your segment is very complex, you might be able to simplify your logic to help it generate faster and more efficiently. Familiarize yourself with the variety of segmenting options, and consider if a different operator would streamline your conditions.
Example: Find any subscribed contacts who are High Engagement, “or” find subscribed contacts who are New Clients “or” Plant Lovers who were sent the Welcome email “and” didn't open it.
This version of the segment uses separate groups of conditions to target subscribed contacts in the High Engagement Member Level field as well as New Clients and Plant Lovers who haven't opened the Welcome email.
This returns the subscribed contacts we want, but we can get the same results with fewer conditions. Let's simplify it to just one stand-alone condition and one group of conditions.
We'll choose Subscribed contacts and set the top-level logic to or. Then we choose our filter, which in this case is a custom audience field labeled Member Level. So we'll use Member Level > is > High Engagement for the first condition. Then, in the group of conditions, we'd again use the Member Level field and add Member Level > is > New Clients or Plant Lovers. We'll type the New Clients and Plant Lovers values directly into the open field and make sure to select Any from the Any/All drop-down to include either of those values in the segment. Lastly, we'd add Campaign interaction > was sent and Campaign interaction > has not opened conditions.
This version of the segment avoids repeating unnecessary queries, which should reduce the amount of time it takes for the segment to generate.
About operators and empty fields
When you create a segment, you’ll use operators to include or exclude contacts based on audience field values they share. Operator types may vary in the way they handle empty audience fields.
For example, if you create a segment of contacts whose address doesn’t contain Atlanta, contacts with a value other than Atlanta will appear in the segment. The system will also return contacts with an empty address field.
This chart shows which segment operators will include or exclude contacts with empty values in relevant audience fields.
Operator | Will Segment Include Blank Values? |
---|---|
is | ![]() |
is not | ![]() |
contains | ![]() |
does not contain | ![]() |
starts with | ![]() |
ends with | ![]() |
is greater than | ![]() |
is less than | ![]() |
is blank | ![]() |
is not blank | ![]() |
Sign in now for personalized help
See articles customized for your product and join our large community of QuickBooks users.
More like this
- About the Advanced Segment Builderby QuickBooks
- Getting Started with Segmentsby QuickBooks
- Manage an Advanced Segmentby QuickBooks
- Troubleshooting Advanced Segmentsby QuickBooks