RFM & segmentation
RFM Monetary Value Is Not Profit: Choose the Right Spending Definition
Separate recorded payments, refunds, shipping and gross profit before choosing a consistent spending-based M. A fictional worked example and export checks help Thai online shops define what to measure.
อ่านเป็นภาษาไทย
A tale of two customers at Ploy Skincare
Imagine a fictional Thai online shop called Ploy Skincare. The owner, Ploy, has just finished her first RFM analysis and is looking at two customers who both land in the top Monetary quartile. Customer A — call her Nida — spent ฿14,000 over the past twelve months across seven orders. Customer B — call him Krit — also has a gross order total near ฿14,000, but four of his transactions were bundles sold at a deep discount during a flash sale, and he returned one order worth ฿2,000. If Ploy's spreadsheet sums every baht collected before adjustments, both customers may look similar. The moment she subtracts Krit's refund, his net figure drops to roughly ฿12,000 — noticeably below Nida's ฿14,000. And even that adjusted figure ignores the fact that Krit's discount-heavy bundles carry a much thinner margin than Nida's full-price purchases.
That gap matters when Ploy chooses a membership audience or sets a retention budget. Recorded spending and profit answer different questions. Monetary value in RFM measures customer spending during the chosen analysis window, but refunds and shipping can change the included amount. Define the intended measure, check the source fields and apply the same rule to every customer. A change in definition can change M inputs and customer comparisons; it does not automatically change every segment.
What Monetary value actually measures — and what it does not
RFM's M dimension captures how much a customer spent in total during a defined analysis window. It is a backward-looking, spending-based figure drawn from transaction records. It is not average order value — dividing total spend by order count gives you something useful, but it is a different metric that would need its own scoring logic. More importantly, M is not profit. As Shopify's RFM guide states, RFM does not measure customer profitability, and the M score reflects total spending, not the margin the business retains after costs.
This matters because two customers with identical M scores can be worth very different amounts to the business. If Nida buys moisturiser at a 60 percent gross margin and Krit buys bundled sets at a 20 percent gross margin, Nida generates three times as much gross profit per baht of spend — yet RFM, working from spend figures alone, treats them the same. Recognising this limitation is not a reason to abandon RFM; it is a reason to understand exactly what question the M score is answering and to complement it with profitability data when the business decision demands it.
Sources: Shopify: RFM Analysis — Definition and Segmentation Guide
Three financial concepts that are easy to confuse with M
Salesforce describes gross revenue as the total of all money coming in from outside sources before any deductions or expenses are subtracted. This business-wide term is not automatically a customer-spending field. Keep pre-discount list-price amounts separate from recorded payments. In the fictional example below, a ฿50 checkout voucher reduces the ฿1,000 merchandise price to ฿950; adding ฿50 shipping means the customer pays ฿1,000. The pre-discount merchandise-plus-shipping amount would be ฿1,050, but that is not money received from this customer. The table therefore labels the first row as the amount paid at checkout, not as a universal gross-revenue definition. When inspecting your order export, confirm whether the recorded invoice figure is already post-discount before applying any further adjustment — subtracting a discount that is already reflected in the stored total would understate the amount actually received.
The cited Salesforce overview uses net revenue for gross revenue less deductions and expenses. That wording does not establish the meaning of a field in this shop's order export. For the spending comparison below, we instead name the transaction measure explicitly: recorded customer payment minus the confirmed refund, then exclude shipping only for the product-spend variant. We do not present that measure as a universal accounting definition of net revenue or assume that an order-management system supplies it. Check the source field description before calculating M.
Gross profit is a separate measure, calculated from a specified revenue amount less the cost of goods sold (COGS). Gross profit margin divides that gross profit by the same revenue amount and multiplies by 100. For a fictional example, revenue of ฿500,000 less COGS of ฿350,000 gives ฿150,000 gross profit and a 30 percent gross profit margin. This calculation has not deducted operating expenses and does not establish net profit. The baht amount and percentage answer different questions; a customer-level calculation requires corresponding cost data. Keep this profitability analysis separate from the documented spending inputs used for M.
Sources: Salesforce: What is Gross Revenue? · Salesforce AU: Gross Profit Margin — formula and guide
Worked example: one order, three spending-based M values
Consider fictional order #TH-00412 placed by Som at a Thai home-décor shop. All figures are invented for teaching. The basket contains a lamp and a small accessory with a total listed merchandise price of ฿1,000. A ฿50 checkout voucher reduces the merchandise amount to ฿950. Shipping is ฿50, so Som pays ฿1,000 in total. Two weeks later she returns the accessory, worth ฿200, and receives a ฿200 refund.
The table has four rows. Rows 1–3 show three explicitly different spending-based contributions: ฿1,000 paid at checkout including shipping before the refund, ฿800 retained after the refund including shipping, and ฿750 after the refund excluding shipping. These are raw amount inputs, not M quartile scores. Row 4 is a separate illustrative gross-profit contribution of ฿375 using an assumed 50% COGS on the ฿750 net product spend; it is not a standard spending-based M input — it is a profitability figure that requires order-level cost data and belongs to a separate analysis. Choose one documented spending rule for the analysis and apply it consistently, rather than mixing the rows across customers.
| M definition | Calculation | Amount (฿) | What it reflects |
|---|---|---|---|
| Amount paid at checkout (after voucher, before refund, including shipping) | ฿950 merchandise + ฿50 shipping | 1,000 | Recorded checkout payment; the later ฿200 refund has not yet been deducted. The unpaid voucher is not added back as an inflow. This assumes the export records the post-discount invoice amount; if the export stores the pre-discount amount and a separate discount field, subtract the discount field once — not again. |
| Recorded invoice minus return (post-discount, after refund, including shipping) | ฿950 invoice + ฿50 shipping − ฿200 refund | 800 | Inflows as recorded at checkout after the voucher, then reduced by the return; includes shipping |
| Net product spend (post-discount invoice, after return, excluding shipping) | ฿950 − ฿200 | 750 | What Som paid for goods she kept; excludes logistics pass-through |
| Gross profit contribution — supplementary profitability figure, not a standard M variant | ฿750 net product spend − ฿375 (assumed 50% COGS) | 375 | What the business retained after direct costs; requires COGS data per order and is a separate profitability metric, not an M definition |
Why platform configuration makes M a deliberate choice
The fact that M is configurable, not automatic, is visible in enterprise retail software. Microsoft Dynamics 365 Commerce, for example, gives analysts an explicit toggle between gross and net invoice as the M basis, and a separate checkbox to subtract return amounts before the monetary score is calculated. This design makes explicit something that spreadsheet-based analyses often leave implicit: the M definition is a setup decision, not a fact the data simply produces on its own.
Dynamics 365's approach is specific to that platform, and the settings available in any other tool — including CasperBrain — must be verified in that tool's own documentation and configuration screens. The broader lesson, however, applies everywhere: before running an RFM analysis, the analyst must decide which transaction amounts contribute to M, document that decision, and apply it identically to every customer. Changing the rule mid-cycle, or allowing different data exports to include different deductions, produces scores that cannot be meaningfully compared.
Sources: Microsoft Dynamics 365 Commerce: Set up RFM analysis
High M does not mean high profitability
One of the most consequential misunderstandings in RFM practice is treating the top M quartile as synonymous with 'most profitable customers.' Consider two fictional customers at a Thai electronics accessories shop. Customer Dao has a 12-month spend of ฿18,000 across six orders of full-price cables and adapters, each carrying a 55 percent gross margin. Customer Lek has a 12-month spend of ฿20,000, but almost all of it comes from deeply discounted bundle promotions that carry a 12 percent gross margin. On a spending-based M measure, Lek ranks higher than Dao. Yet Dao generates roughly ฿9,900 in gross profit while Lek generates roughly ฿2,400 — a fourfold difference in gross profit amount that the M score alone cannot reveal.
Gross profit margin — (Revenue minus COGS) divided by Revenue, multiplied by 100 — captures the efficiency rate, but the gross profit amount (margin rate multiplied by spend) determines how many baht the business actually retains per customer. Both figures matter for profitability ranking: a customer with a high margin rate on a small spend may generate less gross profit than a customer with a moderate margin rate on a much larger spend. Either way, both calculations require COGS data that most standard order exports do not include. Gross profit is a separate supplementary metric, not a variant of M; feeding it into the M column would undermine the core point that M measures spending, not profit. When a business decision depends on profitability rather than spending volume, gross profit data — amount and rate — must be joined to the RFM dataset separately. RFM's M dimension, used on its own, is a spending signal, not a profitability signal, and decisions calibrated on the assumption that they are the same will systematically over-invest in high-volume, low-margin buyers.
Customer Dao spends less in total (฿18,000) but at a 55% gross margin, while Customer Lek spends more (฿20,000) at a 12% gross margin. On a spending-based M measure Lek ranks higher, yet Dao contributes roughly four times as much gross profit in baht. All figures are invented teaching examples.
RFM's M versus customer lifetime value: answering different questions
M measures what a customer has already spent inside a defined, historical analysis window. Customer lifetime value (CLV) attempts to estimate the total financial value a customer is expected to generate over the whole relationship — past, present, and future. These two concepts are related but not interchangeable, and conflating them leads to poor planning decisions.
An M score is useful for segmenting today's customer base by observed past behavior. It answers the question: 'Among customers who were active in the past twelve months, who spent the most?' CLV asks a forward-looking question: 'How much is this customer relationship worth over time, and how much should I spend to retain or acquire them?' Shopify's RFM guide notes that RFM helps identify campaign audiences while CLV informs how much the business can afford to spend acquiring or retaining them — they serve sequential rather than identical planning roles. A customer with a high M score in the last twelve months is not necessarily a customer with a high predicted CLV; they might be a one-time large buyer unlikely to return. Using M as a CLV proxy without additional evidence overstates retention value for infrequent big spenders and understates it for moderate but consistent purchasers.
CasperBrain's RFM module scores customers on Recency, Frequency, and Monetary value using four quartiles numbered 1 (best) to 4 (worst), producing composite text codes such as '114'. The composite score describes past purchase behavior within the configured analysis window and should not be read as a guarantee of future spending or profitability. When planning how much budget to allocate to a retention campaign for a segment, CLV estimates and gross profit data should complement, not substitute for, the RFM classification.
Sources: Shopify: RFM Analysis — Definition and Segmentation Guide · HubSpot: RFM Analysis — A Data-Driven Approach to Customer Segmentation
Five questions to choose the right M definition for your shop
There is no single correct M definition that applies to every Thai online shop. The right choice depends on the decision the analysis is meant to support, the data the shop can reliably export, and the consistency with which the definition can be applied. Working through these five questions before configuring any RFM tool will save significant rework later.
First: does your shop process meaningful refunds? If returns are rare and small, subtracting them may add complexity without changing scores materially — but whether that is the case depends on the distribution of refunds across individual customers and on where score boundaries fall in your dataset. If returns are frequent in your shop, omitting them overstates M for customers who regularly buy and return. Second: does your shop offer significant promotional discounts, and does your system record the list price or the post-discount invoice amount? Inspect the export fields carefully: if the stored invoice figure is already post-discount, no further discount adjustment is needed and subtracting a separate discount field would double-count the deduction. If post-sale credits or rebates are applied after invoicing and stored in a separate field, subtract those because they reduce the net amount the customer actually paid. Third: does your shop collect shipping fees separately? Shipping revenue is not product spend; including it inflates M for customers in distant provinces who pay high shipping charges through no choice of their own, and understates M for Bangkok customers on free-shipping thresholds. When a shipping promotion waives the fee, the resulting shipping line is zero, so it has no impact on M regardless of whether you include or exclude the field — but verify the export structure, because some systems store free shipping as a shipping charge offset by a shipping discount rather than a simple zero. Separating shipping from product spend produces a cleaner product-spend M. Fourth: do you have order-level COGS data? If your shop maintains product cost records linked to each order, you can construct a gross-profit analysis at the customer level as a separate supplementary metric alongside your spending-based M. If that cost data is not available — which is the situation for many shops running on a single order-management system without integrated product cost records — spending-based M is the practical choice, with the explicit understanding that it is not a profitability measure. Fifth: will you compare M amounts or M quartile scores across time periods or across customer cohorts? Keeping the same definition is necessary but not sufficient for score comparability. Quartile-based M scores (such as CasperBrain's 1-best to 4-worst scale) are relative: they reflect each customer's position within the scoring population at a given point in time. If the population changes — because of growth, seasonality, or a new customer cohort — the same raw monetary amount can fall into a different quartile in a later period. For this reason, raw monetary amounts are directly comparable across periods when the definition is held constant, but quartile scores require the same population and thresholds to be meaningfully compared. Any change to the definition requires a full recalculation of historical amounts before any comparison is valid.
Practical steps to document and lock your M definition
Once you have answered the five questions above, the implementation is straightforward — but only if the decision is written down and enforced. The following steps apply whether you are working in a spreadsheet, a dedicated RFM tool such as CasperBrain, or any other platform.
Step 1: write a one-sentence M definition before touching any data. For example: 'M equals the sum of paid invoice amounts (after discounts applied at checkout) minus confirmed refunds, excluding shipping fees, for orders completed within the twelve-month window ending on the analysis date.' That sentence should live in the header of every analysis file and in any report shared with decision-makers.
Step 2: identify the exact database fields or CSV columns that correspond to your definition, and verify what each field contains. If your order export has separate columns for invoice amount, discount amount, shipping amount, and refund amount, first confirm whether the invoice amount is already post-discount or pre-discount. If it is pre-discount, your M calculation is: invoice amount minus discount amount minus shipping amount minus refund amount. If the invoice amount is already post-discount, your M calculation is: invoice amount minus shipping amount minus refund amount — do not also subtract the discount field. Name the derived column 'M_net_product_spend' or similar so it is unambiguous.
Step 3: handle edge cases before scoring. Decide what to do with partially refunded orders, orders that straddle the analysis window boundary (order placed inside, refund processed outside), and cancelled orders that were never fulfilled. Document each decision. CasperBrain users should verify how their configured export handles these cases by checking a sample of known orders against the exported figures.
Step 4: apply the same definition to every customer in the dataset. Inconsistent treatment — for instance, including shipping for some customers because their orders were exported from a different system — creates systematic bias in the scores. Run a sense check: sort customers by M and manually verify the top 20 against their order histories.
Step 5: version-control the definition. When the shop changes its refund policy, introduces a new shipping structure, or switches platforms, create a new dated version of the M definition rather than silently updating the old one. Raw monetary amounts calculated under the same definition across periods can be compared directly; quartile scores cannot be compared across periods unless the scoring population and thresholds are also equivalent, because quartiles are relative ranks within the population at the time of scoring.
What to include and exclude: a reference table
The table below summarises the most common transaction components and gives a recommended default treatment for a Thai online shop using spending-based M. These are editorial recommendations, not platform guarantees; verify the behavior of any specific tool against a known sample before relying on it in production.
| Transaction component | Include in M? | Rationale |
|---|---|---|
| Product amount recorded at checkout (post-discount invoice amount) | Yes | Core spending signal; reflects the price the customer accepted at the time of purchase |
| Promotional voucher discount already deducted in the recorded invoice total | Already reflected — do not subtract again | If the export stores the post-discount invoice amount, the discount is already embedded; subtracting a separate discount field on top would double-count the deduction. Confirm which format your export uses. |
| Promotional voucher discount stored as a separate field when the invoice is pre-discount | Subtract once | In this case the stored invoice is pre-discount and the discount field must be subtracted to arrive at what the customer actually paid |
| Post-sale cashback or rebate credited to customer account after invoicing | Subtract | Reduces the net amount the customer paid; omitting it overstates M |
| Confirmed refund for returned goods | Subtract | Customer did not retain these goods; including the refunded amount inflates M |
| Shipping fee charged to customer | Exclude by default | Logistics pass-through; inflates M for distant customers independent of product preference |
| Shipping fee waived by shop (free shipping) | No impact | The resulting shipping line is zero, so it does not affect M regardless of whether the field is included or excluded. Verify the export structure: some systems record free shipping as a shipping charge offset by a shipping discount rather than a plain zero. |
| Cancelled order never fulfilled | Exclude | No economic exchange occurred |
| Gift wrapping or add-on service fee | Include or exclude consistently | Minor; whichever choice is made, apply it to every order |
| COGS or cost data | Do not include in spending-based M | COGS belongs to a separate gross-profit analysis requiring product cost data; mixing it into M conflates spending with profitability |
Limitations of spending-based M and when to go further
A well-defined spending-based M is genuinely useful: it ranks customers by the economic scale of their relationship with the shop, flags high-frequency small spenders versus infrequent large buyers, and supports campaign targeting decisions that would otherwise rely on intuition alone. Shopify's RFM documentation confirms that spending-based M, applied with consistent rules for refunds and cancelled orders, is the standard foundation for this kind of analysis.
That said, spending-based M has real limits that practitioners should state openly rather than paper over. It cannot distinguish a high-margin customer from a low-margin one without external COGS data. It is sensitive to the analysis window: if both an inactive customer and a brand-new customer have no orders inside the configured window, both contribute ฿0 to M — meaning their scores for that dimension may be identical within the same scoring population, even though their full histories differ. The practical effect depends on how the tool handles zero-spend customers and where score boundaries fall, so verify this against a sample before drawing conclusions. M is also sensitive to definition changes: a shop that switches from one M definition to another mid-year will see apparent shifts in raw monetary amounts that reflect the accounting change, not a real change in customer behavior. Quartile scores are even more sensitive: they are relative ranks within the current population, so they can shift across periods due to population changes or threshold changes even when the raw amounts and the definition remain constant. Never compare quartile scores across periods without also verifying that the scoring population and thresholds are equivalent.
When profitability differences across customers are large enough to change business decisions — for instance, when deciding which segment to invite to a premium loyalty tier — the spending-based M should be supplemented with a gross-profit analysis at the customer or segment level. That analysis uses both gross profit margin rate and gross profit amount: the margin rate shows cost efficiency, while the gross profit amount shows how many baht each customer actually contributes. Both figures require order-level COGS data, which may need to be maintained separately and joined to the order export. The investment is warranted when margin variation is high and the resulting gross profit amounts differ materially across customers; it is less critical when the product mix is narrow and margins are relatively uniform across the catalogue.
Finally, remember that RFM scores describe observed past behavior, not guaranteed future behavior. HubSpot's RFM analysis resource notes that RFM can be used to assess which customers are more likely to purchase again, but this is a probabilistic inference from historical patterns, not a causal mechanism. A customer who scored high M last year may not repeat that spending next year. Treat high M segments as worth prioritising for retention effort, not as certain revenue.
Sources: Shopify: RFM Analysis — Definition and Segmentation Guide · HubSpot: RFM Analysis — A Data-Driven Approach to Customer Segmentation
Putting it together: a decision guide for Thai online shops
The practical upshot of everything above is a short decision path that any shop owner or analyst can follow before configuring M in any RFM tool.
If the shop's primary goal is campaign targeting — deciding who to contact, with what offer, at what priority — a net-product-spend M (post-discount invoice minus confirmed refunds, excluding shipping) is a practical default choice. It reflects what the customer actually paid for goods they kept, is achievable with standard order exports, and avoids the geographic bias introduced by shipping fees.
If the shop's goal is profitability ranking — identifying which customers to invest in most heavily for loyalty programs or high-cost retention campaigns — net-product-spend M should be augmented with a gross-profit analysis run as a separate step. That analysis should consider both the gross profit margin rate (to understand cost efficiency) and the gross profit amount (to understand total baht retained per customer). Rank customers by gross profit generated in baht, not by margin rate alone, and use the RFM code as a behavioral overlay rather than the primary financial ranking.
If the shop is comparing raw M amounts across time periods or reporting them to stakeholders, freeze the definition in writing before the first analysis run and treat any future change as a version break requiring full recalculation. If comparing quartile-based M scores across periods, additionally verify that the scoring population and thresholds are equivalent; a frozen definition is necessary but not sufficient for quartile-score comparability.
Whatever definition is chosen, CasperBrain users who export customer data for offline analysis should verify that the exported figures match their chosen definition against a sample of known orders. Pay particular attention to whether the stored invoice amount is pre- or post-discount, and whether shipping is stored as a separate line or embedded in the total. The platform's export fields and their inclusion or exclusion of discounts, refunds, and shipping should be confirmed in the product's own documentation rather than assumed from general RFM principles. The goal is not to find the single universally correct M — it is to make one clear, documented, consistently applied choice that matches the question the analysis is trying to answer.
Sources and editorial method
Examples are fictional and contain no customer records. Prepared by the CasperBrain team with AI drafting assistance; facts and language are checked before publication.