Skip to content

RFM & segmentation

How to Measure Repeat Purchases Correctly: A Complete Guide for Thai Online Shops

Three repeat-purchase metrics, one shop: learn to distinguish historical repeat share, period returning-buyer share, and cohort second-order rate — with worked arithmetic, maturity pitfalls, RFM scoring, and a weekly measurement contract.

อ่านเป็นภาษาไทย
An open notebook with a grid, a coffee mug and a small plant on a wooden desk
AI-generated editorial image of a notebook and desk; the grid is illustrative and contains no customer data.

A Shop Called Blossom Skin — and Three Numbers That Disagree

Imagine a Thai skincare shop named Blossom Skin. Its owner, Khun Dao, has been selling serums and moisturizers online for two years. Last Monday she opened three different reports and saw three different numbers: 19%, 18.75%, and 25%. Each report claimed to show her 'repeat-purchase rate.' Her data team had not lied — all three calculations were arithmetically correct. But each measured a genuinely different thing, answered a different question, and should never be dropped into the same sentence without a label.

This guide separates three useful measures, explains valid-order and customer-identity rules, shows five fictional timelines and gives a weekly measurement routine. The counts are original teaching inputs, not research results or product outputs. Each result must state its population and observation window so the team knows what decision it can support.

Why Three Metrics Exist and Why They Differ

Related metrics can legitimately differ because they use different populations and windows. Start by naming the question and denominator; do not call every percentage simply “repeat-purchase rate.”

Historical repeat share: among distinct customers with at least one valid purchase in the history being analysed, what share have at least two distinct valid orders? If your history is complete since launch, this can be an all-time measure. With a partial export, label its date range instead of claiming lifetime behavior. The proportion can change when new buyers arrive or older orders are imported, even without a change in any individual’s recent behavior.

Period returning-buyer share: among customers who bought in July, what share placed a valid July order after an earlier valid order in their history? The earlier purchase can occur before July. A customer with one June order and one July order is returning even though they bought only once in July. The denominator is all distinct July buyers. Extending a reporting period changes both counts, so the resulting rate need not rise.

First-purchase cohort second-order rate: among customers whose first valid purchase falls in a defined acquisition period, what share place a distinct second valid order within a fixed interval after that first purchase? The clock starts separately for each customer. This describes early repeat behavior, which can inform onboarding questions; it does not by itself measure an onboarding campaign’s causal impact. Compare completed windows separately from incomplete ones.

Shopify’s engagement and ecommerce-metrics guides describe repeat customers and customer-based denominators. The three precise reporting definitions here are declared teaching choices. Check the actual definitions, order policy and horizon before comparing any platform report; these sources do not establish identical reporting behavior across systems.

Sources: Shopify: customer engagement metrics · Shopify: ecommerce metrics and returning customers

Five Counting Rules You Must Write Down Before Measuring

Two shops with identical raw transaction logs can produce materially different repeat-purchase rates if they have made different undocumented choices about what counts as one order, one customer, or one valid purchase. These are business decisions, not universal standards. Write them down, version-control them, and apply them consistently every time you run a report.

Order identity: preserve raw exports and their legitimate line items. Count distinct order IDs when the unit is an order; counting distinct IDs does not mean deleting the product rows. Scope IDs to their source when different channels can reuse the same number. Investigate genuinely repeated records separately from multiple products on one checkout.

Rule 2 — Cancellations and refunds. A customer who placed and then cancelled an order before fulfilment may or may not have 'bought.' If you exclude cancelled orders, the day-10 order from a customer whose day-1 order was cancelled may become their effective first order, which changes the cohort start date. Decide: include or exclude, and at which status transition. Document the stage (e.g., 'exclude if status = cancelled before shipment').

Cash on delivery: decide which status qualifies for the metric. An order placed but not yet delivered may be pending under a delivered-order policy. Show pending orders separately and record when status changes affect the report. Apply the same policy to the first and subsequent orders; do not silently mix placement dates and delivery dates.

Multi-line-item orders: one checkout containing three products is one order. Retain the lines for product analysis, but count its order identity once. A repeated export of the same checkout must also not create another purchase. Keep the counting key and the source coverage beside the result.

Rule 5 — Timestamp ties. If a customer's records show two orders with identical timestamps — sometimes caused by system clocks or batch imports — you cannot determine which is 'first.' Flag these rows explicitly rather than silently picking either one. The number of affected customers and your resolution method should appear in your data-quality log.

