Most D2C brands send the same campaign to every customer on the list. The person who has ordered eight times and the person who bought once a year ago receive the same message and the same discount. That wastes margin on loyal customers who would have bought anyway and does little for those who have drifted off. RFM analysis is the simplest way to stop doing this. It needs only order data, it can be built in a spreadsheet, and it gives each group of customers a different, sensible treatment. This guide explains how to build it and what to do with it. For the wider retention system it fits into, see our article on [marketing automation for e-commerce in India](/insights/marketing-automation-roas-cac-ecommerce-india).
What is RFM analysis?
RFM stands for three facts about each customer.
- Recency: how long ago they last ordered.
- Frequency: how many orders they have placed in the period you are looking at.
- Monetary value: how much they have spent in that period.
Each customer gets a score on each measure, and the combination places them in a segment. Someone who bought last week, has ordered many times and spends a lot is one of your best customers. Someone who ordered once, long ago, for a small amount is close to lost.
The method is old and deliberately simple. It works because past behaviour is a reasonable guide to future behaviour, and because recency in particular is a strong signal: a customer who bought recently is far more likely to respond than one who has been silent for a year. More advanced predictive models exist, and tools such as Klaviyo offer predicted lifetime value. RFM is the right place to start because you can understand and check every number in it.
Read the transcript
Return on ad spend looks great. The bank balance does not. For D2C brands, revenue in a dashboard is not the same as money made.
Return on ad spend counts orders. It ignores what they cost you. COD returns and discounts rarely reach the dashboard. Growth can look healthy and still drain cash.
Stop optimising for revenue. Start with margin.
See CM1, CM2 and CM3 by product and channel. Move budget towards what actually makes money. Nudge COD to prepaid and report delivered orders.
D2C performance marketing, with Rahul D Sarker. Book a call at rahuldsarker.co.
The data you need
You need one table of orders with four columns: customer identifier, order date, order value and order status.
- Source. Export orders from Shopify or your store platform. Shopify also has built-in customer segmentation you can use once you know which groups you want.
- Period. Choose a window that covers several purchase cycles. For a consumable bought monthly, twelve months is plenty. For products bought once or twice a year, use two or three years.
- Clean the data first.
- Use delivered orders only. Exclude cancelled orders and those returned to origin; a refused COD order is not a purchase.
- Subtract refunds and returns from order value.
- Use net value after discounts and before tax and shipping.
- Merge duplicate customers. The same person often appears under a phone number on one order and an email on another.
- Remove test orders, staff orders and bulk or wholesale orders that would distort the scores.
- Marketplace orders. You usually cannot identify marketplace customers, so RFM covers your own website and app. See our marketplace vs website guide for why this matters.
How to score customers, step by step
You can do this in a spreadsheet for a small store or in SQL or a data tool for a larger one.
- Summarise by customer. For each customer, calculate days since last order, number of orders and total net spend in the period.
- Score recency from 1 to 5. Sort customers by days since last order and split them into five equal groups. The most recent fifth scores 5, the least recent scores 1.
- Score frequency from 1 to 5. Many D2C customers have ordered only once, so equal groups do not work well. Use fixed bands that suit your business, for example: one order scores 1, two orders 2, three orders 3, four or five orders 4, six or more 5.
- Score monetary value from 1 to 5. Split by total spend into five equal groups, or use bands based on your average order value.
- Combine. Each customer now has three scores, such as 5-4-5. You can keep all three or, for simplicity, average frequency and monetary value into one "value" score and plot it against recency.
- Check the result. Look at ten customers from each score group and confirm the scores make sense.
A worked example. A customer whose last order was 12 days ago, with five orders and high total spend, scores 5-4-5. A customer whose single small order was 300 days ago scores 1-1-1. They should never receive the same message.
Refresh the scores at least monthly. Most email and messaging platforms can recalculate segments automatically once the rules are defined.
The seven segments worth building
Dozens of segment schemes exist. Seven are enough for most brands. Adjust the score ranges to your own data.
| Segment | Typical scores | What they need | Play |
|---|---|---|---|
| Champions | Recent, frequent, high spend | Recognition, not discounts | Early access, loyalty tier, referral invitation, request for reviews |
| Loyal customers | Fairly recent, frequent | Reasons to spend more | Bundles, subscription offer, related products |
| New customers | Very recent, one order | A reason for a second order | Usage guidance, replenishment timing, a second-order incentive |
| Promising | Recent, low frequency, low spend | Education and habit | Content on how to use the product, small add-on offers |
| At risk | Used to buy often, not recently | A prompt before they forget you | Personal reminder, what is new, a time-limited offer |
| Cannot lose | High past spend, long silent | A strong, direct approach | Personal message, call for high-value customers, best offer, ask why they left |
| Lost | Long silent, low frequency and spend | Little investment | One last win-back message, then stop sending to protect deliverability |
The play for each segment, in practice
Champions and loyal customers. Stop sending them blanket discounts. They buy at full price. Give them status and access: first look at new products, a loyalty programme, a referral reward. Ask them for reviews and stories.
New customers. The second order is the most valuable event in retention, because a customer who orders twice is much more likely to become a regular. Time your messages to the product's usage cycle. If a pack lasts 30 days, the replenishment reminder goes at around day 25, not day 3.
At risk and cannot lose. Act before they are lost. A short, personal message works better than a generic promotion. For your highest-value lapsed customers, a phone call or a personal WhatsApp message from a real person is justified.
Lost. Send a final win-back sequence, then suppress them from regular campaigns. Sending to people who never open harms your sender reputation and, on WhatsApp, your quality rating. See our guides to email deliverability and recovering a WhatsApp quality rating.
Channels. In India, WhatsApp usually earns higher attention than email for transactional and replenishment messages, while email suits longer content and costs less per send. Use both, and respect opt-ins on each. Our WhatsApp automation and email marketing automation pages cover the set-up.
Use RFM segments in paid media too
RFM is not only for owned channels.
- Seed lookalike audiences with champions. Upload a consented, hashed list of your best customers so Meta and Google find people like them, not people like your one-time discount buyers.
- Exclude recent buyers from prospecting. Paying to show an acquisition ad to someone who ordered yesterday wastes budget.
- Retarget at-risk customers with new arrivals, not with the product they already bought.
- Pass customer value back to the platforms. Value-based bidding works better when the platform knows which orders came from high-value customers. This depends on sound first-party data and Meta Conversions API set-up.
For a skincare brand we worked with, spend was moved from broad audiences to cohorts identified from purchase history as likely to be worth more over time (case study). Segmentation made that reallocation possible.
How to measure whether it is working
Track a small number of measures monthly.
- Repeat purchase rate. The share of customers in a cohort who place a second order within a set period.
- Share of revenue from returning customers.
- Movement between segments. How many new customers became loyal, how many at-risk customers were recovered and how many slipped to lost.
- Revenue and margin per message sent, by segment.
- Discount cost. Total discount given to champions and loyal customers should fall once you stop over-rewarding them.
Where possible, hold back a small random group in each segment that receives no targeted campaign. Comparing them with the treated group shows what your messages added, since some customers would have reordered anyway. The email marketing ROI calculator helps you size the return.
One reference point from our own work: for a supplement brand, rebuilding the email flows around purchase history and adding a loyalty programme was part of an engagement in which retention revenue rose from 22% to 41% of sales (case study). That is one client's result, not a benchmark.
Limits and common mistakes
- Treating RFM as a prediction. It describes past behaviour. A champion can still leave.
- Ignoring product type. A customer who bought a mattress two years ago is not "lost". Set recency bands by the natural purchase cycle of each category.
- Scoring on placed orders. Refused COD orders and returns must be excluded, or your best-looking customers may be your most expensive.
- Using it only for discounts. The point is different treatment, and for your best customers that means fewer discounts.
- Too many segments. If nobody can remember what a segment is for, it will not be used.
- Never refreshing. Scores go stale within weeks.
- Forgetting consent. Only message people who have agreed to be contacted on that channel, and make opting out easy.
A 30-day build plan
- Week 1: data. Export and clean the order history. Agree the period and the frequency bands.
- Week 2: scoring. Calculate scores, define the seven segments and check samples by hand.
- Week 3: plays. Write the messages for each segment and build the automated flows, starting with new customers and at-risk customers.
- Week 4: launch and measure. Switch on the flows with holdout groups, set the monthly report and plan the first review.
RFM is one part of a retention system. If you would like help connecting it to acquisition, tracking and reporting, see our LTV optimisation work or book a free 30-minute consultation.
FAQ
There is no fixed number, but it becomes useful once you have a few thousand customers and some repeat purchasing. Below that, simple rules such as "ordered once" and "ordered twice or more" may be enough.
Yes. Export orders to a spreadsheet to calculate scores, or use Shopify customer segments with filters for last order date, number of orders and amount spent to build the main groups directly.
At least monthly, and ideally automatically. Customers move between segments as soon as they buy or as time passes, and stale scores send the wrong message to the wrong people.
The idea applies, but B2B accounts have fewer, larger transactions and contracts. Health scores based on product usage, support and renewal dates usually serve B2B better than pure RFM.
RFM groups customers by past behaviour. Customer lifetime value estimates how much a customer will be worth in total. RFM is a practical way to act on value differences before you have a reliable lifetime value model.