How to Segment Customers in Ecommerce: A Step-by-Step Method
A 6-step method to segment ecommerce customers: the main types, RFM with a worked example, payment and subscription segments, Shopify and Klaviyo setup.
Article summary
TL;DR
To segment customers, start from one business question, pull the data that answers it (orders, checkout, subscription and payment events), write a rule that splits customers into groups, check each group is big enough to test, act on it, and measure against a holdout. RFM (recency, frequency, monetary value) is the usual first model.
- A segment is a rule, not a list: customers enter and leave it as their data changes. Shopify and Klaviyo segments both work this way.
- Start from the decision the segment will change. A segment that changes no message, offer or exclusion is a report, not a segment.
- RFM scores each customer 1 to 5 on recency, frequency and spend. Shopify assigns 11 RFM groups automatically and lets you filter on them.
- Payment segments matter as much as marketing ones: failed renewals, refunders and customers with an open dispute need different treatment, often an exclusion.
- Small segments can't be tested. Check the size before you build a campaign, and keep a holdout to measure what the campaign actually changed.
On this page
Segmenting customers means splitting them into groups that should be treated differently, then treating them differently. For an online store, the useful groups come from orders, checkout and subscription data, not from personas. This guide gives a six-step method, the main segmentation types, RFM with a worked example, the payment segments most guides skip, and how to build all of it in Shopify and Klaviyo.
What is customer segmentation?
Customer segmentation is dividing your customers into groups that share a trait or a behavior, so each group can get its own message, offer or exclusion. "Bought twice, nothing in 90 days" is a segment. So is "renewal failed this week" and "lives in Canada".
In current tools, a segment is a rule, not a list. Shopify describes its customer segments as "dynamic, rule-based customer lists": customers are added or removed automatically as they meet the criteria or stop meeting them.1Shopify Help Center, Customer segmentation Klaviyo says the same of its segments, which update "in close to real time", while its lists only grow when people subscribe or are added.5Klaviyo Help Center, Getting started with segments That matters: a CSV exported last month doesn't know who ordered, refunded or disputed since.
A segment has to change something
If you can't name the message, offer, price, channel or exclusion that changes for a group, it isn't a segment yet. It's a report. Write the action next to the rule before you build it.
How to segment customers in 6 steps
The method below works for a store with a few hundred customers and for one with a few hundred thousand. Only the tooling changes.
- Ask one question. "Which customers are about to stop buying?" or "Who should never get a discount?" One question, one decision.
- List the data that answers it. Usually orders, checkout events, subscription status and payment events. Check where each lives and how fresh it is.
- Write the rule. Plain conditions over fields and time windows: "2+ orders, last order more than 90 days ago, subscribed to email".
- Check the size. Count the customers who match. Too few to test means merge it with another segment or widen the window.
- Act. Attach one action to the segment: a flow, a campaign, an on-site offer, a customer list for ads, or an exclusion.
- Measure with a holdout. Keep a random share of the segment out of the action and compare orders and margin, not clicks.
Steps 4 and 6 are the ones most teams skip. They're also the ones that tell you whether the segment was worth building.
Step 1: start from a business question
The question decides which data you need and which method fits. Shopify's own guide to ecommerce segmentation recommends the same order: goal first, then data, then segments. The table pairs common store questions with a first segment and the metric that will judge it.
| Question | First segment to build | Action | Judge it on |
|---|---|---|---|
| Who is about to stop buying? | Repeat buyers past their usual reorder gap | Reminder, new product, reorder link | Orders vs holdout within 30 days |
| Who should never get a discount? | Customers who buy at full price | Exclude from promo campaigns | Margin per customer |
| Which subscribers will churn without meaning to? | Renewal failed, subscription still active | Card update request, retries | Subscriptions active 30 days later |
| Who should we stop advertising to? | Active subscribers and buyers from the last 30 days | Exclude from prospecting ads | Cost per new customer |
| Which first-time buyers will come back? | First order in the last 14 days | Onboarding emails, then a review request | Second-order rate |
| Who should we not market to at all right now? | Open dispute or pending refund | Suppress from all promotions | Disputes and complaints |
Step 2: the data you need
Most store segments need four sources: the store or order system, the checkout, the subscription billing system, and the payment processor. Email and SMS engagement come from the messaging tool. What the customer told you (quiz answers, preferences) is zero-party data and usually lives in a form or survey tool.
Fig. 1What one customer looks like to a segment rule
- Last order
- 64 days ago · $58
- Orders and spend
- 5 orders · $312 total
- Subscription
- Monthly refill · renewal failed 2 days ago
- Refunds and disputes
- 1 partial refund in March · no dispute
- Email consent
- Subscribed
- Country
- United States
Illustrative record.
each field comes from a different system
Before building on these fields, check three things:
- One customer, one record. If the same person exists under two emails in the store and in the billing tool, their order count and recency are wrong everywhere. How records link together is covered in what CRM databases are.
- Shared definitions. "Active subscriber", "churned" and "repeat buyer" must mean the same thing in every tool. Otherwise two segments with the same name hold different people.
- Freshness. A payment segment that syncs once a day will email a customer about a failed renewal hours after they fixed it.
Types of customer segmentation
Most guides list four classic types: demographic, geographic, psychographic and behavioral. Ecommerce adds value-based segmentation, and stores with subscriptions need a sixth, built on payment and billing state.
| Type | Based on | Ecommerce example | Best for | Limit |
|---|---|---|---|---|
| Demographic | Age, gender, income, household | Gift guide for parents | Creative and product positioning | Says little about intent |
| Geographic | Country, region, climate, language | Currency, shipping promise and local payment methods by country | Pricing, delivery, payment options, timing | Same country, very different buyers |
| Psychographic | Values, lifestyle, motivations | "Buys for performance" vs "buys for taste" from a quiz | Messaging and offers | Needs surveys or quizzes to collect |
| Behavioral | Views, carts, orders, engagement | Abandoned checkout, browsed a category twice | Triggered flows and on-site content | Needs clean event tracking |
| Value-based | Spend, order count, recency, lifetime value | RFM groups, top 10% by 12-month spend | Who gets VIP treatment, who gets discounts | Ignores margin unless you add it |
| Payment and subscription | Renewal status, failed payments, refunds, disputes | Renewal failed, open dispute | Dunning, exclusions, retention | Lives in the billing and payment tools |
Behavioral segments get their own guide: what behavioral targeting is covers the signals, first-party data and the legal limits on profiling, including for health-adjacent products. Value-based and payment segments are where most stores get the fastest results, so the next two sections go deeper.
RFM segmentation explained
RFM is the standard way to segment by value using only order data. Every store already has the three inputs.
Recency
Days since the customer's last order. The fewer, the higher the score. Recent buyers are the most likely to buy again.
Frequency
Number of orders. A customer who ordered five times has a habit; a one-time buyer doesn't yet.
Monetary value
Total amount spent. Separates the customer who orders often at low value from the one who orders big.
Each dimension gets a score from 1 to 5, relative to your own customers. Shopify's method is a good reference because it's documented: a score of 5 means the customer is in the top 20% of that dimension for your store. Shopify then averages frequency and monetary into one FM score, rounded down, and places each customer in a group from R and FM.4Shopify Help Center, Customers reports (RFM customer analysis)
A worked RFM example
Take ten customers of a store, scored on October 1. With ten customers, each quintile holds two: the two most recent buyers get R = 5, the next two R = 4, and so on. Same for orders (F) and spend (M).
| Customer | Days since last order | Orders | Total spent | R | F | M | FM |
|---|---|---|---|---|---|---|---|
| A | 5 | 9 | $640 | 5 | 5 | 5 | 5 |
| B | 12 | 6 | $410 | 5 | 4 | 4 | 4 |
| C | 20 | 1 | $45 | 4 | 1 | 1 | 1 |
| D | 35 | 4 | $260 | 4 | 3 | 3 | 3 |
| E | 48 | 2 | $90 | 3 | 2 | 2 | 2 |
| F | 70 | 3 | $150 | 3 | 3 | 3 | 3 |
| G | 95 | 7 | $520 | 2 | 5 | 5 | 5 |
| H | 140 | 5 | $330 | 2 | 4 | 4 | 4 |
| I | 210 | 1 | $60 | 1 | 1 | 1 | 1 |
| J | 300 | 2 | $75 | 1 | 2 | 2 | 2 |
How the groups are assigned
Shopify's rules: Champions R = 5 and FM above 3. Loyal R 3 or 4 and FM above 3. Active R 4 or more and FM 2 or 3. New R = 5 and FM 1 or less. Promising R = 4 and FM 1 or less. Needs attention R = 3 and FM = 3. Almost lost R = 3 and FM 2 or less. At risk R 2 or less and FM 3 or 4. Previously loyal R 2 or less and FM above 4. Dormant R 2 or less and FM 2 or less. Prospects have no order.4Shopify Help Center, Customers reports (RFM customer analysis)
Applied to the ten customers, and with what to do for each group:
| Customer | RFM group | What it means | What to do | What not to do |
|---|---|---|---|---|
| A, B | Champions | Recent, frequent, top spenders | Early access, referral program, ask for reviews | Send them your deepest discount |
| C | Promising | Recent first order, low spend | Product education, replenishment reminder | Push a subscription on day 2 |
| D | Active | Recent, some orders, moderate spend | Recommendations from past purchases, loyalty program | Treat them like new customers |
| E | Almost lost | Not that recent, few orders | Useful content, a reason to come back | Spend ad budget to win them back first |
| F | Needs attention | Middling on every score | Offer based on what they bought before | Leave them in the general newsletter only |
| G | Previously loyal | Was a top customer, gone quiet | New products, personal win-back, ask why | Ignore them because recency is low |
| H | At risk | Strong history, not recent | Personal outreach, an offer worth coming back for | Wait until they're Dormant |
| I, J | Dormant | Old, rare, low spend | Newsletter only, or let them go | Spend on retargeting |
The "what to do" column follows the goals Shopify gives for each group (move Promising and New to Active, Loyal to Champions, keep Champions as advocates).4Shopify Help Center, Customers reports (RFM customer analysis) The point of RFM is visible in G and H: by recency alone they look lost, but their history says they're the customers most worth a personal message.
RFM for subscription brands
RFM was built for repeat one-time purchases. With subscriptions, every renewal counts as an order, so a subscriber who never chose to buy again still scores high on frequency. Two fixes: compute RFM on one-time orders only and segment subscribers by subscription state instead, or keep RFM and always read it next to subscription status. A subscriber in "Champions" whose renewal just failed belongs in the payment segment below first. Lifetime value by customer is covered in what CLTV is.
Payment and subscription segments
Marketing guides rarely mention them, but billing and payment data produce some of the most important segments a store has. Most of them change what you should not send.
Stripe's subscription statuses are a good map. past_due means payment on the latest invoice failed or wasn't attempted; Stripe may retry while the subscription is in that state. unpaid means retries are over but the subscription still exists, and Stripe says to revoke access at that point. canceled is final.6Stripe Docs, How subscriptions work (subscription statuses) Your billing tool may use other names, but the states are the same.
- Renewal failed, subscription still active (past due)Involuntary churn risk. The customer didn't decide to leave; the card failed.Card update request and retries. No discount, no win-back copy.
- Retries exhausted (unpaid or canceled after failure)The subscription is lost unless the customer actsOne clear message with an update link, then a separate win-back later
- Card expiring next monthNext renewal will fail unless the card is updatedAsk for a new card before the renewal, not after
- Skipped or paused twice, support contact recentlyVoluntary churn riskPlan change, frequency change, a call from support
- Two or more refunds in 6 monthsProduct fit or quality problem, or refund abuseExclude from upsells and discounts; route to support
- Open disputeThe bank is deciding the payment. You can't refund it outside the dispute.Suppress from every promotion. Respond to the dispute, don't market to it.
- Dispute lost or customer blockedRecurring riskPermanent exclusion from marketing and from new subscriptions
The open-dispute row is a hard rule, not a preference. Stripe states that you can't issue a refund outside the dispute process while the dispute is open.7Stripe Docs, How disputes work A promotional email to that customer for the disputed product helps nobody. The retry and email sequence for failed renewals is covered in dunning and failed payment recovery and subscription payment failures; how to keep disputes from happening is in chargeback prevention.
A failed-payment message is not a marketing message
Keep the card update email about the card. Under US CAN-SPAM rules, adding a promotion and leading with it can turn a transactional message into a commercial one. The rules are summarized in behavioral targeting.
Inside Tagada
Build the funnel once, route every customer to the right offer
Checkout, upsells and subscriptions on one flow, with conditions per country, order or customer.