For all numerical examples below, a valid order means a distinct source-scoped order that is delivered, fully paid and neither cancelled nor refunded at the stated reporting cutoff. “Confirmed order” and “qualifying order” refer to that same policy here. Purchase timing uses the original order-placement timestamp consistently; delivery status determines eligibility, not a replacement purchase date. Cancelled ORD-1003 fails this policy. These are fictional counting assumptions, not a CasperBrain status rule.

Cohort Maturity: Give Every Customer the Same Observation Window

For this guide, a qualifying second order occurs after the first valid order’s timestamp and no later than 30 elapsed days afterward. State the timezone and endpoint convention. A completed 30-day rate requires the full interval for every included member. Earlier results can still be shown as preliminary; keep the cohort denominator intact and label how much observation remains.

Fictional example: 100 customers make their first valid purchase during June 2026. By 31 July, every June entrant has completed 30 elapsed days. The latest 30 June entrant reaches that boundary at the corresponding time on 30 July. Suppose 25 customers placed a second distinct valid order inside their own windows. The completed rate is 25 ÷ 100 = 25%. Later purchases after day 30 do not enter this particular numerator.

On 28 July, some customers who first bought on 29 or 30 June still have open windows. Their preliminary rate may rise before all windows close, but it need not: no additional second orders are guaranteed. Do not infer a change in retention merely from comparing an unfinished rate with a completed one. Keep the report timestamp and maturity status visible.

Now assume 20 additional first-time buyers join on 25 July. Adding them to the June denominator while leaving its numerator unchanged gives 25 ÷ 120 ≈ 20.83%. That is not the June cohort’s rate: it combines two acquisition groups and different observation time. The valid June result remains 25 of 100. Report the July 25 group separately as incomplete rather than treating it as a lower June performance.

Lock the acquisition definition and valid-order policy, then record the latest window-close timestamp. Shopify’s cohort-retention guide explains grouping customers by first purchase and following later activity. Our fixed 30-day example adds an explicit common horizon for a reproducible comparison. If later data corrects an order status or missing import, explain why a previously reported count changed.

Cohort Maturity Timeline

Each customer receives 30 elapsed days after their first valid order. Preliminary results keep the cohort denominator and show incomplete windows; final rates use the declared timestamp boundary.

  1. 01Acquisition period opens

    First customers enter the cohort. Observation windows start on each member's own first-order date.

  2. 02Acquisition period closes

    No new members join. Cohort size is now fixed.

  3. 03Last window closes

    The latest June 30 entrant completes 30 elapsed days on July 30 at the corresponding time. A July 31 report is safely after every June window.

  4. 04Rate is calculable

    Count distinct cohort members with a qualifying second order inside their own windows, divided by the unchanged cohort size.

  5. 05Compare across cohorts

    Compare the same horizon and definitions; label incomplete rates separately rather than treating them as final.

Sources: Shopify: cohort retention analysis

Five Customer Timelines (Fictional Teaching Examples)

These five fictional timelines illustrate specific counting decisions. Day numbers use the same time of day unless stated otherwise: Day 31 is 30 elapsed days after Day 1. They are separate teaching examples, not the raw records underlying the 100-person cohort.

Customer A — Nok. First order on Day 1 (Order ID: ORD-1001). Second confirmed order on Day 22 (Order ID: ORD-1042). Day 22 falls inside the 30-day window. Nok counts in the numerator. ✓

Customer B — Malee. First order on Day 1 (Order ID: ORD-1002). Second confirmed order on Day 35 (Order ID: ORD-1078). Day 35 is outside the 30-day window. Malee does NOT count toward the cohort's 30-day second-order rate. She will, however, appear in the historical repeat share calculation, because she did eventually reorder. This illustrates why historical repeat share is always higher than or equal to a short-window cohort rate for the same group of customers.

Customer C — Pong. First order on Day 1 (Order ID: ORD-1003, status: cancelled Day 3). Reorder on Day 10 (Order ID: ORD-1021, status: delivered). Under a policy that excludes cancelled orders, ORD-1003 is not a valid first order. ORD-1021 becomes Pong's effective first order, and his cohort clock starts on Day 10. Whether or not he subsequently reorders within 30 days of Day 10 depends on further data. Under a policy that includes cancelled orders at placement, ORD-1003 is his first order and ORD-1021 is his second — counting in the numerator. Same customer, different rate, depending purely on documented policy.

Wanchai has one checkout on Day 5, ORD-1044, with three products. The export contains three legitimate line-item rows. Count ORD-1044 once as a purchase and retain its lines. Treating the three rows as three orders would wrongly label Wanchai a repeat buyer.

