Your best week came from two very different customers. One bought a single wedding gift and will probably never return. The other ordered a case of the same candle for a hotel and will be back in six weeks for more.
Both got the same email on Tuesday, with the same discount, on the same product. The email was well written and the subject line had been tested. The mistake sat one step earlier, in a decision nobody had made: who should get what.
It's written for a store that already has orders, a list and a small team, and wants customer segmentation it can run.
Table of Contents
- What Customer Segmentation Means and Why It Pays
- Five Segment Types and the Data Behind Each
- Choosing Segments Worth Keeping
- How to Build Customer Segments in Seven Steps
- From Customer Groups to Actions
- Automating and Testing One Segment
What Customer Segmentation Means and Why It Pays
Ask a store owner why every subscriber gets the same campaign and the honest answer is usually that nobody has decided who should get what. Customer segmentation is that decision, written down. It means dividing customers into groups that share needs or buying behaviour, then giving each group a different product, offer, message or timing.
A stationery studio shows the shape of it. One buyer is a bride ordering save-the-dates once, with a hard date and a proof to approve. Another is a wedding planner ordering the same design every month, who wants trade pricing and a reorder button. Same catalogue, opposite needs. Send both the same email and at least one of them is reading something written for a stranger.
The idea has a date. Customer segmentation became a formal marketing concept in 1956, when Wendell R. Smith published "Product Differentiation and Market Segmentation as Alternative Marketing Strategies" in the Journal of Marketing, volume 21, issue 1, pages 3–8, as the 1956 paper in the Journal of Marketing records. Smith treated a heterogeneous market as a collection of smaller, relatively homogeneous markets whose members share important product preferences, which is the same move a merchant makes today when splitting a list.
One clarification saves confusion later. Smith wrote about markets, meaning groups of demand. Modern customer segmentation classifies your actual and potential customers instead, using behaviour, needs, geography, demographics or value. The word changed and the logic didn't.
The One-Decision Test
A group earns its name only when the name changes something. If you can't finish the sentence that states what this group gets instead of everyone else, you have a label rather than a segment.
The test: name the group, then name the one thing that happens differently for them. A bundle, a reminder, a discount, a support route. If nothing changes, delete the group.
Take ten minutes with your last ninety days of orders and write one sentence per group describing what your store would do differently. Most merchants find two or three sentences they can act on. That short list is the whole foundation, and everything below either builds it or tests it.
Five Segment Types and the Data Behind Each
Two questions decide the whole build: which kind of grouping fits the decision in front of you, and which fields in your Shopify admin feed it. The chart below pairs each type with the data it needs.

