A retailer can report revenue, order counts and average order value and still not know which customers deserve attention. Averages hide the difference between a first-time buyer, a loyal repeat customer and someone who bought once and never returned. The useful analysis starts with the decision, not with a clustering algorithm.
The decision
The commercial team had to decide where to spend retention and development effort: which customers to protect, which to grow, which to win back and which to leave alone. It also needed to know which product categories travel together, so that offers and inventory could be planned around real purchasing behaviour rather than assumed affinities.
What we worked with
An anonymised apparel retail dataset covering customers, orders, order lines and products:
- Customer profile: customer identifier, gender, age and location.
- Orders: order identifier, customer, payment amount, order date and delivery date.
- Order lines: product, unit price, quantity and line total.
- Products: product type, name, size, colour and list price.
The dataset does not contain returns, margin, marketing exposure or competitor prices. That limits what can be claimed: the analysis can describe purchasing behaviour, but it cannot attribute a customer's behaviour to a campaign or declare a segment profitable.
The traps we designed around
- Order grain versus line grain. Joining orders to lines multiplies revenue by the number of items. Customer value has to be defined at one grain and kept there.
- Revenue is not value. Without margin, high spend is not the same as high contribution. The segmentation reports spend and frequency as separate dimensions rather than collapsing them into a score with false precision.
- Recency depends on the observation date. "Days since last order" changes depending on when the analysis is run. The observation date was fixed and documented, and customers with no order in the window were treated explicitly.
- Small segments look interesting and mean nothing. A segment of twelve customers with a high average spend is not a strategy. Segment size and variability were reported alongside the averages.
- Demographics are descriptive, not causal. Age and gender can label a segment; they rarely explain why someone buys. Purchase behaviour carried the segmentation.
How the analysis was built
- Fix the observation date and the window. Every customer's recency, frequency and monetary value were calculated as of the same date, using only orders inside the window.
- Aggregate to customer level. Recency, order frequency, total spend, average order value and category breadth were built from order and line data without double-counting.
- Segment on behaviour. Customers were grouped on recency, frequency and spend, then profiled by the products they bought. The number of segments was kept small enough for a team to act on.
- Check retention by cohort. Customers were grouped by first-purchase month and tracked for repeat purchase. Cohorts separate genuine retention from growth caused by acquiring more customers.
- Look for product affinity. Co-purchase patterns were examined within orders. Associations were reported as observed patterns, not as recommendations to bundle, because the dataset contains no test of whether a bundle would sell.
- Test stability. The segmentation was rebuilt on a later period to see whether the same groups reappeared. A segmentation that changes shape every month is a report, not a management tool.
What the analysis changes
- Averages give way to actions. The team can separate protect, develop, win-back and low-priority groups instead of applying one retention offer to everyone.
- Retention is measured by cohort. Growth from acquiring new customers no longer masks weak repeat purchasing.
- Product mix follows behaviour. Category combinations show where cross-sell is grounded in observed purchases rather than assumed similarity.
- Forecasts are kept in their place. The analysis describes current segments and can support a later propensity model, but it does not present a prediction as if it were an observed result.
What you receive
- A customer-level dataset with documented RFM and category metrics.
- Segment profiles with size, spend distribution and product mix.
- Cohort retention curves and a repeat-purchase view.
- Product affinity analysis with its limitations stated.
- A dashboard with segment drill-down and a metric-definition panel.
Where this applies
This fits retailers, e-commerce operators and subscription businesses with customer-level order history. The minimum inputs are a stable customer identifier, at least twelve months of orders with dates and line-level product detail, and a clear observation date. The first deliverable is usually the grain audit, the observation-date definition and a simple RFM segmentation — before any predictive model, because those three choices determine whether the segments are stable enough to act on.
This is an illustrative analysis of an anonymised retail dataset. It demonstrates our method and does not report results from a specific client engagement; no customer-identifiable information is used.
