How many customers placed their second-ever order in April?
Define the metric, numerator, denominator and exclusions so another analyst can reproduce them.
Open the detailed checksA service replacement adds a returning customer. To count second purchases this month, someone filters customers who currently have exactly two orders. Each count may answer a different question. Define the purchase behavior before reconciling identity, sequence and observation windows.
WESWOO · · 简体中文
| Observation | Next action |
|---|---|
| Define the behavior to count | Define the metric, numerator, denominator and exclusions so another analyst can reproduce them. |
| Separate purchases from service replacements | Original orders reconcile to included, excluded and uncertain groups; replacements are not silently treated as paid purchases. |
| Review discrepancies before acting | A second analyst reproduces the same snapshot; discrepancies are explained and campaign impact is tested separately. |
A WESWOO repeat-purchase analysis procedure. The merchant thread distinguishes historical second orders from customers with two orders now; official reporting documentation supplies context. No real order history or retention improvement was measured. Workbook examples are illustrative.
The workbook contains a blank record and an illustrative example. Fill the scope, observations, evidence, owner and next review. Unsupported results stay unverified.
Download the editable record and example (Excel)This combined workbook contains six workflows, each with a blank and illustrative sheet. Choose the pair matching this article.
A WESWOO repeat-purchase analysis procedure. The merchant thread distinguishes historical second orders from customers with two orders now; official reporting documentation supplies context. No real order history or retention improvement was measured. Workbook examples are illustrative.
Write a checkable question such as customers making their second paid purchase this month. Specify store time zone, extraction time, cancellation/refund treatment and sample rules. Different customer reports have different scopes; a returning-customer percentage is not automatically this custom metric.
How to verify: Define the metric, numerator, denominator and exclusions so another analyst can reproduce them.
Join orders with stable customer identifiers, flagging guests, duplicates and uncertain identities. Shared names or addresses are insufficient for automatic merges. Build an evidenced mapping in an analysis copy before considering changes to customer records.
How to verify: Each order maps to one analytical identity; uncertain matches are counted separately.
Retain the full order list and classify purchases, samples, tests and service replacements. Zero value alone does not establish a service order; discounts or payment arrangements can also explain it. Record exclusions and the chosen refund treatment before calculating.
How to verify: Original orders reconcile to included, excluded and uncertain groups; replacements are not silently treated as paid purchases.
Order each customer’s eligible history with a stable tie-breaker, then select sequence two within the month. Someone with three orders now may have made their second this month. A current order-count filter misses them; a month-only export cannot establish lifetime sequence.
How to verify: Manually check a prior-month first order, a current-month second and a later third; incomplete history stays open.
Group customers by first-purchase attributes and use equal 30- or 60-day windows. A five-day-old cohort has not completed a 30-day opportunity. Purchase intervals can inform follow-up, but an association does not establish that a coupon or product caused retention.
How to verify: Record mature sample size, window and immature customers; incomplete observation is not a negative outcome.
Sample returning buyers, excluded replacements, duplicates and non-returners back to orders. Reconcile differences from Shopify reports as scope, timing or unresolved items. Deliver explainable segments and a next experiment, not a claim that recalculation improves retention.
How to verify: A second analyst reproduces the same snapshot; discrepancies are explained and campaign impact is tested separately.
We reviewed the merchant question and official reporting definitions, without obtaining complete order histories, customer mappings or replacement classifications. This page supplies a procedure and acceptance criteria. Workbook examples illustrate recordkeeping. Repeat-buyer counts, refund effects and campaign impact remain unverified.
Download the observations and test scope (JSON)A store sends samples for the cost of postage. A surge in sample requests can pull down the weekly average even if retail shoppers spend exactly as much as the week before.
Group the merchandise lines for the period by order ID. Remove an order from the denominator only if every item is a sample. A bottle bought with a free sachet still counts as one retail order.
The merchant ships free samples and collects postage. Shopify documents average order value and report filters. To answer this merchant’s particular question, first identify whole sample-only orders. A dated list of sample SKUs keeps older orders classifiable after a rename or packaging change.
In four example orders, the sample-only order collected $5 postage. The other three had merchandise values after discounts of $40, $60 and $0. The $60 basket contained a sample. The $0 order was a regular product bought with a coupon. The retail average is $100 divided by three, or $33.33. Dropping the zero-dollar promotion raises it to $50.
Keep the sample-only count, retail order count and retail merchandise value in the weekly report. This example uses one currency and orders without returns or later edits. Check unfamiliar SKUs before classifying them. In a samples-only week, report zero retail orders and leave their average blank.
| Contents | Weekly report treatment |
|---|---|
| Samples only, shipping paid | Count one sample order and zero retail orders |
| Regular product and a sample | Count one retail order and sum its merchandise after discounts |
| Regular product with a full-value coupon | Keep the order in this cohort with zero merchandise value |
Continue in the workflow: Repeat purchases and customer identity
Support opens another order so the warehouse can ship a warranty part. A real fulfillment job enters the order history, even though the customer made no new purchase decision.
Ask the service team why the second order was opened. When the original purchase and a service record confirm a free replacement part, keep the shipment and count it as service activity. A repeat buyer needs a second independent purchase.
A merchant handling over 2,000 orders a month reported about 15 to 20 component requests monthly, plus reships for other reasons. Staff created orders in their CRM or Shopify. Shopify describes customer reports and report filters. The agent opening the order has one fact those records may lack, namely why the order exists. Capture that reason and the original order ID at creation.
Three example buyers each have two order records. A has a documented warranty replacement, B bought again, and C’s second order has no recorded purpose. That gives one confirmed repeat buyer, one confirmed single-purchase buyer and one unresolved buyer. Confirming a purchase for C raises the repeat count to two.
Keep the order ID, buyer ID, purpose and original purchase ID. If a replacement points to another buyer’s order, check the support ticket for a documented relationship between purchaser and recipient. Report unresolved cases separately so both shipment history and changes in repeat-buyer counts can be explained.
| Available evidence | Repeat-buyer treatment |
|---|---|
| Replacement ticket matches the buyer and original purchase | Count one service event and keep the purchase count |
| Two documented purchases | Count one confirmed repeat buyer |
| Second order ID without a reason | Keep the buyer in the unresolved group |
Continue in the workflow: Repeat purchases and customer identity
A merchant tracks repeat purchases month by month. By May, some buyers have already placed a third order. Filtering for customers with exactly two orders now misses their April milestone. Exporting April alone can hide the earlier first purchase.
Rank the full history of qualifying purchases per buyer first. Then select second purchases dated in April. Use the store time zone and resolve cancellations, service reships and duplicates before ranking. Ties need reliable ordering evidence.
A buys in January, April and May. B buys twice in April. C buys once. A and B reach purchase two in April. Recover an earlier March purchase for A and the April count drops to B alone.
Keep stable buyer ID, qualifying order ID, timestamp and report cutoff. Guest orders, missing pre-migration history or undocumented reships can change the sequence. The customer report defines returning buyers. This question dates a specific purchase milestone.
| Sample conditions | Result |
|---|---|
| Full example | A and B reach order two in April |
| Add A’s March purchase | Only B remains |
| Move B’s second order to May 1 | Only A remains |
Continue in the workflow: Repeat purchases and customer identity
Run the setup and query in an empty SQLite database. The rows are synthetic.
CREATE TABLE purchase(buyer TEXT, placed TEXT, id TEXT UNIQUE);
INSERT INTO purchase VALUES ('A','2026-01-05','1'),('A','2026-04-04','2'),('A','2026-05-02','3'),
('B','2026-04-01','4'),('B','2026-04-22','5'),('C','2026-04-15','6');
WITH sequence AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY buyer ORDER BY placed,id) AS nth FROM purchase
) SELECT buyer,id FROM sequence WHERE nth=2 AND placed>='2026-04-01' AND placed<'2026-05-01' ORDER BY buyer;A merchant wanted to connect first products with later purchases. Checkout records a basket. The first SKU in an export is not evidence that the shopper chose it first, and choosing a single line can change the ranking.
For “how many buyers whose first basket included this item returned”, allow a buyer in several product groups and count them once per group. Assigning one acquisition product per buyer needs a separate rule and evidence.
A first buys boots and socks and later buys laces. B first buys boots and has not returned. Boots have one returning buyer out of two, socks one out of one. The group counts sum to two while the store has one distinct returning buyer.
Set a first-purchase window, follow-up cutoff and product granularity. The results can guide customer interviews. They do not establish that socks caused the second purchase. Compare cohorts over equal follow-up periods.
| Sample conditions | Result |
|---|---|
| A first buys two products | A enters each group once |
| Two sock lines on A’s first order | One buyer in the sock group |
| B places another order | Both initial boot buyers have returned |
Continue in the workflow: Repeat purchases and customer identity
Run the setup and query in an empty SQLite database. The rows are synthetic.
CREATE TABLE purchase(id TEXT PRIMARY KEY,buyer TEXT,placed TEXT);
CREATE TABLE line_item(order_id TEXT,sku TEXT);
INSERT INTO purchase VALUES ('1','A','2026-01-01'),('2','A','2026-02-02'),('3','B','2026-01-05');
INSERT INTO line_item VALUES ('1','Boot'),('1','Sock'),('2','Lace'),('3','Boot');
WITH ranked AS (
SELECT *,ROW_NUMBER() OVER(PARTITION BY buyer ORDER BY placed,id) AS nth,
COUNT(*) OVER(PARTITION BY buyer) AS purchases FROM purchase
), cohort AS (
SELECT DISTINCT l.sku,r.buyer,r.purchases FROM ranked r JOIN line_item l ON l.order_id=r.id WHERE r.nth=1
) SELECT sku,COUNT(*) AS first_buyers,SUM(purchases>1) AS returned FROM cohort GROUP BY sku ORDER BY sku;The merchant wanted to find products that shoppers tend to buy together. Socks might already appear in many baskets. Looking only at joint order counts can make a generally popular item look unusually well paired with boots.
Count each product once per order. Compare the share of boot orders containing socks with the share of all orders containing socks. Dividing the first share by the second gives lift. Above one means socks are more common in these boot baskets than in the comparison population.
Out of eight example orders, four include boots, six include socks and two include both. That is 50% of boot orders versus 75% overall, giving a lift of about 0.67. The two observed pairs are real, yet socks were less common among boot buyers.
Shopify order reports cover items bought together. Before launching a bundle, check overlapping availability, existing offers, margin and sample size. These eight orders demonstrate a calculation and do not predict bundle sales.
| Sample conditions | Result |
|---|---|
| Two orders have both | Lift about 0.67 |
| Add three sock lines to the same order | Lift still about 0.67 |
| Every order includes socks | 100% attachment on boot orders, lift just 1 |
Continue in the workflow: Repeat purchases and customer identity
Run the setup and query in an empty SQLite database. The rows are synthetic.
CREATE TABLE line_item(order_id INT,sku TEXT);
INSERT INTO line_item VALUES (1,'Boot'),(1,'Sock'),(2,'Boot'),(2,'Sock'),(3,'Boot'),(4,'Boot'),
(5,'Sock'),(6,'Sock'),(7,'Sock'),(8,'Sock');
WITH basket AS (SELECT order_id,MAX(sku='Boot') boot,MAX(sku='Sock') sock FROM line_item GROUP BY order_id)
SELECT COUNT(*) AS orders,SUM(boot) AS boot_orders,SUM(sock) AS sock_orders,SUM(boot*sock) AS both,
ROUND((1.0*SUM(boot*sock)/NULLIF(SUM(boot),0))/(1.0*SUM(sock)/COUNT(*)),3) AS lift FROM basket;A merchant saw 70 uses of a discount and wanted to know how many came from new buyers. An existing customer can use a code for the first time, one shopper can order twice, and a single order can span several report rows.
You can count people whose first qualifying order used the code. To estimate how many came because of the offer, you also need a comparable group that did not receive it.
Filter discount lines to the code and campaign dates, then deduplicate by order ID. Keep customer ID, payment time and order status. The example counts valid paid orders, so someone using the code twice still has two orders.
Look up these customers across the store's earlier orders and all channels in scope. Compare the payment time with the earliest qualifying purchase, then count distinct first-time buyers. For two purchases tied on date, check the timestamps or leave the sequence unresolved.
Report code-bearing orders, identifiable customers, confirmed first-time buyers and unresolved orders side by side. The example has four orders, two identifiable customers, one confirmed new buyer and one anonymous order. Missing pre-migration history can leave other first purchases unconfirmed.
| Sample condition | Observed result |
|---|---|
| One duplicate redemption row and an anonymous order | 4 orders, 1 confirmed new buyer, 1 unresolved order |
| An earlier qualifying purchase by Jo turns up | Confirmed new buyers fall to 0 |
| Jo's earlier history is incomplete | 0 confirmed new buyers, 2 unresolved orders |
| Jo's earlier order was canceled and is out of scope | 1 confirmed new buyer |
Shopify documents discount rows and customer categories. The SQLite example tests their intersection. Report the qualifying-purchase rule, customer identity coverage and available history alongside the count.
Continue in the workflow: Repeat purchases and customer identity
Run the setup and query in an empty SQLite database. The rows are synthetic.
CREATE TABLE sale(id TEXT PRIMARY KEY,buyer TEXT,paid_at TEXT,valid INT,history_complete INT);
CREATE TABLE redemption(id TEXT,code TEXT);
INSERT INTO sale VALUES ('A','Li','2026-09-02',1,1),('B','Li','2026-10-01',1,1),('C','Jo','2026-10-03',1,1),
('D','Jo','2026-10-12',1,1),('E',NULL,'2026-10-15',1,0);
INSERT INTO redemption VALUES ('B','FALL'),('C','FALL'),('C','FALL'),('D','FALL'),('E','FALL');
WITH eligible AS (SELECT s.* FROM sale s WHERE valid=1 AND paid_at>='2026-10-01' AND paid_at<'2026-11-01'
AND EXISTS (SELECT 1 FROM redemption r WHERE r.id=s.id AND r.code='FALL')),
status AS (SELECT e.*, CASE WHEN buyer IS NULL THEN 'unknown'
WHEN EXISTS (SELECT 1 FROM sale h WHERE h.buyer=e.buyer AND h.valid=1 AND h.paid_at<e.paid_at) THEN 'returning'
WHEN history_complete=0 OR EXISTS (SELECT 1 FROM sale h WHERE h.buyer=e.buyer AND h.valid=1 AND h.paid_at=e.paid_at AND h.id<>e.id) THEN 'unknown'
ELSE 'first' END AS kind FROM eligible e)
SELECT COUNT(*), COUNT(DISTINCT buyer),COUNT(DISTINCT CASE WHEN kind='first' THEN buyer END),
SUM(kind='unknown') FROM status;A merchant found several customers with sales split across duplicate profiles. Name or shipping address alone can group a household or workplace mailroom as if it were one buyer.
Start with an evidence-backed, reversible mapping of profile IDs to buyers in the reporting data. Decide separately whether to merge profiles in admin. Order count and overall spend must still reconcile.
Keep original order IDs, customer profile IDs and consistently defined amounts. Have support verify each proposed identity through an established channel. Keep name-only or address-only matches separate.
Group only confirmed links. A spent 50 and B spent 30, so their confirmed buyer has 80. C shares an address but keeps a separate 20. A profile mapped to two people goes into a review group with its orders intact.
Reconcile the same three orders to 100 before and after grouping. Inspect one buyer's original orders for double counting caused by many-to-many links. If an actual profile merge is needed, review Shopify's eligibility restrictions and irreversible merge behavior first.
| Sample condition | Observed result |
|---|---|
| A and B confirmed as P1 | P1 has 2 orders totaling 80, C remains 20 |
| B points to both P1 and P2 | B's 30 goes to review |
| Remove B's confirmed link | A 50, B 30, C 20 |
| C confirmed as a different person | P1 80, other person 20 |
The fixture changes reporting attribution only. It cannot verify identity from similar email addresses. Withdrawing a confirmed link returns that profile to its own group on replay.
Continue in the workflow: Repeat purchases and customer identity
Run the setup and query in an empty SQLite database. The rows are synthetic.
CREATE TABLE sale(id TEXT PRIMARY KEY,profile TEXT,amount INT);
INSERT INTO sale VALUES ('1','A',5000),('2','B',3000),('3','C',2000);
CREATE TABLE confirmed(profile TEXT,person TEXT,PRIMARY KEY(profile,person));
INSERT INTO confirmed VALUES ('A','P1'),('B','P1');
WITH keymap AS (SELECT profile,COUNT(*) AS n,MIN(person) AS person FROM confirmed GROUP BY profile),
labeled AS (SELECT s.*,CASE WHEN n=1 THEN 'person:'||person WHEN n>1 THEN 'review:'||s.profile ELSE 'profile:'||s.profile END AS group_key
FROM sale s LEFT JOIN keymap m ON m.profile=s.profile)
SELECT group_key,COUNT(*),SUM(amount) FROM labeled GROUP BY group_key ORDER BY group_key;Define the metric, numerator, denominator and exclusions so another analyst can reproduce them.
Open the detailed checksManually check a prior-month first order, a current-month second and a later third; incomplete history stays open.
Open the detailed checks