The table adds the two columns that decide whether a project runs or stalls: the exact Shopify field, and what usually goes wrong with it.
| Segment type | Question it answers | Typical data | Shopify field | Watch for |
|---|---|---|---|---|
| Demographic | Who is the customer? | Age, gender, location, language | Account and shipping address | Often thin for DTC; small groups |
| Behavioral | What does the customer do? | Pages viewed, cart actions, purchase timing, product categories | Order line products and analytics events | Consent limits on-site tracking |
| RFM and lifetime value | How valuable and how recent? | Recency, frequency, monetary value, lifetime spend | Last order date, order count, order value | Guest checkouts split one buyer into profiles |
| Psychographic | Why does the customer buy? | Values, interests, lifestyle, survey answers | Survey and review responses | Small samples, self-selection bias |
| Cohort | When did the customer start? | First-purchase month, acquisition channel, launch campaign | First order date and traffic source | Seasonality shifts boundaries |
Demographic groups people by who they are: age band, location, language, household composition. It pulls from account details and shipping addresses, and it is the thinnest of the five for most direct-to-consumer stores, because a guest checkout leaves a name and a postcode and nothing else. Treat it as a filter layered on a behavioural split, not as the split itself.
Behavioural groups customers by what they do: which categories they browse, whether they abandon carts, how often and when they buy. Order line products and on-site events feed it. The limit is consent, since a browser who declines tracking is invisible to your events, which is why behaviour read from orders is more reliable than behaviour read from pageviews.
RFM and lifetime value answers how valuable and how recent. Recency, frequency, monetary value and lifetime spend come straight out of the order export as last order date, order count and total spend. This is the type to build first: the data already exists, needs no tracking, and survives a cookie banner.
Psychographic answers why someone buys: the values, interests and occasion behind the order. Surveys, review text and support conversations feed it, samples are small, and the output works better as creative direction than as a targeting rule.
Cohort answers when someone started: first-purchase month, the channel that brought them in, the launch they arrived on. First order date and traffic source give you this for free, and it's the type that ages best, because a cohort keeps its meaning as new customers fill it.
These types combine. The usual sensible stack is a behavioural or value layer doing the splitting, a cohort column for reading results, and a demographic filter for delivery constraints.
Joining Sources Without Breaking Trust
Order data tells you who spends. Analytics tells you intent. A workable segment links both on email, so merge duplicate guest and account profiles first and record consent at the point of collection. A primer on what counts as first-party data is worth reading before you export anything, because consent decides which rows you may keep.
Privacy is not a footnote here. Research on personalization identifies privacy, transparency, perceived control and consumer trust as central conditions for it to work, per a Springer Nature study on privacy-preserving personalization. That study also reports a federated-learning framework reaching a silhouette score of 0.631, within 6.1% of a centralized baseline, while reducing demographic parity difference by 71.1% and membership-inference attack success by 30.9%, which in plain terms means useful grouping doesn't require centralizing raw customer records.
The contrarian bit: the best segment isn't the most predictive one. It's the least invasive one that still changes a decision.
Fields to leave out: anything sensitive such as health, religion or ethnicity, anything you couldn't explain to a customer who asked, and any field that never changes an action.
Before exporting, check three fields. A stable customer ID that survives guest checkout merging. An email that resolves to one profile, so a guest order and an account order don't become two people. And a consent flag with a timestamp, so you know which rows you may use and which you must delete on request.
Choosing Segments Worth Keeping
A clustering tool will hand you nine groups from a year of orders and call it insight. Nine groups is not a strategy. Research on AI segmentation describes the shift from periodic demographic exercises to continuously updated behavioral groups and lists what goes wrong with it: data-quality problems, interpretability limits, algorithmic bias, privacy concerns and over-segmentation, as a Cambridge open peer review of AI customer segmentation research sets out.
The gate below runs before the build, not after. A group has to clear all five:
- Large enough to matter. If a group holds forty customers, any lift it produces is noise. Merge it into its nearest neighbour.
- Stable across months. Rebuild the same segment on last quarter's data. If a third of the members change, the boundary is wrong.
- Reachable through one channel. A group you can only address by hand isn't a segment for a team of two.
- Responsive differently. Two groups that answer the same offer the same way are one group with two names.
- Owned by someone. A named person runs it, reads its number and can switch it off.
That last criterion is where ambition meets payroll. One marketing or operations person can activate, measure and maintain a handful of segments, which usually means three to five rather than thirty. Anything beyond that needs a hire or an agency, not a better algorithm.
Segment drift is the quiet failure. A shopper who viewed three products twice looks like high intent, and she may be comparing you against two competitors and a returns policy. A discount-driven buyer looks locked into promotions, and a good fulfilment experience can turn her loyal. Reading those movements is customer behavior analysis, which is why every segment needs three controls: a confidence threshold for assignment, an expiry date, and a quarterly human review of its top members.
Two groups driving one clear action beat a twelve-cluster model nobody maintains. The model is not the deliverable. The action is.
Before building anything, ask three questions. What decision does this segment serve? What will I compare to know it worked? Who runs it next month? Any answer you can't give is a build you shouldn't start.
How to Build Customer Segments in Seven Steps
The steps assume one decision, one export and a spreadsheet, which covers most stores without a data team.

- Name the decision first. Which customers get a win-back email in October is a decision. Understand our customers is not, and it produces segments that fit nothing. Write the decision on one line before you open any data.
- Export twelve months of orders and behaviour into one row per customer. Last order date, order count, total spend, discount code usage, product categories bought, support tickets raised. One row per customer is the format every later step depends on.
- Pick three to five features tied to that decision. Win-back needs recency, frequency and spend. A margin question needs discount dependence and category breadth. More features dilute the signal and make the output harder to explain to the person who has to act on it.
- Standardise the features. Order value arrives in hundreds and recency in days, so an unscaled cluster is really a spend cluster wearing a disguise. Convert each feature to a z-score so every one carries equal weight.
- Run at least two clustering methods. K-means optimises squared distance around centroids and is sensitive to scale and outliers, while K-medians holds up better against a few very large trade orders. A peer-reviewed e-commerce clustering study comparing K-means, K-medians and BIRCH on the same behavioural data found the techniques produced substantially different groupings, so the algorithm choice changes the business reading.
- Choose the cluster count with evidence, then confirm it. Elbow or silhouette analysis shows where extra groups stop adding separation, and a Davies-Bouldin score, where lower is tighter, checks the solution you picked. Then apply the business test: does each group show a different conversion or retention rate?
- Name each group by behaviour, attach one action, and hold back a control group. Recent repeat buyers, two orders in ninety days, no discount used is a name someone can act on. Cluster 3 is not. Keep part of each group out of the campaign so you can see whether the action caused the lift or the season did.
What the Finished Segment Map Looks Like
The output is a single sheet: four or five rows, each with a plain-language name, the size of the group, the one action attached to it, and the metric you'll read in four weeks. If a row has no action, delete the row. If the action is send the newsletter, it wasn't a segment.
Expect a small number. Four groups is a common landing point for one store's behavioural data, and it's easier to run and measure than seven. Stress-test whichever count you land on against a later cohort, because seasonality moves boundaries and a group that was clean in November can be muddled in February.
From Customer Groups to Actions
A named group changes nothing until someone inside it receives a different message than everyone else. The grid below is the classic way to see those differences at a glance.