Som first orders on Day 1, ORD-1005. Her 30-elapsed-day boundary is Day 31 at the matching time. On Day 20 the outcome is still incomplete. Keep Som in the acquisition cohort denominator and mark the cohort or member window as open. Removing only people whose outcomes are not yet known changes the question and can bias the rate.

CustomerFirst valid order IDSecond valid order IDSecond Order DayWithin 30-Day Window?Counts in second-order numerator?Notes
Nok (A)ORD-1001ORD-1042Day 22YesYesStandard case — counts
Malee (B)ORD-1002ORD-1078Day 35NoNo (cohort rate) / Yes (historical repeat share)Outside the 30-day numerator; included in historical repeat share once observed
Pong (C)ORD-1021No later valid order shownUnknownUnknownNo qualifying second order shownCancelled ORD-1003 excluded; first valid order is overall Day 10
Wanchai (D)ORD-1044 (3 line items)——N/ANo — only 1 distinct orderDeduplication required; raw row count misleads
Som (E)ORD-1005None observed by Day 20UnknownWindow incomplete; closes Day 31Not yet observed; keep in denominatorReport the cohort as preliminary

Worked Arithmetic: Three Metrics Side by Side

The following supplied counts illustrate three reports for fictional Blossom Skin as of 31 July 2026. They share a shop, not a denominator. The five-person timeline table does not generate these larger totals.

Metric 1 — Historical repeat share. All-time distinct customer count: 200 (deduplicated by customer ID). Customers with at least two distinct confirmed orders across all time: 38. Calculation: 38 ÷ 200 × 100 = 19.0%.

July returning-buyer share: 80 distinct customers placed at least one valid order during July. Of them, 15 placed a valid July order with an earlier valid order in their linked history. That earlier order may predate July. The share is 15 ÷ 80 × 100 = 18.75%. It describes the composition of July buyers, not just people ordering twice inside July.

Metric 3 — Cohort second-order rate (June, evaluated 31 July). June first-time customers: 100. Customers with a distinct second confirmed order within 30 days of their own first order: 25. Calculation: 25 ÷ 100 = 25.0%. All windows are closed as of 31 July.

Historical 19%, July 18.75% and June 30-day 25% answer different questions. Use the historical measure for the declared accumulated history, the period measure for the mix of current buyers, and the cohort measure for early repeat behavior within a common window. None alone proves that a campaign caused more purchasing.

MetricNumeratorDenominatorResultWhat It Answers
Historical repeat share38 all-time repeat buyers200 all-time distinct customers19.0%What fraction of all customers ever have reordered?
Period returning-buyer share (July)15 July buyers with an earlier valid order80 distinct July buyers18.75%What share of July buyers made a returning purchase?
Cohort 2nd-order rate (June, mature)25 customers with 2nd order within 30 days100 June first-timers25.0%What share of June first-time buyers placed a second valid order within 30 days?

Sources: Shopify: ecommerce metrics and returning customers

RFM Segmentation and How It Connects to Repeat-Purchase Depth

CasperBrain uses four quartiles on recency, frequency and monetary value, where 1 is the strongest purchasing rank and 4 the weakest. Read 114 as R = 1, F = 1, M = 4: strong recency/frequency ranks and lower total-spending rank in the scoring scope. Monetary value is not spending per order or profit; the three-character code should not be added or averaged.

A frequency quartile is a rank relative to a population. It does not automatically place someone in the numerator of a particular repeat metric. Check actual distinct valid order counts and dates. In a sparse population, a strong frequency rank does not even guarantee two orders. Movement between quartiles can reflect a changed population or history, not a newly completed second purchase.

Vendor scores may use five levels or reverse the direction. Confirm the definitions, windows and thresholds before comparing them; recompute from suitable source data when needed. Do not assume an external 5 maps to any CasperBrain quartile, or invent how an unsupported score would be imported. Use RFM as context alongside the explicitly defined repeat-purchase measure.

Distinguishing Observed Association from Causal Lift

A higher purchase rate among loyalty-program members does not establish that joining caused it. Customers who already planned to return may be more willing to join. A comparison must address selection and other differences. One useful approach for the following fictional campaign question is prospective randomized assignment.

Suppose 200 eligible first-time buyers are randomized immediately after their first valid order into two groups of 100. One group is assigned a new follow-up message sequence where the contact permissions allow it; the other continues the usual experience without that additional sequence. Do not withhold agreed callbacks or necessary service. Observe each customer for 30 days after their first order and retain everyone in their originally assigned group, including undelivered messages.

