To find groups of similar users in your project, you'll need to set up a segmentation query that searches for shared attributes or event histories among your users. This article describes how to do that.
In this article
Steps
A segmentation query includes one or many criteria groups, each of which can contain one or many search criteria. You can choose whether a user must satisfy all, any, or none of the criteria groups — and, within a single criteria group, you can choose whether a user must satisfy all, any, or none of the included search criteria.
Let's say you're a marketer at Fiterable, and you're in charge of increasing attendance for the fitness classes your brand hosts in Paris, France. You need to create a list of users who have never signed up for a fitness class and who live in Paris. Let's walk through how to create a segmentation query that finds these users.
Step 1: Set up criteria group(s)
The first step is to decide whether you need a single criteria group or multiple. When you open the Segmentation page to begin creating a new query, the query builder automatically includes one criteria group. To add additional criteria groups, click Add A New Group.
In our example, we want users who don't have one characteristic and who do have another, so we'll need to set up at least two criteria groups.
Step 1.1: Select your logical operator(s)
Next, you'll need to specify which and how many criteria your users need to meet to qualify for your segment. To do this, you'll select one of three search operators at the beginning of your query and at the beginning of each criteria group. There are three logical operators to choose from:
All
(default) – Users who satisfy all of your specified criteria will be included in the segment.Any
– Users who match at least one of your specified criteria will be included in the segment.None
– Users who don't match any of your specified criteria will be included in the segment.
The search operator at the top of the entire segmentation query determines which criteria groups a user must satisfy in order to be included in the segment (all of the criteria groups, any of the criteria groups, or none of the criteria groups). Similarly, the operator at the top of each criteria group determines which search criteria in that group a user must satisfy in order to be included in the segment (all of the group's search criteria, any of the group's search criteria, or none of the group's search criteria).
There are three possible configurations:
-
All
(default selection) =Must Have
,And
-
Any
=Must Have
,Or
-
None
=Can't Have
,Nor
In our example, we'll need to select None
for the first criteria group
(containing the characteristics we don't want users to have) and All
for the
second criteria group (containing the characteristics we do want users to have).
Since we want to find users for whom both of these conditions are true, we'll
need to select All
for the top-level operator.
Step 1.2: Specify your desired attributes
Specify the attributes that make users eligible for the segment. You can add multiple requirements for user or event attributes within a group of search criteria.
Let's say Fiterable has a custom event called classSignup
that indicates when
users sign up for fitness classes and a user data field called zipCode
that
indicates where users live. To segment by this information, we'll select
Custom Event > classSignup
in the first criteria group and
Contact Property > zipCode
in the second criteria group.
For a full list of the attributes you can select in a segmentation query, see Segmentation Reference.
Step 1.3: Choose your comparator(s)
Next, choose a comparator for each user or event data field that's part of your search criteria. The comparators that appear in each dropdown depend of the data type of the user or event data fields you selected in the previous step.
In our example, for the first criteria group, we're trying to find users who
have no instances of the classSignup
custom event. Therefore, we should select
the Is Set comparator. Since we selected the None
operator for this group,
this tells Iterable to exclude users who have ever signed up for a class from
the segment.
For the second criteria group, we want to find users who live in any of the
Paris ZIP codes. Here, we should select Is One Of. This comparator lets you
specify a list of possible values that make users eligible for the segment. Since
we selected the All
operator, this tells Iterable to include users whose
zipCode
value is one of the Paris ZIP codes in the segment.
For a full list of the comparators Iterable supports, see Segmentation Reference.
Step 1.4: Specify your desired value(s)
Once you've chosen your comparators, select or enter the desired value(s) for the fields you selected.
In our example, we don't need to specify a value for the first criteria group (the Is Set comparator doesn't take a value). For the second criteria group, we'll need to enter the 21 possible ZIP codes for Paris. We can do this by individually typing them into the text entry box or copying and pasting a list of the values (separated by commas).
Step 1.5 (Optional): Refine your search
If you select an event as one of your criteria, you can specify a particular number of instances of the event to narrow your search and identify groups of users for whom a particular event has occurred a specific number of times. For example, you might want to target customers who have made two purchases or received three emails.
-
With an event selected, click Refine Search.
-
Select an option for how many instances of the event a user should have:
- Any – Any number of instances of the event
- Exactly – A specific number of instances (for example, 3)
- Between – A range of instances (for example, 3-5)
-
If desired, enter the exact number or range of instances you want to search for.
Step 2: Run your search query
Click Refresh Results to run the query and see all of the users who fit your specified criteria.
You can click any email address or user ID in the results to view a specific user's profile.
NOTE
If you set up a query that searches for users who have received a certain
campaign (for example: Email Send
where Campaign
Equals
(CAMPAIGN NAME)
) and you select multiple campaigns, the results will
reflect users who have received at least one of those campaigns (not
necessarily all of them).
To learn about segmentation and recurring campaigns, see Determine Whether a Recurring Campaign Was Sent to a Specific User.
Step 3: Save your results
Once you have the results of a segmentation query, you can save the group of users as a list for sending or suppressing campaigns. To do this, click Save List and select whether you want to save the results as a static or dynamic list.
Saving the results of a query as a static list
- Enter a name and description for your static list.
- (Optional) If desired, set a maximum list size. For example, if your search results exceed the list size limit of 5 million users, you could enter "5000000" to cap the size of the list.
- (Optional) If desired, click Add List to split your search results into more than one list. For example, if your search results exceed the list size limit of 5 million users, you could split the results into two lists, each with a list size of 2500000.
- Click Create.
When you're ready to use your list to send or schedule a message, create a campaign and select the name of the list as the audience.
NOTE
When you use the Segmentation tool to create a static list, there is a list
size limit of 5 million users. Alternatively, you can create a list
from the Lists page (size limit 2 GB) or use the POST /api/lists/subscribe
API endpoint.
Saving the results of a query as a dynamic list
- Enter a name and optional description for your list.
- Click Create.
- The list will automatically update over time as new users become eligible for the list and existing users become ineligible.
When you're ready to use your list to send or schedule a message, create a campaign and select the name of the list as the audience.
Exporting a segment
Sometimes you may want to save a segment in order to use it outside of Iterable. To do this, you can export the results of your query.
Click Export As.
-
Select whether you want to export the results as a CSV file or a Facebook Custom Audience.
NOTE
To export segments as Facebook Custom Audiences, you must have a Facebook Ad account and set up the Facebook integration for your Iterable project on the Integrations > Facebook page.
-
To export a CSV file – Select which fields to include in the exported file, then click Export.
-
To export a Facebook Custom Audience – Select your Facebook Ad account ID, give your audience a name and description, and click Export.
-
Example use case
Determine whether a recurring campaign was sent to a specific user
To check whether or not Iterable ever sent a specific recurring campaign to a particular user, set up a query like this:
It's not possible to use Segmentation to determine whether or not a user has ever opened or clicked any email from a recurring campaign. However, you can determine whether or not they've opened or clicked a specific instance of that recurring campaign.
Tips and best practices
Using relative dates
It's possible to search for users using relative dates — time frames that differ for each user based on triggering event data (like the amount of time that has passed since they signed up to receive marketing messages from your brand). For tips on using relative dates in segmentation queries, see Relative Dates.
Case sensitivity and formatting
Searches are case- and formatting-sensitive (a search for a value of multicity
will yield different results than a search for multiCity
or multi-city
). For
the most accurate segmentation results, be sure to check your search values for
correct formatting, capitalization, spelling, and typos.
Reducing query complexity
To help maintain system performance, overly complex queries can't be saved. In the rare circumstance that you receive a warning, don't panic! You can make your query more efficient by grouping conditions where possible.
For example, this query contains 10 conditions to find all ZIP codes in a certain area:
user.zipCode=80020 OR user.zipCode=80021 ... OR user.zipcode=80029
Instead of specifying 10 separate conditions like this or using a regular
expression (RegEx) to run a search on all possible variants of the 8002*
ZIP
codes, you could use the Is One Of comparator to specify all of the ZIP
codes you're interested in within a single query condition. Using the
Is One Of / Is Not One Of comparators results in a simpler, more
performant segmentation query.
If you see a warning and you're unable to reduce your query's complexity, reach out to technical support for help.