Take a customer who buys a serum in January, again in March, then goes quiet. By May she's recent but slipping on frequency, high on lifetime value, and she belongs in a different queue than the subscriber who bought once and never opened an email. Recency separates her from the buyer who is still engaged. Frequency and value separate her from the habitual low-value shopper. Generic labels like VIP or inactive collapse all three of them into one bucket and lose the distinction that would have told you what to send.
The number of groups has to be earned rather than assumed. An RFMCV framework built on recency, frequency, monetary value, customer value and related behavioural indicators was tested in a peer-reviewed RFMCV segmentation study on PubMed Central covering 37,376 customers, and four customer groups proved optimal in that dataset. Four is a benchmark to test against, not a rule to copy.
| Segment | Shopify signal | Action | Metric to watch |
|---|---|---|---|
| Loyal repeaters | Recent, frequent, high-value orders | Replenishment reminders and early access | Repeat-purchase rate |
| Lapsing high-value | Valuable customers with no order in the store's normal cycle | Win-back sequence with a personal offer | Reactivation rate |
| Discount-driven | Frequent orders, mostly placed with discount codes | Bundles that protect margin instead of blanket discounts | Contribution margin per order |
| New first-time buyers | One recent order, no repeat yet | Education and cross-sell content | Share of first-time buyers who place a second order |
Setting the Lapse Window From Your Purchase Cycle
A lapse window isn't a fixed number of days, it's a multiple of your own reorder cycle. Pull the median gap between first and second order from your export. If that gap is two weeks for a consumable and six months for a piece of furniture, a ninety-day inactive tag is sensible for the first and premature for the second. Set the window at roughly twice the median gap, then check whether it catches people who were never going to reorder in the first place.
After four weeks, read one number per row rather than the open rate. If reactivation among lapsed high-value customers lands at the same level as your ordinary newsletter, the segment isn't doing work; widen the window or change the offer. Rebuild the thresholds when your median reorder gap moves by more than a couple of weeks, which typically happens once a season.
If you'd rather see the scoring mechanics before building anything, this walkthrough covers the assignment step end to end.
The four rows above are a worked example, not a template. Copy the structure, set your own windows from your own order gaps, and swap the actions for things your store can produce without authoring new content every week. Then run the first sequence against email segments rather than the whole list, and compare.
Automating and Testing One Segment
Pick one row from the table above and run it as a test before you automate anything. The sequence below is reversible at every step, which matters more than speed.
- Choose one segment and one list. One row, one campaign, one owner.
- Build it as a collection or a customer list using the same rule you'd explain to a colleague. If the rule takes two sentences, it isn't ready.
- Run it once, manually, on a small scope. A hand-picked selection of two hundred customers tells you more in a week than a store-wide rule change tells you in a quarter.
- Compare against the control group you held back at the four-week mark. Without it you're measuring the calendar, not the segment.
- Schedule only after the lift shows up. Weekly, monthly or quarterly all work. A daily job nobody reads doesn't.
Automation stays safe when the scope is explicit. Bulk runs can cover all products, one collection or a hand-picked selection, now or on a schedule, and the merchant decides which products, fields and images get processed and whether existing values can be overwritten. Set the rules once for keywords to use or avoid, tone, length and output language, then inspect the first batch before letting it repeat.
Privacy practice belongs in the same checklist:
- Keep sensitive fields out of segment files, so an export can't become a liability when it's shared with a freelancer.
- Prefer the coarse group when it performs nearly as well as a narrow one, since fewer attributes mean fewer obligations.
- Make a deletion request remove the customer from every exported list, not just the master record.
Start on a free plan with a single collection and look at the output before paying for volume, and use a pay-as-you-go pack if bulk work happens only occasionally. Yassine Malti builds Shopify apps and custom automations for segment-based content and tagging, with direct support from build to launch.
Test one segment this month. One row, one action, one number to read in four weeks.
Yassine Malti builds Shopify apps and custom automations that turn a segment list into tagged products, scheduled content and campaigns that run without babysitting. If you've picked your first segment and want it wired into your store instead of sitting in a spreadsheet, his apps and custom builds take it from rules to launch with direct support along the way. Start with one segment and see what Yassine Malti can automate around it.
Shopify apps by Yassine Malti
Put this into practice
-
Describer · Product descriptions
Product descriptions written from your own product data · Free: 50 descriptions/month
-
LLMs TXT · llms.txt for AI tools
A short llms.txt of your real store links · Free
-
Blogger · SEO blog posts
An AI blog agent that writes and publishes for you · 50 credits/month free