— Arm A: 20 out of 100 customers placed a second order = 20.0% second-order rate. — Arm B: 14 out of 100 customers placed a second order = 14.0% second-order rate. — Absolute difference: 20% − 14% = 6 percentage points (pp). — Relative difference: 6 ÷ 14 ≈ 42.86% — meaning Arm A's rate is about 43% higher relative to Arm B's rate. Note that 6 pp and 42.86% are describing the same gap in two different ways; they are not interchangeable.

The observed difference favors the assigned sequence, but 100 people per group and six additional purchasers do not establish a dependable positive effect. Chance variation remains, and other execution problems such as cross-group contact can distort interpretation. Decide the success criterion, observation horizon and sample plan before launch, and evaluate uncertainty with an appropriate statistical method. This guide does not supply an inferential confidence interval or declare significance. A larger sample improves precision only if the design and data remain sound; it does not guarantee a positive result.

Compare Mature and Incomplete Cohort Rates Carefully

A newer cohort can have less observation time. Its current second-order rate should not be compared as a completed 30-day outcome when some members’ windows remain open. A lower preliminary bar may reflect incomplete observation, a different customer mix, weaker repeat behavior or several factors. The chart alone cannot tell you which.

Consider this fictional three-month example for Blossom Skin, evaluated on the same reporting date:

Fictional inputs: Month A has a 28% completed 30-day rate; Month B has 22%; Month C currently shows 11%, with approximately half its members still inside their 30-day windows. The completed Month C value is unknown. All groups use the same stated valid-order rule.

Month C may rise as additional qualifying purchases occur, or it may remain 11%. A future 24% or 26% is not given by the data. Do not invent a mature value, declare a worsening trend from incomplete observation, or promise that the apparent difference will disappear.

Show the maturity label and expected latest window-close date beside the rate. If you need an earlier comparison, use the same shorter elapsed horizon for all included members and label it clearly. An overall blended rate can hide different cohort patterns, so show the relevant groups and denominators.

Cohort analysis breaks the data into distinct groups, and when done correctly it acts as an early warning system — but only when cohorts are compared at the same stage of maturity, not at the same calendar date.

Mature and Incomplete Cohort Rates — Fictional Example

Month C is currently 11%, with about half its member windows incomplete. Its final 30-day value is unknown; additional purchases are possible, not guaranteed.

  1. 28 % second-order rateMonth A (mature)

    All 30-day windows closed. Rate is final and comparable.

  2. 22 % second-order rateMonth B (mature)

    All 30-day windows closed. Rate is final and comparable.

  3. 11 % second-order rateMonth C: incomplete

    About 50% of member windows remain open. The rate may rise or stay unchanged; do not treat it as a final 30-day comparison.

Sources: Shopify: cohort retention analysis

Data-Quality Checklist Before Any Rate Is Published

Before circulating any repeat-purchase figure, run through the following eight checks. Each one addresses a failure mode described earlier in this guide. Initial each item in your data log with the analyst name and date so the check can be audited later.

1. Window elapsed? For a final 30-day cohort rate, confirm every member has completed the interval. Otherwise keep the cohort denominator and label the result preliminary, with open windows visible.

2. Customer identity: retain each source customer ID and use a separate lookup for verified links to shared customer keys. Shared or reused email/phone details do not by themselves prove one-person identity. Keep uncertain matches separate and preserve the evidence for accepted links.

3. Cancellation/refund policy applied? Check that the current documented policy (include or exclude, at which status stage) was applied uniformly. If the policy changed since the last report, note the change and its effective date.

4. COD status: show pending orders separately and apply the stated valid-order policy consistently. Pending records can remain in the source dataset without entering a delivered-order metric.

5. Row duplication: distinguish repeated imported records from legitimate product lines on one order. Preserve the raw export and product history. Count distinct source-scoped order identities; do not delete all but one product row merely to calculate order frequency.

6. Order unit: count distinct source-scoped order identities, preserving legitimate product rows. Check that the same order exported twice is not counted twice.

7. First-order date certainty? Flag any cohort member whose first-order date is uncertain — for example, because an earlier guest-checkout order may not have been linked to their account at the time.

8. Report date recorded? Log the exact date the report was run so that cohort maturity can be re-verified if the report is revisited weeks later.

Weekly Measurement Contract for Thai Shops

