Segment Conditions

read

Overview

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

  • What someone has done (or not done)
    Here, 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, click here.
  • Properties about someone
    Here, 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 or Canada, this option allows you to segment based on a certain radius of a specific zip code.
  • 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 are email-able.
  • 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

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.

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

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 drop-down menu will appear. This drop-down menu will populate with all top-level properties available for segmentation.
  • After choosing a property, you will be prompted to choose a value that you want to add a filter to. A drop-down menu will also populate here with available values. A value will only be pre-populated if it has been synced to Klaviyo along with an order, or another tracked event.
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.

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 only these top-level properties are segment-able.

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, properties nested within this array will not be segmentable.

Condition: 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:

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 and 90 days ago)
    • before (before a specific date)
    • after (after a specific date)
    • between dates (between two specific dates)

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.

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

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

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 value contains the string specified)
  • doesn't contain (property value 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 value is in a set of values)
  • is not in (property value is not in a set of values) 
  • starts with (property value starts with the string specified)
  • doesn't start with
  • ends with (property value ends with the string specified)
  • doesn't end with
  • 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 drop-down 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"]

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

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

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

Condition: 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; make sure to separate each condition with an "OR" connector
  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.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) -- this is fully inclusive, meaning it will include people from both the dates specified

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

Condition: 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 emailable people 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 head-count.

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

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

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

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 Joe meets one condition but doesn't meet another, Joe 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.

2018-08-09_14-15-46.png

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 Joe meets one condition in the sequence but does not meet another, Joe 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:

2018-08-09_14-15-08.png

Custom Integrations & Segmentation

If you are building your own custom integration, and are deciding what data to send to Klaviyo and how to structure this data, 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
}
x
Was this article helpful?
6 out of 18 found this helpful