Segments vs cohorts
A cohort is a group defined by when customers started: everyone whose first order was in March, everyone who subscribed during a launch. A segment is defined by what is true about customers now. Both are useful; they answer different questions.
| Segment | Cohort | |
|---|---|---|
| Defined by | Current data (status, spend, recency) | A start date or first event |
| Membership | Changes as customers change | Fixed once the start date has passed |
| Answers | Who should get this message today? | Are customers from March retaining better than from January? |
| Example | Repeat buyers with no order in 90 days | Customers whose first order was in March 2026 |
| Used for | Campaigns, flows, exclusions | Retention curves, LTV over time, testing what changed |
The two work together: a cohort table shows that customers acquired through one campaign stop buying after the second order, and a segment then targets that group before the third. How to build and read a retention table is in what cohort analysis is.
Step 4: check the segment size before you act
A segment you can't measure is a guess. The number of customers you need depends on how often the outcome happens and how small a difference you want to detect. The chart shows how many customers you need in each group (targeted and holdout) to detect a 20 to 25% relative change in the conversion rate.
Fig. 2Customers needed per group to detect the change
rarer outcome, bigger segment needed
What this means in practice:
- Rare outcomes need big segments. A win-back email that turns 2% of lapsed customers into buyers needs tens of thousands of customers in total to be measured. Most small stores can't test it per segment.
- Merge segments that would get the same action. "At risk" and "Previously loyal" can share one win-back campaign and one holdout.
- Widen the window instead of shrinking the segment. Run the test for longer, or measure a more frequent outcome (any order within 60 days rather than a specific product).
- Some segments don't need a test. Exclusions (open dispute, unsubscribed) and service messages (failed renewal) are done because they're right, not because they lift revenue.
Steps 5 and 6: act, then measure with a holdout
Each segment gets one action and one holdout. The holdout is a random share of the segment that gets nothing. It's the only way to know what the campaign changed, because many customers in a segment would have bought anyway.
Fig. 3One segment, one action, one holdout
- Targeted groupGets the win-back sequence
- HoldoutRandom share, gets nothing from this campaign
- ResultOrders, revenue and margin per customer, both groups, same period
the comparison is between the two branches, never against last month
Three rules make the comparison honest:
- Split at random, before sending. Not "people who opened" versus "people who didn't".
- Compare orders and margin, not opens or clicks. Margin matters most for discount campaigns: a coupon that goes to people who would have bought at full price loses money while showing great conversion.
- Measure over the same period. Seasonality makes "this month vs last month" useless.
Where the action runs (email, SMS, on-site, ad audiences built from customer lists) and how automations use these segments is covered in commerce marketing automation.
How to build customer segments in Shopify
Shopify builds segments in the customer segment editor with a query language: you combine filter names, operators and values into a query.1Shopify Help Center, Customer segmentation Several filters are joined with AND (the customer must meet all of them) or OR (one is enough). Without brackets, AND is evaluated before OR, and Shopify recommends grouping filters with brackets.3Shopify Help Center, Components of a customer segment
-- At risk customers you can email rfm_group = 'AT_RISK' AND email_subscription_status = 'SUBSCRIBED' -- First-time buyers from the last 30 days number_of_orders = 1 AND first_order_date >= -30d -- Big spenders who have gone quiet amount_spent > 500 AND last_order_date < -90d -- Abandoned a checkout this week abandoned_checkout_date >= -7d -- Bought a tagged product in the last 3 months products_purchased MATCHES (tag = 'refill', date BETWEEN -3m AND today) -- Exclusion list kept with a customer tag customer_tags CONTAINS 'dispute_open'
The filters worth knowing, all from Shopify's reference:2Shopify Help Center, Shopify-based customer segment filters
rfm_grouptakes Shopify's own RFM groups:'CHAMPIONS','LOYAL','ACTIVE','NEW','PROMISING','NEEDS_ATTENTION','ALMOST_LOST','AT_RISK','PREVIOUSLY_LOYAL','DORMANT','PROSPECTS'. You get the RFM model without computing it.predicted_spend_tier('HIGH','MEDIUM','LOW') is only available once the store has made more than 100 sales.email_subscription_statusandsms_subscription_statuskeep consent in the rule itself. Put them in every marketing segment.customer_tagsis how data from other tools gets in. If your subscription app, helpdesk or payment tool tags customers (payment issue, dispute open), you can segment and exclude on that tag. Tags aren't case sensitive.customer_countriesuses two-letter ISO codes, for examplecustomer_countries CONTAINS 'US'.
Shopify segments only know what Shopify knows. A failed renewal handled by a separate billing tool won't appear unless that tool writes it back as a tag or a metafield.
How to build customer segments in Klaviyo
Klaviyo segments are built from conditions, the most used being "What someone has done (or not done)", for example Placed Order a number of times over a period, and "Properties about someone".5Klaviyo Help Center, Getting started with segments Four details from Klaviyo's own help change how you build them:
- The default operator between conditions is OR. Switch to AND when every condition must be true. AND makes the segment stricter, OR more inclusive.
- OR with a negative condition can catch almost everyone, because each condition is checked separately. "Has not placed an order in 90 days OR has not opened an email" includes nearly the whole list.
- Segments don't require opt-in. A segment can contain people who never consented to marketing, so add a consent condition before sending a campaign to it.
- Snapshots freeze a segment. A snapshot creates a static list of the members at that moment; the segment itself keeps updating. Useful to keep the exact audience and holdout of a past test.5Klaviyo Help Center, Getting started with segments
Only top-level event properties can be used, and property values are case sensitive, so "payment_failed" and "Payment_Failed" are two different values.5Klaviyo Help Center, Getting started with segments Large segments can also take a while to populate, so build them before the day you plan to send.
One definition, several tools
When Shopify, Klaviyo and your billing tool all have a segment called "VIP", they rarely hold the same people. Write each segment rule once, in plain language, with its owner and refresh frequency, and rebuild it the same way in each tool.
Common customer segmentation mistakes
Too many segments
Every segment needs an action, an owner and a holdout. Thirty segments with the same email behind them is one segment with extra work. Start with a handful.
Segments too small to test
A segment of 300 customers can't show whether a campaign worked unless the effect is huge. Merge segments that get the same action, or measure a more frequent outcome.
Stale data
Weekly exports, payment events synced once a day, duplicates across tools. A segment is only as fresh as its slowest source.
No exclusions
Recent buyers in prospecting ads, subscribers getting first-order discounts, customers with an open dispute getting promotions. Exclusions are often the fastest win.
Demographics only
Age and gender are easy to collect and easy to present. They rarely tell you who will buy again or whose renewal will fail.
Measuring with clicks
Opens and clicks show attention, not what the segment changed. Compare orders and margin with a holdout.
Where Tagada fits
How Tagada helps
The checkout and subscription events behind your segments
Tagada runs the checkout (one-click upsells, order bumps, A/B tests, Apple Pay and Google Pay) and subscriptions (trials, billing cycles, dunning and automatic retries), and sends tracking server side to Meta, Google and TikTok. It works standalone, with Shopify, with WooCommerce or headless. Pricing is on the pricing page.
Whatever stack you use, the test is the same: can the tool that holds your orders, renewals, refunds and disputes pass those events to the place where you build segments, fast enough for a failed renewal to reach the right customer before the next retry?
Frequently asked questions
What are the 4 types of customer segmentation?
How many customer segments should an ecommerce store start with?
What is RFM segmentation?
What is the difference between customer segmentation and personalization?
What is the difference between static and dynamic segments?
How do you measure whether customer segmentation works?
Sources
Checked October 14, 2026- Shopify Help Center, Customer segmentation
- Shopify Help Center, Shopify-based customer segment filters
- Shopify Help Center, Components of a customer segment
- Shopify Help Center, Customers reports (RFM customer analysis)
- Klaviyo Help Center, Getting started with segments
- Stripe Docs, How subscriptions work (subscription statuses)
- Stripe Docs, How disputes work
Tagada
Checkout and subscription data you can segment on
Funnels, one-click upsells, subscription billing and payment routing, on one customer record.
- 01Create your free account
- 02Connect your store or build a checkout
- 03Launch funnels, upsells and subscriptions
