Understanding Segment Conditions

read
Last updated at:

Overview

When building segments in Klaviyo, conditions are the building blocks that you customize to either include or exclude certain sectors of your audience. In a nutshell, profiles will only appear in your dynamic segments when they meet the specific conditions you make when creating the segment. In this article, you will learn more about segment conditions, how to filter conditions, and more.

New to Klaviyo and need inspiration for segmentation? Check out our Guide to Creating Segments. For information on how to join segment conditions, head to our Guide to AND vs. OR.

Segment Conditions

When building a segment, you can include or exclude people based on the following conditions:

  • What someone has done (or not done)
    You can choose from any activity tracked by Klaviyo — we call these events or metrics. To see a list of all metrics tracked in your account, head to the metrics section of your account.
  • Properties about someone
    You can segment based on attributes associated with profiles in your account — custom properties can be assigned via an integration or you can add them to profiles manually.
  • Where someone is located
    When targeting customers in the US, EU, Australia, New Zealand, or Canada, this option allows you to segment based on a certain radius of a specific zip code.

    For UK zip codes, we support filtering by outward code, not inward code or both outward and inward code (usually separated by a space). For example, if a person's full zip code is "SW1W 0NY", only the first piece ("SW1W") will work for these filters.

  • If someone is in or not in the EU (GDPR)
    This option is useful if you want to exclude people in the EU from a particular segment if you haven't collected GDPR compliant consent.
  • If someone is in or not in a list
    This option is great if you want to combine two or more lists or create a segment of a specific list, which is a best practice when sending campaigns.
  • If someone is or is not suppressed
    If you plan on sending a campaign to a segment, another best practice is to add this condition and exclude everyone who is suppressed in your account. This will give you a more accurate count of not only who meets the conditions, but also who you can email.
  • Predictive analytics about someone
    Predictive analytics allow you to segment based on CLV or predicted gender, which, in turn, can help you identify customers who are likely to become repeat purchasers, who are not likely to purchase again, and more. Please note that you will only see the CLV condition if you meet the criteria outlined in this article.

2019-03-14_15-34-07.png

You can have up to 26 conditions for a particular segment. In the following sections, we will go through each one of these options in more detail.

What Someone Has/Has Not Done

This condition allows you to segment profiles based on their activity. If you navigate to Analytics > Metrics, you will see all of the activity Klaviyo tracks through your different integrations. These metrics are available for segmentation using the What someone has done (or not done) condition.

For example, you can find all customers that have made at least two purchases:

2018-08-09_14-18-06.png

As you explore this condition, you can adjust and filter the following aspects of the metric you select:

  • Frequency: After selecting an activity, you can segment based on how often (or not often) people have done the activity. The allowed operators are:
    • at least once
    • zero times
    • equals (is exactly the number specified)
    • doesn't equal (is not exactly the number specified)
    • is at least (greater than or equals)
    • is greater than
    • is less than
    • is at most (less than or equals)
  • Timeframe: After choosing a frequency, you will also need to select a timeframe over which we'll count the number of events for each person. These calculations are based on UTC. The options here are:
    • over all time
    • in the last (within the last X days, weeks, or months)
    • between (between two relative dates, i.e. between 30 - 90 days ago)
    • before (before a specific date)
    • after (after a specific date)
    • between dates (between two specific dates) — note that this date range will include people from the first date specified and the end-date.

If you click the Add Filter button, you can further hone which types of events are counted. All metrics have a unique set of properties associated with them, and you can leverage these properties to be more specific about who you capture in your segment.

For example, if you have an Ordered Product metric that represents each time someone purchases a product, you might want to filter on the Variant Name property to find people who bought a specific product.

2018-08-09_14-07-22.png

Properties about Someone

This condition allows you to filter based on profile properties, i.e. the information you've collected about your contacts in Klaviyo. By default, you will have access to and can use the following Klaviyo properties to build a segment:

  • City
  • Country
  • Email 
  • First Active
  • First Name
  • Initial Source
  • Last Active
  • Last Name
  • Organization
  • State / Region
  • Unique ID
  • Zip Code

As you collect additional information about your contacts (i.e. custom properties), you can use this information to build segments. For example, if you collect data on Gender from newsletter subscribers, you will be able to segment based on gender.

2018-08-09_14-09-44.png

