Please click here if you are using the legacy version of Cortex.
Not sure where to begin with Smart Segments? For more information on getting started with Smart Segments, click here!
Smart Segments is one of the most powerful tools available in Cortex for marketers looking to personalize and target their language. But building smart segments that meet your expectations can sometimes be a challenge. The first step to mastering segmentation within Retention Science is to first understand the logic and structure that drives our tool. This guide will build upon your knowledge of Smart Segments to help you build smart segments like a pro.
Part 1: Divide and Conquer
When you're building a complex filter dividing your statement conditions correctly is vital. Having too many or too few groupings can quickly break your filter logic. Make sure you pay careful attention to what goes in each of your "And" and "Or" groupings, and how they are nested!
Watch out for "Or" statements that are too inclusive. "Is subscribed (to email) is true" can never be included in an "Or" grouping. It will send to all your subscribers, ignoring all other filter conditions!
Watch out for unnecessary groupings! Looking at the example below, it's easy to read this as "Subscription to Box 1 or Box 2 equal to canceled or on hold" but with the extra division this actually reads "(Subscription to Box 1 or Box 2 is canceled) AND (Subscription to Box 1 or Box 2 is on hold)". This filter will only include someone who has subscribed more than once, with at least one gift box cancelled and the other gift box on hold, not anyone who has a box cancelled or on hold.
To build the filter "Any user with a cancelled or on hold subscription for box 1 or box 2", all of these conditions need to be in one large "or" grouping.
Watch out for unnecessary groupings! Looking at the example below, it's easy to read this as "Number of email opens for template A or B is equal to 0 or greater than 0" but with the extra division this actually reads "(Number of email opens for template A or B is equal to 0) AND (Number of email opens ofr template A or B is greater than 0)". This filter will only include someone who has opened template A but has not opened template B, or vice versa.
Part 2: Or is Blank?
When putting together your filters you may find an option staring back at you that's difficult to understand: "or is blank". This was previously labeled "include null values", because a null value is a blank space in our database.
Equal to, greater than, like, and other comparison filters require a value to make a comparison. Without a stored value, the query will return a value of "null" which from the computer's perspective cannot be compared. It is not greater or less than, equal or not equal, like or not like, it is simply null.
With your newfound knowledge, what do you think this example filter includes?
The filter will include all subscribed users with gender "f" and all users with no gender information specified. This filter is used by a brand with ~60% female customers, so for an unknown gender individual the better choice is to send female-focused content.
This example filter is designed to reach users who have purchased in the last 30 days. Should this filter include null values? Why or why not?
This filter should not include null values. A null value means there is no purchase data to compare against the 30 day window. This filter would include all users who have purchased with 30 days, and all users who have never purchased.
This next example filter is designed to reach users who have not opened an email in the last 90 days. Should this filter include null values? Why or why not?
This filter should include null values. Why? Because if a user has never opened an email they will not have any 'Last Email Open At' value and will not have a match for this filter.
Part 3: String Comparisons
A string is any piece of stored data that is stored as a series of characters instead of a numeric or binary value. The most common strings used for smart segments are Registration Source and location information such as City, State, and Zip Code.
The eight string comparison operators available are Equal To, Contains, Like, and In; and their "Not" counterparts.
Equal To / Not Equal To: This is the most straightforward comparison. It checks for an exact (but not case-sensitive) match between your entry and the entries in the database. Equal To / Not Equal To will return either the exact matches, or the entries that do not match. For example, let's say we wanted to send an email to all our West Coast users. Using the segment "State Equal To CA,OR,WA" would only return users who have state equal to all three of these desired states, resulting in a much smaller segment than expected. For use cases like this, use In/Not In rather than Equal To / Not Equal To.
Contains / Does Not Contain: This looks to see if your string is equal to or a part of the strings stored in the database. For example, if your brand runs multiple giveaways, "Registration Source Contains 'giveaway'" will return all users with any Registration Source that contains "giveaway."
Like / Not Like: This is a more advanced version of "contains" that uses special character formatting for more specific comparisons. _ can be used as a single nonspecific character, % represents an unlimited number of nonspecific characters. For example, we could use Zip Like 900__ or Zip Like 900% to return all users with zip codes in Los Angeles. The difference between these two is that 900% would also return matches for extended 9 digit zip codes such as 90012-1780.
In / Not In: This is an extended version of Equal To / Not Equal To. In this case the system runs a check to see if the value is equal to any one of the values submitted, or is not equal to any of the values submitted. Values are submitted as comma separated values. To send an email to all West Coast users we could use the segment "State In CA,OR,WA".
Part 4: Time Operators
Within Retention Science, all of the filter features that deal with timing provide you with a drop down that looks like this:
By Date: When using “By Date,” you are saying that you’d like to anchor your segment to some specific date on the calendar. For example, you may want to segment out users who have a signup date that is before or is December 31, 2016. Here, any user that has a signup date prior to the one specified will be scooped in.
By # Days: When using “By # Days,” you are looking to anchor a segment in relation to today’s date. For example, you may want to build a cohort of users that focuses on users that have “Last Email Open At” is within or Is 90 days in the past. Here, any user who has opened an email in the past 90 days will be added to this segment. This method always uses today as an anchor point for your query.
Now that you're armed with this knowledge it's time to make some great segments and reach the exact target audience for each carefully tailored communication!