Advanced segments take our basic audience segments to the next level with nested conditions that combine any and all logic. These advanced segments are highly customizable, so it might take some time to master their logic and filtering settings.
In this article, you'll learn about the logic that powers advanced segments.
Things to know
Here are some things to know before we get into the logic of advanced segmentation.
- Advanced segments are available with Mailchimp Premium and Mailchimp Pro.
- Before you read this explanation of advanced segmentation logic, you may want to review these advanced segmentation basics.
- 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 any or all logic that applies to the conditions within it. This means you can create a segment of contacts who meet any of your individual conditions, or all of them together.
|any||This logic tells our system to show you contacts who meet one or more of your conditions.||Any contacts from either Boston or Chicago.|
|all||This logic tells our system to show you contacts who meet all of your conditions.||All contacts who opened your last campaign and made a purchase in your store.|
Basic segments are limited to one type of logical relationship, but advanced segments can support both any and all logic together in one segment. This is because they contain groups of conditions that each use their own any or all logic. Think of an advanced segment as combining several basic segments into one.
Let’s say you wanted to view all of the subscribed contacts who opened your last email campaign and are either tagged Atlanta or have an address that contains Atlanta.
To do this, you’ll select all for the top-level logic. Then, you’ll choose Campaign activity > has opened as your first condition and set the timeframe and campaign as needed. Next, you’ll add a condition group that uses any 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 an advanced segment, check out Manage an Advanced Segment.
Applying the logic
It's important to think through the logic you plan to use when you build your advanced 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 any
Use any for the top-level logic in your segment when you want to find contacts who fulfill one or more of your conditions or groups of conditions.
Example: Find any subscribed contact who is either a faculty member or a new student.
This segment includes only subscribed contacts, uses any logic at the top level, and has one stand-alone condition and one group of conditions. The first condition looks for subscribers whose role is Faculty. The condition group uses all logic and looks for only those subscribers with the role of Student who were also added within the past 30 days. If a subscriber meets only one of the conditions outlined in the condition group, they would not be pulled into the segment.
When to use all
Use all as your top-level logic to find contacts who meet all of your conditions and condition groups.
Example: Find all students and faculty who are either engaged subscribers or who made an e-commerce purchase.
This segment includes only subscribed contacts, uses all logic at the top level, and has one stand-alone condition and one group of conditions. The first condition looks for subscribers whose role is either Student or Faculty. The condition group uses any 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 advanced segment is very complex, you might be able to simplify your logic so it will generate faster and more efficiently.
Advanced segments use a variety of operators that can look for one, all, or none of a variable, so consider whether a different operator might streamline your conditions. Familiarize yourself with our available segmenting options, so you can make the most of your conditions and condition groups.
Example: Find any subscribed contacts who are alumni, or students and faculty members who received the previous campaign but didn't open it.
This version of the segment uses separate groups of conditions to target subscribers with a Faculty role who have not opened the previous campaign, and subscribers with a Student role who have not opened the previous campaign.
This returns the subscribers we want, but we could get the same results with fewer conditions. Let's simplify it to just one stand-alone condition and one group of conditions.
To do this, choose Subscribed contacts and set the top-level logic to any. Then, choose Role > is > Alumni for the first condition. In the group of conditions, use all logic and look for Role > is > Student or Faculty along with the Campaign activity > was sent and Campaign activity > 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 advanced segments, you’ll use operators to exclude or include contacts based on a certain value in an audience field. Different types of operators vary in the way they handle empty audience fields.
For example, if you create an advanced segment of contacts whose address does not contain Atlanta, contacts who have a value other than Atlanta in the address field 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 fields.
|Operator||Will Segment Include Blank Values?|
|does not contain|
|is not blank|