After selecting a profile property for segmentation, you will also be able to select an operatorThe options available will depend on the data type of the property. Below are the operators for string properties:

  • equals
  • doesn't equal
  • contains (property contains the string specified)
  • doesn't contain (property does not contain the string specified) — please note that this will not grab those with a value not set. For example, if you build a segment of people whose country does not contain United States, this will only pull in those with a country value set to something other than the United States, not those with the country value not set.
  • is in (property is in a set of values)
  • is not in (property is not in a set of values) 
  • starts with (property starts with the string specified)
  • doesn't start with (property does not start with the string specified)
  • ends with (property ends with the string specified)
  • doesn't end with (property does not end with the string specified)
  • is set (property exists for the profile)
  • is not set (property does not exist for the profile)

After choosing a property and an operator, the final piece is the dimension value. When you click, this value field will populate with a dropdown menu that features all available values given the property, operator, and data type selected.

If the property you select contains values that are numbers or dates, make sure to adjust the data type appropriately. Doing so will reveal type-specific operators and this will impact the values available for segmentation.

Below are the data types available:

  • String: string value of plain text
  • Number: integer value
  • Date: date/time value
  • Boolean: true or false value
  • List: array of values, e.g.  ["Offer1", "Offer2"]

Someone's Proximity to a Location

In the United States, Canada, Europe, Australia, and New Zealand, you can use postal codes to filter a segment by the location listed in a recipient's profile. This enables you to send regionally specific information to people who live at a set distance away from a location.

2018-09-12_11-44-05.png

If you have a brick-and-mortar store or an in-person event, this allows you to target your customers and brand enthusiasts who may be interested in attending.

Even if you don't have a physical store, you can use this feature to send information about regionally specific products (i.e. gloves in cold places during the winter) or send promotions to a certain area. Additionally, this allows you to use a signup form to create a popup that will display to a particular region, allowing you to personalize your recipient's experience on your website.

If Someone is In or Not In the EU (GDPR)

This condition can be used to identify people in the EU. This is useful if you would like to exclude these contacts from a particular segment to comply with GDPR.

2019-03-14_15-42-34.png

If Someone is In or Not In a List

This condition can be used to segment if someone is a member of (or not a member of) a specific list. This is an important condition to use if you are sending newsletter emails to a segment since you'll always want to make sure these recipients subscribed to your newsletter list before emailing them.

A few other key use cases for this condition include:

  • If you want to combine two or more lists, configure a segment to include everyone in these lists using this condition once for each list, using an "OR" connector to separate each condition.
  • If you want to create a segment of a specific list that captures a cross-section of that list. For example, the following segment will curate everyone in your newsletter list from the United States:
    2018-08-09_14-13-20.png

When segmenting based on whether or not someone is in a list, you can filter based on when that person was added to the list:

  • in the last (within the last X days, weeks or months)
  • between (two relative dates)
  • before (a specific date)
  • after (a specific date)
  • between dates (two specific dates) — note that this date range will include people from the first date specified, but not the end-date. Because the last date isn't actually included in your segment, add one day past the end-date to your time range in order to include your desired end-date.

2018-08-09_14-13-44.png

If Someone Is or Is Not Suppressed

Segments do not automatically exclude profiles that are suppressed (either because the users unsubscribed or emails to them bounced). If you'd like an accurate number of the people you can email that your segment is meant to capture, adding this segment condition is useful. Make sure to always add this condition using the AND connector after the previously added condition. While suppressed profiles will be skipped if you try to send an email to them, this condition is most useful when trying to get an accurate count.

2018-08-09_14-14-30.png

Predictive Analytics About Someone

Please note that you will only see all of the options listed below if you have:

  • At least 500 customers have placed an order. This does not refer to Active Profiles, but rather the number of people who have actually made a purchase with your business. If this section is on a profile but is blank, this means we don't have enough data on that individual to make a prediction.
  • You have an ecommerce integration (e.g. Shopify, BigCommerce, Magento) or use our API to send placed orders.
  • You have at least 180 days of order history and have orders within the last 90 days.
  • You have at least some customers who have placed 3 or more orders.

