Advanced segments take our basic audience segments to the next level with nested conditions that combine any and all logic. These advanced segments are super flexible and 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 underneath 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 use all for the top-level logic. Then, you’ll choose Open Activity 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 Create 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 and as efficiently as possible, it’ll be easier to manage and take less time to generate.
To determine the right 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 choose your segmentation options easily.
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 Subscribed contacts only, uses any logic at the top level, and has one stand-alone condition and one group of conditions. The first condition looks for contacts whose role is faculty. The condition group uses all logic and looks for contacts whose role is student and who were added within the past 30 days.
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 made an e-commerce purchase.
This segment includes Subscribed contacts only, uses all logic at the top level, and has one stand-alone condition and one group of conditions. The first condition looks for contacts whose role is either Student or Faculty. The condition group uses any logic and looks for subscribed contacts who either have a high member rating or made an e-commerce purchase.
When to simplify your logic
If your advanced segment is very complex, you might be able 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 faculty who have not opened the previous campaign and students who have not opened the previous campaign.
This returns the contacts we want, but we could accomplish the same thing with fewer conditions. Let's simplify it to just one stand-alone condition and one group of conditions.
To do this, we'll choose Subscribed contacts and set the top-level logic to any. Then, we’ll choose Role > is > Alumni for the first condition. In the group of conditions, we'll use all logic and look for Role > is > Student or Faculty along with the Sent Activity and Open Activity 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 wanted to create an advanced segment of contacts whose address does not contain "Atlanta,” the system will return contacts who have a value other than Atlanta in the address field, and would 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|