Most ecommerce brands already hold enough data to segment their customers well: every order says who bought, what, when and for how much. This answer explains what customer segmentation is, how RFM analysis works in Shopify and Klaviyo as of 21 November 2026, how to build segments in Shopify and how to put them to use.

What is customer segmentation?

Shopify's help center puts it simply: "You can group customers who have similar characteristics into a customer segment." The point of the grouping is to treat groups differently. A first-time buyer, a lapsed regular and a high spender who ordered last week should not all get the same email.

Segments can be static lists or rules that update as customers change. In Shopify, a segment is a saved rule. The help center notes that "Each customer segment is a ShopifyQL query, and you can ask Sidekick to write one from a plain-language description."

Ways to segment ecommerce customers

The table below is our summary of the segment types ecommerce teams use most. Behavioral segments built from orders are usually the most useful because the data is already in your store and it predicts what customers do next.

Segment typeBuilt fromEcommerce example
Purchase behavior (RFM)Order dates, order counts and spendRecent high spenders, lapsed regulars
Lifecycle stageNumber of ordersProspects with no order, first-time buyers, returning buyers
Acquisition cohortDate and channel of the first orderCustomers whose first order came from a June sale
Product interestProducts and collections bought or viewedBuyers of a starter kit who have not bought refills
LocationShipping addressCustomers in a region with a shipping offer
Marketing permissionEmail and SMS consent statusSubscribed buyers only, for any campaign
Demographic or stated preferenceAccount fields, quiz and survey answersCustomers who said they shop for gifts

Shopify's own definitions are useful for lifecycle segments. "A first-time customer is a customer who placed their first order with your store." And "A returning customer is a customer who placed an order, and whose order history already includes at least one order."

What is RFM analysis?

RFM stands for recency, frequency and monetary value. Each customer gets a score on each of the three, and the combined scores place them in a named group. Shopify describes its version this way: "RFM analysis applies a 3-digit score to each customer, where each digit ranges from 1 to 5, and relates to the days from a customer's most recent purchase (recency), the total number of orders (frequency), and the total amount spent (monetary value), in order."

Scores are relative to your own store, not to other stores. Shopify says "RFM scores are based only on data from your store, and not on industry standards or third-party data." It adds: "For example, a score of 5 indicates that the customer is in the top 20% of the dimension for your store, and a score of 1 indicates that the customer is in the bottom 20% of the dimension for your store."

RFM in Shopify and Klaviyo compared

Both tools build RFM groups from order data, but the scoring rules differ. The facts below come from each vendor's help center, read on 21 November 2026. Tools are listed alphabetically.

KlaviyoShopify
Score range per dimension1 to 31 to 5
How scores are setRecency at 180 and 365 days by default. Frequency and monetary value at the 33rd and 66th percentiles of your customersRanked against your own store, with 5 for the top 20% and 1 for the bottom 20% on each dimension
GroupsNamed customer groups built from the three scores11 predefined RFM groups
Minimum dataAt least 500 customers who have ordered, 180 days of order history, orders in the last 30 days and some customers with 3 or more ordersNo minimum stated in the customers reports help page
PlanNeeds a paid add-on (Advanced KDP or Personalization) beyond the standard marketing appShown in the Customers reports in Shopify admin

Two scoring details matter when you read the results. Klaviyo notes that "Customers with the same value receive the same score, so the scores do not necessarily divide customers into equal thirds." It also counts only orders with a positive value, so free orders are left out. In Shopify, "Specific RFM scores for individual customers aren't displayed anywhere in your Shopify admin, as the most valuable insight is the customer's overall RFM group."

How Shopify turns scores into groups

Shopify combines frequency and monetary value into one number. "A customer's RFM group is determined based on a customer's recency score (R) and the average between their frequency score and their monetary value score using the formula (F + M) / 2." Then "When the FM calculation results in a decimal, it's rounded down to the nearest whole number."

Invented example: a customer scores R = 5, F = 4 and M = 5. Their FM value is (4 + 5) / 2 = 4.5, which rounds down to 4 (our arithmetic). Shopify then places them using R = 5 and FM = 4.

How to build customer segments in Shopify

  1. Start from a template or default segment. Shopify notes that "your Shopify admin includes some default customer segments and templates that you can change to suit your needs, or use as a starting point to create a new customer segment."
  2. Edit the filters. Segments are written in ShopifyQL, but you do not need to write code. "To customize your customer segment, update the values in the WHERE clause to include the filters that you want to use." Shopify adds that "The editor helps you to build your customer segments without requiring a deep knowledge of query languages."
  3. Use RFM groups as filters. "You can also manually apply the rfm_group attribute as a filter when building segments." For example, a winback segment can combine a lapsed RFM group with email consent.
  4. Turn strong cohorts into segments. Shopify says "You can use the data from the Customer cohort analysis report to create customer segments out of high-value customer cohorts." Our cohort analysis answer explains how to read those cohorts.
  5. Check the result before you use it. "An empty result right after running can mean that the segment is still updating, not that no customers match." And "If a filter that you expect is missing, then it usually means that there's no matching data in your store yet."

How to use segments well

These are Brand Media Works recommendations, not vendor rules.

  • Tie every segment to an action. If no campaign, offer or report changes because of a segment, delete it.
  • Start with five or six segments. New buyers, returning buyers, recent high spenders, lapsed regulars and inactive buyers cover most lifecycle email and paid media needs.
  • Keep consent in every segment you activate. Our first-party data answer covers consent rules for email lists and ad audiences.
  • Measure against a holdout. Keep a random slice of each segment out of the campaign so you can see the lift, not just the sales from customers who would have bought anyway.
  • Link segments to value. Segments based on purchase behavior pair naturally with customer lifetime value, so you can see what each group is worth over time. Track each group's retention rate as well.
  • Join identities first. If the same person has two customer records, they can land in two segments. Our answer on identity resolution explains how to merge them.

Brand Media Works builds customer segments, RFM models and the data pipelines behind them for ecommerce brands as part of its marketing analytics work.

Frequently asked questions

What are the main types of customer segmentation?

Marketers commonly group segments into four kinds: demographic, geographic, psychographic (values and interests) and behavioral. For online stores, behavioral segments built from orders, such as RFM groups, lifecycle stage and acquisition cohort, are usually the most useful because the data is already in your store. This grouping is our summary, not a vendor definition.

What is RFM segmentation in ecommerce?

It scores each customer on how recently they ordered, how often they order and how much they have spent, then places them in a named group. Shopify scores each dimension from 1 to 5 and uses 11 groups. Klaviyo scores from 1 to 3.

How many customers do I need for RFM analysis?

Klaviyo requires at least 500 customers who have placed an order and at least 180 days of order history. Shopify's customers reports help page does not state a minimum. In our view, with very few customers the score bands are too small to act on.

Can I see each customer's RFM score in Shopify?

No. Shopify shows the RFM group, not the 3-digit score. You can still narrow a group with extra filters, such as amount spent.

How often do RFM groups change?

Every time a customer orders or time passes without an order. Recency moves first, so a high-scoring customer who stops buying loses recency points before anything else changes.