Segment Conditions

Last updated at:


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.

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 all activities "events" or "metrics." To see a list of all metrics being tracked in your account, head to the metrics section of your account.
  • Properties about someone
    You can choose to segment based on attributes associated with profiles in your account -- custom properties can be assigned via an integration, or you can add properties 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 would like 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 campaign emails.
  • If someone is or is not suppressed
    If you plan on sending a campaign email 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 your segment's conditions, but also which profiles 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.


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 explore the Metrics tab of your account, you will see all of the activity Klaviyo tracks through your different integrations. All of 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:

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 and 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, 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.

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 some purchases a product, you might want to filter on the "Name" property to find people who bought a specific product.


Properties about Someone

This condition allows you to filter based on profile properties, i.e. the information you've collected on your contacts in Klaviyo. Out-of-the-box, Klaviyo you can use the following profile 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 will be able to use this information to build segments. For example, if you collect data on "Gender" from your newsletters subscribers, you will be able to segment based on gender.


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: datetime 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.


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 who are in the EU in case you would like to exclude these contacts from a particular segment.


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. Here are a few other key use cases for this condition:

  1. If you want to combine two or more lists, you can configure a segment to include everyone in these lists using this condition once for each list, using an "OR" connector to separate each condition.
  2. 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.pngWhen 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.


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.


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 particular customer will make in the next year. This is 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 the customer to make one or two orders, but there’s also a chance that 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 9 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.


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 first choosing an action, and then selecting the Add Filter option.


When you choose Add Filter, you will first see an input that says Choose Property and then another input that says Choose Value:

  • When you click within this empty Choose Property field, a dropdown menu will appear. This dropdown menu will populate with all top-level properties available for segmentation.
  • After choosing a property, you will be prompted to choose a value for the property that you just selected. A dropdown menu will also populate here with available values. The options in the dropdown are only those that have been 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 are looking to build 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 Choose 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.


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.

Using AND vs. OR to Add Conditions

Using the AND connector between conditions will make a segment more exclusive. We will check each condition separately AND individually, but each condition must evaluate to true in order for someone to be included. If someone meets one condition but doesn't meet another, that customer will be excluded from your segment.

In the following example, only those that are in our newsletter list AND also have placed an order at least once before will be included. So, if someone is in our newsletter list but hasn't placed an order, they will not be included.


Using the OR connector between a sequence of segment conditions will make the segment more inclusive. We will check each condition in the sequence individually. For example, if a customer meets one condition in the sequence but does not meet another, they will still be included in the segment.

In the following example, anyone who is in our newsletter list OR anyone that has placed an order at least once before will be included. So, this segment will capture everyone who is in our newsletter list as well as anyone who has ever placed an order, even if there is no overlap between them:


Custom Integrations & Segmentation

If you are 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" : "",
    "$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" : "",
      "ImageURL" : "",
      "Categories" : ["Fiction", "Children"],
      "Brand" : "Kids Books"
      "SKU" : "TALEOFTWO",
      "Name" : "A Tale of Two Cities",
      "Quantity" : 1,
      "ItemPrice" : 19.99,
      "RowTotal" : 19.99,
      "ProductURL" : "",
      "ImageURL" : "",
      "Categories" : ["Fiction", "Classics"],
      "Brand" : "Harcourt Classics"
  "time" : 1387302423

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


Was this article helpful?
47 out of 95 found this helpful