This can be used if you would like to segment based on customer lifetime value (CLV) or on their predicted gender. When using this the Predictive analytics about someone condition, you'll have the following options:

  • Predicted Gender
    Klaviyo’s gender prediction algorithm uses a customer’s first name along with census data to make a gender prediction of either likely male, likely female, or uncertain.
  • Historic CLV
    This is the sum of all the previous purchases an individual has made.
  • Predicted CLV
    This is a prediction of how many purchases a customer will make in the next year. It's not an exact prediction, so in some cases, you may see an impossible number of predicted orders. For example, you may see 1.43 as the number of predicted orders for a particular customer. This means we expect them to make one or two orders, but there’s a chance they'll make more or fewer. These expectations start to make sense when you group multiple customers together because you can predict the total number of orders or spend for the group. If we have five customers with a predicted number of purchases of 1.43, 0.25, 3.12, 0.78, and 2.97, we can expect approximately nine purchases across this group.
  • Total CLV
    This is the sum of the Historic CLV and Predicted CLV of a customer.
  • Predicted Number of Orders
    This is the predicted number of orders a customer will place over the next year.
  • Average Time Between Purchases
    This is an average of the number of days that have elapsed between each of a customer's purchases.

image7__1___1_.png

When building these segments, you can restrict your desired value to:

  • is at least
  • is at most
  • specified based on gender or uncertain

Filtering a Segment Condition

When building a new segment around what someone has done (or not done), you will have the opportunity to filter this action to refine your segment. You can do this by choosing an action, and then selecting Add Filter.

2018-08-09_14-29-55.png

You will then see an input that says Choose Property and then another empty input for a property value. Click the Choose Property field, and select the property you want to hone in on.
2019-08-20_16-03-28.png

After choosing your property, select a value for that property. A dropdown menu will also populate here with available values. The options in the dropdown are only those that have synced to your Klaviyo account.

2019-08-20_16-06-38.png

Additionally, Klaviyo will only pre-populate values for products that have already been purchased. If you're building a segment around a property value that does not yet exist in Klaviyo — for example, a new product in your store that nobody has purchased yet — you can copy and paste the value into the value box. If the property value you paste is identical to the value that will eventually sync to Klaviyo, the segment will work as expected.

2018-08-09_14-40-08_2.png

While Klaviyo may sync many details about a given metric, not all synced properties are available for segmentation. For data management purposes, only the primary details of an event are synced as top-level properties, and you can segment only these top-level properties.

If you view the raw data Klaviyo syncs for an event, you will see key data points for the event. For a Placed Order event, for example, you may see the following top-level properties:

  • Value
  • Collections / Categories
  • Item Count
  • Items
  • Source Name

You will see an array labeled "Extra" or "Details." While the data within an "Extra" or "Details" array is available to insert within an email template, you cannot segment based on properties nested within this array.

Custom Integrations & Segmentation

If you're building your own custom integration and deciding how to structure the data that you're sending to Klaviyo, make sure that all properties you want to segment on are sent as top-level properties (and are not nested).

For example, if you create a Placed Order metric where an event will track whenever someone completes a purchase on your site, you may want to filter events based on what item(s) someone purchased.

In order to do this, there has to be a top-level "ItemNames" array that includes all purchased product names — this would be in addition to a nested array with details for each item. Below, you can see the ItemNames array in the payload for this Placed Order event in addition to the Items array that contains detailed information about each product:

{
  "token" : "API_KEY",
  "event" : "Placed Order",
  "customer_properties" : {
    "$email" : "john.smith@gmail.com",
    "$first_name" : "John",
    "$last_name" : "Smith"
  },
  "$event_id" : "1234",
  "$value" : 29.98,
  "Categories" : ["Fiction", "Classics", "Children"],
  "ItemNames" : ["Winnie the Pooh", "A Tale of Two Cities"],
  "Brands" : ["Kids Books", "Harcourt Classics"],
  "Items" : [
    {
      "SKU" : "WINNIEPOOH",
      "Name" : "Winnie the Pooh",
      "Quantity" : 1,
      "ItemPrice" : 9.99,
      "RowTotal" : 9.99,
      "ProductURL" : "http://www.example.com/path/to/product",
      "ImageURL" : "http://www.example.com/path/to/product/image.png",
      "Categories" : ["Fiction", "Children"],
      "Brand" : "Kids Books"
      },
    {
      "SKU" : "TALEOFTWO",
      "Name" : "A Tale of Two Cities",
      "Quantity" : 1,
      "ItemPrice" : 19.99,
      "RowTotal" : 19.99,
      "ProductURL" : "http://www.example.com/path/to/product2",
      "ImageURL" : "http://www.example.com/path/to/product/image2.png",
      "Categories" : ["Fiction", "Classics"],
      "Brand" : "Harcourt Classics"
    }
  ],
  "time" : 1387302423
}

For more information on Custom Integrations, check out our article on Manually Importing Historical Event Data.

Additional Resources

 

x
Was this article helpful?
56 out of 108 found this helpful