Choose a review rhythm that matches the decision. Operational data can be checked weekly, while a completed 30-day cohort result becomes available only when its windows close. Keeping data current does not mean labeling incomplete outcomes as final.

Monday: inspect newly available orders and their statuses. Preserve full order/line-item history, apply the documented valid-order policy and connect verified customer identities through a separate lookup. Keep pending COD orders visible under the chosen policy and record distinct buyer/order counts.

Tuesday. Update the cohort tracking table. Add any cohort whose last window closed in the prior week — these are now mature and eligible for final reporting. Mark all other cohorts clearly as 'windows still open.' Do not publish rates for immature cohorts without an explicit 'preliminary' label.

Wednesday: for cohorts whose windows completed, count actual customers with a distinct qualifying second order inside the window. If RFM is useful context, inspect it separately after the relevant data is imported and rescored. Do not call quartile movement an onboarding conversion or a campaign effect.

Thursday: compute the prior week’s returning-buyer share using customers with a valid purchase during that week and an earlier valid order in their history, divided by all distinct buyers that week. The earlier purchase may occur before the week. Compare equal-length reporting periods and check source coverage before interpreting a sharp change.

Friday. Circulate a one-page summary that clearly distinguishes: (a) which cohorts are mature and what their final rates are; (b) which cohorts are immature and when they mature; (c) last week's period returning-buyer share with the prior four-week trend; (d) any data-quality anomalies from the Monday/Tuesday checks. Every number on the page must carry its denominator and window label. Cohort metrics are generally better reviewed monthly to quarterly rather than daily, because cohorts need time to accumulate sufficient activity to show meaningful patterns — the weekly rhythm described here is a monitoring layer, not a replacement for monthly cohort reviews.

Sources: Shopify: customer engagement metrics

Before Using a Benchmark, Check Whether It Measures the Same Thing

A published ecommerce percentage is not automatically a suitable target for a Thai shop. Before comparing it with your result, find its denominator, purchase-status policy, observation window, customer identity method, sample and market. If those details are missing, use the article to form a question rather than borrowing its number as a target.

A statement that a customer did not reorder during a particular window is not evidence that they will never reorder. Likewise, an all-time repeat share is not comparable with a 30-day first-purchase cohort rate. Match the definitions before comparing magnitudes, even when the two percentages happen to be similar.

For this guide, the fictional 25% June result is a calculation exercise, not a benchmark or a typical Thai outcome. The sources explain metric and cohort concepts; they do not establish a comparable country-specific target for these examples. Avoid presenting vendor averages as promised results.

Your own completed cohorts can provide useful context when the horizon, data coverage and counting rules match. Record changes in product mix, acquisition source, stock availability and follow-up policy beside the figures. A difference suggests investigation; it does not by itself explain the cause.

Six Common Errors and Three Commitments to Make This Week

Use these checks before sharing a repeat-purchase result. They address the mistakes illustrated in this guide; they are not a ranking of the most common industry failures.

Check 1: compare completed and incomplete windows separately. Keep the acquisition denominator intact and state the latest close date. For the fictional Month C 11% bar, about half the members still have open windows.

Check 2: count distinct source-scoped order identities, preserving legitimate product rows. Line-item counts and repeated exports must not become additional purchases.

Check 3: separate observed association from causal evidence. The recommended randomized example compares original assignments over the same horizon, but it still needs execution checks and an assessment of uncertainty. A higher rate among people who chose to join a program is not equivalent evidence.

Check 4: read RFM using its actual convention. CasperBrain uses 1 best and 4 worst purchasing ranks. Vendor scales and thresholds are not interchangeable without checking or recomputing their definitions. A rank does not replace the distinct-order/date conditions of the chosen repeat metric.

Check 5: do not declare a campaign proven from the six-percentage-point teaching difference. Report 20 of 100 versus 14 of 100, the common 30-day horizon and the planned uncertainty assessment. No significance claim or numerical confidence interval is supplied here.

Error 6 — Using a blended average when cohort-level patterns diverge. A stable 19% all-time repeat share can mask the fact that cohorts from the past two quarters are trending in opposite directions. Cohort-level visibility is the antidote.

Three commitments for this week: (1) Write down all five counting-rule decisions from Section 2 in a shared document that your whole data team can see — today, before you pull any new report. (2) Open your cohort tracking table and identify which cohorts are mature enough to report with confidence and which still have open windows; mark the latter clearly. (3) If you are planning a retention campaign, specify the sample size and success criteria before you launch, so that when results arrive you can evaluate them against pre-stated expectations rather than rationalising whatever number appears.

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.