The project
A lifetime value for every customer
CLV was built on top of the Single Customer Identifier. I built the pipelines that fed the linked customer view into the model, engineered the Customer Analytic Record it learned from, and worked alongside the data scientists who built the survival models.
The starting point: two customers who looked the same
Loyalty, marketing, pricing and store teams each had their own partial view, and every one of them looked backwards. Two customers with identical spend over the last two years looked identical in every report, even when one was a weekly regular and the other was quietly drifting away.
View data
| Item | Past margin (what reports showed) | Future value (what nobody saw) | Total |
|---|---|---|---|
| Customer A: steady weekly visitor | €432 | €522 | €954 |
| Customer B: drifting away | €432 | €283 | €715 |
Their past is the same; their future value differs by more than half. That gap is exactly where retention spend should go, and no historical report could show it.
The hard part: customers never say they've left
A phone customer cancels a contract. A fuel customer just stops coming. So churn had to be defined first: six months after the last transaction. And because most customers are still active at any point, their true lifetime is unknown. That is censored data, and it calls for survival analysis rather than ordinary regression.
View data
| Fuel Card Professionals | Ultimate Fans | Low Fuel Occasionals | |
|---|---|---|---|
| Now | 100% | 100% | 100% |
| Y1 | 86% | 80% | 55% |
| Y2 | 75% | 66% | 38% |
| Y3 | 66% | 55% | 27% |
| Y4 | 58% | 46% | 19% |
| Y5 | 52% | 39% | 13% |
Segments churn at very different rates, so one model for everyone would have blurred exactly the differences the business needed. Each of the eight behavioural segments got its own model.
The method: past margin, predicted survival, discounting
Lifetime value has two parts. The past is known: margin over the last 24 months. The future is predicted: expected margin for each of the next five years, multiplied by the probability the customer is still active, adjusted for inflation and discounted back to today.
View data
| Component | Value |
|---|---|
| Past 24 mo. | +€432 |
| Year 1 | +€160 |
| Year 2 | +€125 |
| Year 3 | +€98 |
| Year 4 | +€78 |
| Year 5 | +€62 |
| CLV | €954 |
Each future year adds less than the one before: the customer is less likely to still be active, and a euro later is worth less than a euro now. Both effects are built into every score.
Feeding the model: one record per customer
The model learned from a Customer Analytic Record: one row per customer with roughly 580 features, built in SQL in five stages. For each segment, that was cut down to the 60–130 features that actually carried signal.
Because the CAR was built on SCI, the model could see the visits customers paid for by card, not just the ones where they swiped loyalty.
Picking the model
Three survival techniques were tested on the same segment. Each was scored on how well it ranked customers by how long they would stay.
View data
| Item | Value |
|---|---|
| Cox proportional hazards | 0.71 |
| Random survival forest | 0.74 |
| Gradient boosting (Cox loss) | 0.78 |
Gradient boosting with a Cox loss won: the best ranking accuracy, built for censored data, and still explainable through feature importance.
Who's worth the most
Scored monthly, every customer could be ranked by value and tracked as that value moved.
View data
| Item | Value |
|---|---|
| D1 | €2,380 |
| D2 | €1,510 |
| D3 | €1,090 |
| D4 | €820 |
| D5 | €610 |
| D6 | €450 |
| D7 | €320 |
| D8 | €210 |
| D9 | €130 |
| D10 | €60 |
Value is heavily concentrated at the top. Knowing who sits there, and who is sliding out of it, is what let marketing spend less and earn more.
What I built
Results