In a shop nobody cancels. How do I know who is still a customer?
TL;DR
Difficulty: Advanced
An online shop never sees a customer leave, so churn means reading silence.
- Measure the gap between orders on a group observed long enough, then choose the lapsed threshold from your own data, with one time buyers treated separately.
- RFM sorts customers but does not predict.
- The BG/NBD model gives each customer a probability of still being active and an expected number of future orders; the Gamma Gamma model adds expected spend.
- Test on a holdout first. Expect the model to sort about as well as a good rule, and to forecast totals and values far better.
- Decide win back offers on expected orders and the uplift you measure, not on P(alive).
A customer buys a lamp, and then the shop hears nothing. Maybe she will be back for the sideboard, maybe she left months ago, and the order history looks the same either way. This chapter shows how to read that silence: from a simple lapsed rule chosen from your own data to the probability models built for exactly this problem, with the maths, the code and a test that tells you whether to trust the answer.
Nobody cancels, so who is still a customer?
A subscription business knows the day a customer leaves, because someone presses a cancel button. An online shop has nothing of the kind. A customer buys a lamp, and then the shop hears nothing. Maybe she is saving up for the sideboard. Maybe she moved to a competitor two months ago. The order history looks identical in both cases.
This chapter answers the question every shop owner eventually asks: of all the people who ever bought from me, how many are still customers, which ones, and what will they buy next? It goes from the simplest tool (a rule that says "lapsed after N days") to the probabilistic models that marketing science built for exactly this problem, with the maths, the code and a test that tells you whether to trust the answer.
A few terms first. Churn means a customer stops being a customer. In a shop it is non contractual churn: it happens silently and you never see the date. Repeat purchase means any order after the first. Recency describes how recently someone bought, and frequency how often. Each gets a precise definition below, because the precise definition is where most of the mistakes hide.
The chapter builds on how much you can afford to pay for a new customer, because lifetime value depends on exactly the repeat purchases this chapter learns to predict.
Example: Priya's question about 15,000 customers
Wrenfield Home is the invented homeware shop in Leeds that runs through this series (wrenfieldhome.example). Priya owns it, Callum is her developer. The shop has 110,000 sessions a month, a conversion rate of 1.8%, an average order value of £72 and a gross margin of 52% on product. Of the people who buy for the first time, 28% buy again within twelve months.
In July 2026 Priya asks Callum a simple question. In 2024, 15,000 people placed their first order. How many of them are still customers today?
Callum can count what happened. 5,222 of the 15,000 (34.8%) had ordered again by the end of 2025. The other 9,778 had not. But "had ordered again" is not the same as "still a customer", and "had not" is not the same as "gone". A customer whose third order was last month is almost certainly still around. One whose only repeat order was 20 months ago may not be. And some of the 9,778 will place their second order next week. Every figure about Wrenfield Home in this chapter is invented for the example.
Why a shop has no churn date
In a contract business, churn is an event with a date. The survival analysis article models it with Kaplan Meier curves and the Cox model, which works because the end is visible.
In a shop, you only ever see purchases and the silence between them. Silence means either that the customer simply has not needed anything yet, or that they have left for good. Both look the same in the database. So every method in this chapter is a way of reading silence.
There are two families of answers:
- Rules: declare a customer lapsed after a fixed silence, such as 365 days. Easy, transparent, and often good enough.
- Models: treat "still a customer" as a hidden state and estimate the probability of it from each customer's own history. More work, and in return they give each customer a probability and an expected number of future orders.
Example: two customers with the same last order date
Two Wrenfield Home customers both last ordered on 3 March 2025. Customer one has ordered eight times since 2023, roughly every ten weeks, and has now been silent for about 43 weeks. Customer two has ordered twice, 40 weeks apart. A rule that only looks at the last order date treats them identically. Yet customer one has broken a habit, which is a strong sign she has left. Customer two is within her normal rhythm. The rest of the chapter turns this intuition into numbers.
Start with the time between orders
Before choosing any rule, look at how long customers actually take to come back. The inter purchase time is the gap between two consecutive orders of the same customer. The gap that matters most for a shop is the one between the first and the second order, because that is where most customers are lost.
There is one trap in measuring it, and it is a big one: censoring. You only see the gaps that fit inside your data. A customer who first bought six months ago can only show you gaps shorter than six months. If you take everyone together, the long gaps are missing and the typical gap looks shorter than it really is. The fix is to use a group of customers who have all been observed for the same long period, and to say clearly how long that period was.
Example: how long Wrenfield Home's customers take to come back
Callum takes the customers whose first order fell in January to March 2024: 3,724 people. Every one of them can be followed for at least 91 weeks, to the end of 2025. Of the 3,724, 1,406 (37.8%) placed a second order within those 91 weeks. Callum sorts their gaps into quarters of a year:
The median gap is 28 weeks, about 198 days: half the returning customers came back within that time. 80% came back within 60 weeks (418 days), 90% within 75 weeks (522 days). Homeware is not bought weekly, and the numbers say so. Note that these percentiles are still a little short, because a gap longer than 91 weeks could not be seen at all.
The "lapsed after N days" rule, and how to choose N
The simplest definition of churn in a shop is a rule: a customer counts as lapsed once they have been silent for N days. Researchers call this the hiatus heuristic (a hiatus is a break). Its strength is that everyone understands it. Its weakness is the number N, which is usually picked because it feels right, such as 180 or 365 days.
There are two sensible ways to choose N from your data.
The first uses the gap distribution above. Pick N so that most returning customers come back before it, for example the 80th or 90th percentile. At Wrenfield Home that gives 60 or 75 weeks.
The second is better, because it measures the decision itself. For each length of silence, work out the share of customers who still buy within the next period. Write it as
where is the return share for a silence of weeks, is the number of customers who had been silent for weeks at a cut off date, and is how many of them ordered within the following 26 weeks. It is a plain ratio, explained in Foundations: ratios and rates. You then set N where the return share falls to a level at which it no longer pays to treat these people as customers.
Example: choosing N at Wrenfield Home
Callum takes 31 December 2025 as the cut off date and counts, for every customer from the 2024 group, how many weeks they had been silent on that date. Then he checks who ordered between January and June 2026.
Take the group silent for 39 to 52 weeks: 788 customers, of whom 19.2% ordered again, so . The group silent for 52 to 65 weeks: 3,332 customers, return share 10.5%. The share halves at about one year.
But look closer before writing "N = 52 weeks" into the shop. The group silent for more than a year is mostly made of one time buyers, because everyone who never came back after a 2024 first order has been silent for at least 52 weeks by the cut off. Split by history, the picture changes. Of the customers who had already ordered twice or more and were silent for 52 to 65 weeks, 16.9% came back. Of the one time buyers with the same silence, 9.0% did. So one rule for everyone is the wrong design. Callum ends up with two:
- Customers with two or more orders count as lapsed after 52 weeks of silence.
- One time buyers are a separate group with its own journey, the step from first order to second, which the chapter on after the purchase covers in full.
RFM, a first step that sorts but does not predict
RFM stands for recency, frequency and monetary value. It scores every customer on three things: how recently they last bought, how many orders they have placed, and how much they spend. Each is usually cut into five equal groups (quintiles) and scored 1 to 5, so a customer gets a three digit code such as 543. The scores make a good first segmentation, and the segmentation tools article covers how to go beyond them.
RFM has two limits that matter for this chapter. It ranks, it does not predict: a score of 5 says "among the most recent", not "will buy again with a probability of 60%". And it treats recency and frequency as separate, when the meaning of a silence depends on how often the customer used to buy. Fader, Hardie and Lee found exactly this in their study of customer value: for a long silence, customers who had bought more often were worth less, not more, because the long silence was so far out of character for them. They called it the "increasing frequency" paradox.1
Example: three customers on RFM scores
Callum scores three customers on 31 December 2025. Recency here means weeks since the last order.
| Customer | Orders so far | Weeks since last order | Average order | RFM code |
|---|---|---|---|---|
| Amira, Bristol | 4 | 20 | £110 | 445 |
| Ben, Manchester | 2 | 70 | £40 | 131 |
| Chloe, Leeds | 9 | 45 | £60 | 253 |
RFM puts Chloe well above Ben, and on frequency alone above Amira. But Chloe used to order about every seven weeks and has now been silent for 45. That is more than six of her usual gaps in a row. A model that reads silence in the light of each customer's own rhythm will rate her chances lower than her frequency score suggests. That is what the next sections build.
Three numbers per customer are all the models need
The probability models below need surprisingly little: three numbers per customer, taken from the order history. In the notation of the research papers:
Here is the number of repeat orders (orders after the first), is the time of the last order measured from the first order, and is the time from the first order to the end of the observation period. With , is set to 0. Under the models' assumptions, these three numbers carry everything the model needs from a customer's history. The exact dates of the orders in between add nothing.2 Each is a count or a duration, see Foundations: ratios and rates for working with rates per week.
Here is the trap that catches almost everyone who moves from RFM to these models: the word recency means two different things. In RFM, recency is the time since the last order. In the model libraries, "recency" is , the time between the first and the last order. A customer who last ordered yesterday has a small RFM recency and a large model recency. Mix them up and every prediction is upside down.
The libraries also count purchase occasions, not orders. If you choose weeks as the time unit, two orders in the same week count as one repeat purchase, which is usually what you want for split deliveries and forgotten items.
Example: Amira, Ben and Chloe in model notation
Callum measures time in weeks. The observation period ends on 31 December 2025.
- Amira first ordered 90 weeks before the end, has 3 repeat orders, the last one 70 weeks after her first: , , .
- Ben first ordered 90 weeks before the end, has 1 repeat order, 20 weeks after his first: , , .
- Chloe first ordered 100 weeks before the end, has 8 repeat orders, the last at week 55: , , .
Ben's RFM recency is weeks since his last order. His model recency is . Same customer, two numbers both called recency.
Plotted for a sample of 40 Wrenfield Home repeat customers, frequency against model recency shows the raw material the model works with:
The two hidden processes behind every customer
The models treat each customer as two processes running at once, neither of which you can see directly.
- Buying while active. As long as the customer is still a customer, orders arrive at random at the customer's own rate, for example about once a year. Mathematically this is a Poisson process: the number of orders in a period follows a Poisson distribution (see Foundations: distributions).
- Dropping out. At some point the customer leaves for good. You never see when.
Customers differ, so the models do not assume one rate for everyone. They assume the rates are spread across customers according to a distribution, and estimate the shape of that spread from the whole customer base. That is why they work with little data per customer: what the shop knows about all customers fills the gaps in what it knows about one.
The first model of this kind for shops was the Pareto/NBD model by Schmittlein, Morrison and Colombo, published in 1987.3 NBD stands for negative binomial distribution, which is what you get when Poisson buying rates vary across customers following a gamma distribution. In the Pareto/NBD, a customer can drop out at any moment, independent of buying. It is a strong model, but its likelihood is hard to compute.
In 2005, Fader, Hardie and Lee published the BG/NBD model (beta geometric, negative binomial distribution) as an easier alternative.2 It changes one assumption: a customer can only drop out immediately after an order. That sounds odd, and it is a simplification. In return the model can be fitted in a spreadsheet, and the authors showed it gives very similar results to the Pareto/NBD.2
The BG/NBD has four parameters:
- and describe how buying rates are spread across customers (a gamma distribution).
- and describe how the dropout probability after each order is spread across customers (a beta distribution).
Two summaries make the parameters readable:
Here is the average buying rate of an active customer per time unit, and is the average probability of dropping out right after an order. Both are means of a distribution, see Foundations: mean.
Example: what Wrenfield Home's parameters say
Callum fits the BG/NBD to the 15,000 customers from 2024, with time in weeks and data up to 31 December 2025 (how he fits it follows below). He gets , , and .
The average active customer buys at a rate of
orders per week, which is orders a year: one order every two years while still a customer. The average dropout probability after an order is
so after each order, the average customer has a 22.6% chance of never coming back (). Both averages hide a wide spread, which is the point of the model: a few customers buy far more often than once every two years, and many far less.
The probability that a customer is still active
The most quoted output of these models is P(alive): the probability that a customer is still active at the end of the observation period, given their history. For the BG/NBD, Fader, Hardie and Lee derived it in a short note:4
Here , and are the customer's repeat orders, time of last order and observation length from above, , , and are the fitted parameters, and is 1 when the customer has at least one repeat order and 0 otherwise. The formula is Bayes' theorem applied to two stories (alive or dropped out after the last order), see Foundations: probability.
How to read it: the term grows with the silence ( much larger than ) and grows faster for customers with many orders (large ). A long silence weighs more heavily for a customer who used to buy often. That is the increasing frequency paradox, built into the maths.
Example: P(alive) for Amira and Ben, step by step
Amira has , , . With , , , :
- First fraction: .
- Ratio of times: .
- Exponent: , so .
- Multiply: .
- Result: .
Amira is still active with a probability of about 78%.
Ben has , , :
- .
- .
- , so .
- .
- .
Ben has been silent for 70 weeks and still has a 55% chance of being active, because he never bought often and a long gap is normal for him.
The same formula, run for customers with 1, 2, 4 and 8 repeat orders whose first order was 100 weeks ago, shows how differently silence counts:
Chloe, with eight repeat orders and 45 weeks of silence, sits between the 39 and 52 week points of the steepest line. Her own figure, from the formula with , , , is 0.355: about a one in three chance of still being a customer, far below what her frequency score suggested.
The one time buyer trap
Look at the formula once more. For a customer with no repeat order, and P(alive) is exactly 1. The BG/NBD says every one time buyer is still active, however long ago the first order was. The authors point this out themselves: dropout can only happen after a repeat purchase in the model, so a customer who never made one cannot have dropped out.4 It is a property of the assumptions, not a finding.
This does not make the model useless for one time buyers, because their expected future orders are still low (next section). It does make P(alive) on its own a poor score for them. Two fixes exist: a modified version (often called MBG/NBD) that lets customers drop out right after the first order, which PyMC Marketing implements as ModifiedBetaGeoModel,5 or the Pareto/NBD, which lets anyone drop out at any time.
Example: 9,778 customers who are "certainly alive"
At Wrenfield Home, 9,778 of the 15,000 customers from 2024 had no repeat order by the end of 2025. The BG/NBD gives every one of them P(alive) = 1. Ranked by P(alive), they would all sit at the top of a win back list, above Amira. Ranked by expected orders, they sit at the bottom, with about 0.17 orders expected in the next year each. Callum ranks by expected orders.
How many orders to expect from each customer
The number that drives decisions is not P(alive) but the expected number of orders in a future period of length . Fader, Hardie and Lee give it as their equation 10:2
Here is the expected number of orders in the next weeks for a customer with history , , , and is the Gaussian hypergeometric function, a standard function that every statistics library provides. The other symbols are as before. The denominator is the same as in P(alive): the formula weighs the future orders of an active customer by the chance that the customer is active at all. It is an expected value, see Foundations: expected value.
Nobody computes that by hand, but a simple approximation shows what the formula does and checks any software result:
Here is the customer's own buying rate after the model has learned from their orders over weeks, and is the length of the future period. The approximation ignores the chance that the customer drops out after one of the future orders, so it always comes out slightly too high. The step from the average rate to the customer's own is a weighted blend of the shop average and the customer's own history, see Foundations: mean.
Example: Amira's next six months
For Amira, weeks:
- Her own buying rate: orders a week, about 1.3 a year, far above the shop average of 0.50.
- If she were certainly active: orders.
- Weighted by P(alive): orders.
The exact formula, computed in Python, gives 0.488 orders for the next 26 weeks and 0.934 for the next 52. The approximation is 5% higher, as expected. For Ben the exact figures are 0.145 orders in 26 weeks and 0.279 in 52. For a one time buyer first seen 90 weeks before the cut off, they are 0.081 and 0.157.
How much each customer will spend: the Gamma Gamma model
Expected orders are only half of a customer's value. The other half is how much each order is worth. The standard companion model is the Gamma Gamma model of spend, set out by Fader and Hardie.6 It assumes that each customer has their own average order value, that individual orders scatter around it, and that the averages differ across customers. The result is a neat formula for the expected average order value of a customer:
Here is the expected average order value of a customer, is that customer's observed average over their repeat orders, is the average order value across all customers, and , and are the fitted parameters. The formula is a weighted average of the shop's average and the customer's own, see Foundations: mean. The more orders a customer has, the more weight goes on their own average.
The model makes one important assumption: how much a customer spends per order is independent of how often they buy. Fader, Hardie and Lee state plainly that anyone applying the model must check this on their own data.1 The check is quick: the correlation between the number of repeat orders and the average repeat order value should be close to zero (see Foundations: correlation). If frequent buyers spend much less per order, as in a shop where regulars top up on small items, the model overstates their value.
Example: Amira's and Ben's expected spend
Callum fits the Gamma Gamma model to the 5,222 repeat customers. He gets , , . First he checks the independence assumption: the correlation between repeat orders and average repeat order value is 0.007, close enough to zero. The shop wide average order value from the model is
so , close to the £72 the shop sees across all orders.
Amira has repeat orders averaging :
- Weight on the shop average: .
- Weight on her own average: .
- Expected order value: .
Ben has repeat order of :
- Weight on the shop average: .
- Expected order value: .
One order of £40 is weak evidence, so the model pulls Ben a good way towards the average. Three orders of £110 are stronger, so Amira keeps most of her own figure.
Putting the two models together gives each customer a value for the next year. The contribution of an average order at Wrenfield Home is £19.86: what is left of the £72 average order after all the costs of that order, worked out step by step in the unit economics chapter. This chapter uses that figure throughout. As a share of the order value it is , so each customer's expected spend is multiplied by 27.6%. Amira's expected contribution over the next 52 weeks is .
Fitting the models on your own order export
You need one row per order: a customer identifier, the order date and the order value. Everything else is computed from that.
Step one: export the orders from the shop database
If the shop runs on Solidus, the orders live in the spree_orders table, with the columns email, user_id, state, completed_at, item_total, promo_total and included_tax_total, among others.7 This PostgreSQL query exports what the models need:
-- One row per completed order: who, when, and the value of the goods
SELECT
lower(o.email) AS customer_id,
o.completed_at::date AS order_date,
o.item_total + o.promo_total - o.included_tax_total AS order_value
FROM spree_orders o
WHERE o.completed_at IS NOT NULL
AND o.state <> 'canceled'
AND o.completed_at < DATE '2026-07-01'
ORDER BY customer_id, order_date;
Three choices matter. The customer is the lower case email, not user_id, because guest checkouts have no user and people order both ways. Cancelled orders are left out. And the value is the goods after discounts and without VAT, because shipping and tax are not what the customer chose to spend on you. For a shop that sells to businesses, use the company account instead of the email, otherwise one buyer leaving the company looks like a customer lost. Why the shop database, not the analytics tool, should be the source for this is explained in the chapter on server events.
Step two: fit the models in Python
The Python library most tutorials still use, lifetimes, is archived. Its README says no new features or fixes will be made and points to PyMC Marketing as its successor.8 PyMC Marketing has a CLV module with the BG/NBD, the modified BG/NBD, the Pareto/NBD and the Gamma Gamma model, among others.9 The code below follows its documented API.1011
import pandas as pd
from pymc_marketing.clv import BetaGeoModel, GammaGammaModel, rfm_train_test_split
orders = pd.read_csv("orders.csv", parse_dates=["order_date"])
# Weeks as the time unit; data up to the end of 2025 to fit, 2026 H1 to test
data = rfm_train_test_split(
orders,
customer_id_col="customer_id",
datetime_col="order_date",
train_period_end="2025-12-31",
test_period_end="2026-06-30",
time_unit="W",
monetary_value_col="order_value",
)
bg = BetaGeoModel()
bg.fit(data=data[["customer_id", "frequency", "recency", "T"]], method="map")
print(bg.fit_summary()) # r, alpha, a, b
# Expected orders in the 26 test weeks, and P(alive), per customer
expected = bg.expected_purchases(future_t=26).mean(("chain", "draw"))
alive = bg.expected_probability_alive().mean(("chain", "draw"))
rfm_train_test_split builds the three numbers per customer for the fitting period, plus test_frequency, the number of orders each customer actually placed in the test period. method="map" finds the single most likely set of parameters, which is fast and enough for a shop of this size. The default, full Bayesian sampling, takes longer and adds an uncertainty range to every prediction. The .mean(("chain", "draw")) turns the result into one number per customer.
The spend model and the value per customer follow:
repeat = data[data["frequency"] > 0]
gg = GammaGammaModel()
gg.fit(data=repeat[["customer_id", "monetary_value", "frequency"]], method="map")
clv = gg.expected_customer_lifetime_value(
transaction_model=bg,
data=repeat[["customer_id", "frequency", "recency", "T", "monetary_value"]],
future_t=12, # months, whatever the time unit
discount_rate=0.008, # per month, about 10% a year
time_unit="W",
)
The Gamma Gamma model is fitted on repeat customers only, because monetary_value is the average of the repeat orders and a customer without one has none. The result is revenue, so multiply by your contribution margin before using it for budgets. A monthly discount rate of 0.8% compounds to , about 10% a year, see Foundations: discounting.
Example: running it for the 15,000 customers
Callum's export has 26,573 orders from the 15,000 customers. The fit runs in under a minute and returns the parameters used throughout this chapter. Before anyone acts on the scores, he does the most important step: the holdout check.
Check the model on a holdout period before you trust it
A model that fits the past can still forecast badly. The standard test is a holdout: fit the model on data up to a cut off date, predict the period after it, and compare with what actually happened. This is how Fader, Hardie and Lee tested the BG/NBD on a sample of 2,357 customers of the online music retailer CDNOW: they fitted on 39 weeks, forecast the next 39, and found both the BG/NBD and the Pareto/NBD tracked total repeat sales closely, under forecasting by 4% and 2% respectively.2
Do two checks, not one:
- The total over time. Plot actual and predicted repeat orders per period, across the fitting period and the holdout. The lines should stay together in the holdout, not only where the model was fitted.
- By customer group. Group customers by their number of repeat orders in the fitting period, and compare the average actual and predicted orders in the holdout for each group. This tests the individual predictions, which are what you act on.
A useful single number is the error of the total:
where is the relative error, is the total predicted orders in the holdout and is the total actual orders. It is a percentage change, see Foundations: percentages.
Example: the holdout test at Wrenfield Home
Callum fitted on data to 31 December 2025 and predicts January to June 2026. The 15,000 customers actually placed 2,555 repeat orders in those 26 weeks. The model predicted 2,446:
So : the model is 4.3% low on the total, about the same size of error the authors reported for CDNOW.
Per quarter, across the whole period:
And by customer group:
The model is close for the large groups and a little low for the few heavy buyers. That is useful to know: for the 115 best customers, Callum treats the predictions as a floor. Had the lines drifted apart, he would have looked for the cause first: a change in the shop, a seasonal pattern the model does not know, or a data problem.
Once the check passes, Callum refits on all data up to 30 June 2026, and the scores Priya acts on come from the refit. For readability, the numbers in the rest of this chapter are those of the first fit, which the refit moves only slightly.
Is the model better than the simple rule?
It is fair to ask whether all this beats the "lapsed after 52 weeks" rule. Wübben and von Wangenheim tested exactly that. They compared the Pareto/NBD and BG/NBD with the simple rules managers use and found the rules performed at least as well in every managerially relevant task they tested, with one exception: forecasting the total future purchases of the whole customer base, where the models were better.12
To compare fairly, you need two measures. Precision is the share of customers you flag as active who really do buy. Recall is the share of all customers who buy that you managed to flag:
Here (true positives) counts flagged customers who bought, (false positives) counts flagged customers who did not, and (false negatives) counts buyers you did not flag. Both are conditional probabilities, see Foundations: probability.
Why not simply use accuracy, the share of customers classified correctly? Because most customers do not buy in any given half year. A rule that says "nobody will buy" is right for every non buyer, and so scores high accuracy while being useless. This is the base rate trap, see Foundations: indexing and base rates.
Example: the rule against the model at Wrenfield Home
In the first half of 2026, 2,008 of the 15,000 customers (13.4%) placed an order. A rule that says nobody buys would therefore be 86.6% accurate, and worthless.
The 52 week rule flags 3,772 customers as active on 31 December 2025. Of those, 1,015 bought (precision 26.9%), and they make up 50.5% of all 2,008 buyers (recall). Callum then takes the 3,772 customers with the highest expected orders from the model. Precision 27.1%, recall 50.8%. Practically a tie.
He repeats it for the best customers: which 1,500 customers (the top 10%) will spend the most in 2026? Ranking by past spend finds 30.2% of the true top 10%. Ranking by the model's expected value finds 31.3%. Again close.
So the model does not win by sorting customers much better than a well chosen rule. It wins at three other things:
- It forecasts the total: 2,446 orders predicted against 2,555 actual. The rule cannot produce that number at all.
- It gives every customer an expected number of orders and an expected value in pounds, which is what budgets and the lifetime value calculations need.
- It handles customers observed for different lengths of time and with different rhythms in one consistent way, where a rule needs a new hand tuned threshold for each group.
The sensible order is therefore: start with a rule chosen from your data, then add the model when you need forecasts and values, not because it is more sophisticated.
What to do with the scores: who gets a win back message, and with what
The point of all this is a decision: whom to contact, when, and with what offer. Sending a discount to everyone who looks lapsed is tempting, but a discount also goes to customers who would have bought anyway.
The expected gain per customer from a campaign is
where is the expected gain per contacted customer, is the probability that the customer orders in the campaign window without the campaign, the probability with it, the contribution of an order before any discount, the discount per order, and the cost of the contact. The formula assumes every customer who orders in the window uses the discount. It is a difference of two expected values, see Foundations: expected value.
Set and solve for to get the probability the campaign has to reach just to break even:
Here is the breakeven order probability with the campaign. The other symbols are as above, and the algebra is the same as for any breakeven point, see Foundations: expected value.
The model supplies : for small values, the expected number of orders in the window is a good stand in for the probability of ordering. The uplift, how much the campaign raises it, is an assumption until you measure it. The only honest way to measure it is to hold back a random group that gets nothing, the method in the chapter on experiments in your own shop.
Example: Priya's eight week win back plan
Callum splits the 15,000 customers by expected orders over the next 52 weeks, and the model gives each group its expected orders over an eight week campaign window:
| Group | Customers | Expected orders, next 52 weeks | Expected orders, next 8 weeks () | Expected contribution, next 52 weeks |
|---|---|---|---|---|
| High (0.6 or more) | 1,593 | 1.04 | 0.17 | £32,300 |
| Middle (0.2 to 0.6) | 5,169 | 0.32 | 0.053 | £32,600 |
| Low (under 0.2) | 8,238 | 0.17 | 0.028 | £27,400 |
The contribution of an order is , the figure from the unit economics chapter. A 10% discount on an average order costs , which leaves . An email costs about .
High group, 10% off. Breakeven: . The discount must lift the order probability from 17% to 26.7% just to break even. If it adds two points, to 19%: per customer, a loss of about £1,560 across the group. These customers are buying anyway. Leave them alone, or thank them without a discount.
Middle group, a reminder without discount. Here . If the reminder adds one point, from 5.3% to 6.3%: per customer, about £980 across 5,169 customers. The same group with 10% off and a two point lift: . The reminder wins.
Low group, 10% off. Breakeven: . The discount needs to lift ordering from 2.8% to 4.5%. If it reaches 5.8%: per customer, about £1,390 across 8,238 customers. Only here does a discount have a chance, because so few would order anyway.
So the plan: no discount for the high group, a plain reminder timed to each middle group customer's usual rhythm, a discount test for the low group, and in every group a random 10% who get nothing, so that the real uplift can be measured instead of assumed.
What to do with the scores: budgets and the value of the base
The second use is money planning. The models say how many orders and how much contribution the existing customers will bring without any new acquisition. That number is the floor of next year's plan, and the gap between it and the target is what marketing has to close. It also feeds the lifetime value in the chapter on acquisition cost and payback, and the cohort view in the cohort analysis chapter shows whether newer customers are better or worse than these.
Example: what the 2024 customers are worth in 2026
From the fit on data to 31 December 2025, the 15,000 customers from 2024 are expected to place 4,702 orders in 2026. With each customer's expected order value from the Gamma Gamma model, that is £334,600 in order value and, at a contribution of £19.86 per average order (27.6%), £92,300 in contribution.
The value is concentrated. The high group, 1,593 customers or 10.6% of the 15,000, carries £32,300 of it, which is 35%. When one of them complains, Priya uses that customer's expected value, not the average, to decide what a service gesture is worth.
The same numbers set a limit on win back spending. Across the low group, the 8,238 customers carry £27,400 of expected contribution, about £3.30 each. Any win back step for this group that costs more than a few pounds a head cannot pay, however good the message is.
The legal frame for contacting lapsed customers
Everything above ends in a message to a customer, so the law on direct marketing applies. This is general information, not legal advice.
In the UK, the Privacy and Electronic Communications Regulations 2003 (PECR) require consent for marketing emails, with one exception often called the soft opt in. Regulation 22(3) allows marketing email to a customer when the contact details were obtained in the course of a sale, the marketing is for your own similar products and services, and the customer was given a simple, free way to refuse when the details were collected and in every later message.13 A win back email about homeware to someone who bought homeware fits. An email about a partner's insurance does not.
Scoring customers to decide whom to market to is profiling under the UK GDPR. Article 21 gives every person the right to object to processing for direct marketing at any time, including profiling related to it, and once they object, their data may no longer be used for that purpose.14 In practice: an unsubscribed customer stays out of the win back list, and also out of the scoring that feeds it. The rules for the email channel itself, including consent and frequency, are in the email and SMS chapter.
Example: Callum's filters before the list goes out
Before the list is built, Callum removes everyone who has unsubscribed or objected, and everyone who bought only through a marketplace, because the shop never made that sale itself. Of the 8,238 customers in the low group, 6,410 remain. The 10% holdout group is drawn from those 6,410, so the test compares like with like.
Traps that make the numbers lie
The models are only as good as the order history fed into them. These traps break them most often.
| Trap | What goes wrong | Example at Wrenfield Home |
|---|---|---|
| Guest checkouts under a different key | One person becomes two customers, each with fewer orders | 1,140 people ordered both as guest and with an account; keyed by email they become one |
| Returns kept in | A returned order counts as a purchase | A sideboard bought and returned in full counts as an order unless excluded or netted off |
| Christmas | The model assumes a steady rhythm | Fitting on whole years balances it; a fit ending in December would not |
| A big change in the shop | A new range or price change breaks the past rhythm | A new furniture line makes past frequency a poor guide |
| Business customers | A buyer leaving the company looks like a lost customer | A café reordering mugs is keyed by company, not by email |
| Subscription like products | Regular refills break the random buying assumption | Not an issue for homeware, but for coffee or pet food |
Each is a data question before it is a model question, the habit the averages article covers in general.
A monthly routine that keeps it useful
Customers change and the shop changes, so a model fitted a year ago slowly stops describing either. A light routine keeps the scores honest.
- Monthly: rerun the export and the fit, refresh every customer's expected orders, P(alive) and value, and update the win back groups.
- Quarterly: compare the last quarter's predictions with what happened. If the total error drifts beyond about 10%, look for the cause before using the scores again.
- After every campaign: read the uplift from the holdout group and replace the assumed uplift in the win back maths with the measured one.
- Yearly: revisit the lapsed rule and check the gap distribution again, because a new product range changes how often people come back.
Example: Priya's first Monday of the month
Callum's job runs the night before. Priya opens one page with four numbers: expected orders from existing customers this month (402), last month's figure (418), the error of last quarter's forecast (3.1% low), and the customers who moved from the high to the middle group (88). The 88 get a personal note from Priya, not a discount. Ten minutes.
Conclusion
A shop never sees a customer leave, so every answer to "who is still a customer" is a way of reading silence. Start with the gap between orders, measured on a group observed long enough to avoid censoring. Choose the lapsed threshold from your own data, and treat one time buyers separately. Use RFM to sort, knowing it does not predict.
When you need forecasts and values per customer, fit the BG/NBD for orders and the Gamma Gamma model for spend, keeping the two meanings of recency apart. Test the model on a holdout before anyone acts on it, and expect it to sort customers about as well as a good rule while forecasting the total far better. Then use expected orders, not P(alive), to decide who gets a reminder, who gets a discount and who is best left alone, and measure every campaign against a group that got nothing.