Back to topic
Spark playbook scenarios · Spark: AI Store Assistant

Measure repeat purchase behavior by cohort

Repeat behavior is reported as a single number, which hides whether new or established customers moved. In this case, the immediate task is to measure repeat purchase behavior by cohort. The workflow should produce a repeat-purchase cohort analysis, using the merchant's order history by customer, first-purchase dates and agreed repeat definition.

Topic
Repeat Purchase and Retention Analytics
Target keyword
shopify repeat purchase rate
Copyable AI prompt

A prompt you can drop directly into Spark

First replace every [bracketed] placeholder with real store scope and constraints, then add any actual records or data you have, and paste it into your preferred AI assistant or Spark agent. Spark will follow this page's workflow to produce structured output and verification steps.

ai-prompt.txt
Act as a Shopify operations specialist.
Help me measure repeat purchase behavior by cohort.
My store context is [describe the business, products and target audience].

My scope is [specify the affected products, pages, customers or reporting period]. Use these inputs: [customer-keyed order history with dates and totals, first-purchase dates, the reporting window, the stated repeat definition, and the refund treatment rule]. Group customers into cohorts by first-purchase date inside the window, compute each cohort's repeat rate as customers with at least one qualifying later order divided by cohort size, and report repeat frequency as a separate column rather than inside the rate.
Return a repeat-purchase cohort analysis for the specified task.
Show the relevant evidence or before-and-after examples and explain how I can verify the result.
If essential data is missing, ask for it and mark unsupported conclusions as unknown.
Do not invent metrics, product claims or customer facts.
For any publication, message, account or store change, use only connected tools within my explicitly authorized scope and report success only after verification; otherwise provide the draft or proposed steps.
Use in Spark
How to solve

A recommended resolution workflow

Split the work into input, judgment, and deliverable phases. Verify each step's output before moving to the next.

01

Step 1

Gather customer-keyed order history with dates and totals, first-purchase dates, the reporting window, the merchant's stated repeat definition, and the refund treatment chosen up front.

02

Step 2

Group customers into cohorts by first-purchase date inside the window, compute each cohort's repeat rate as customers with at least one qualifying later order divided by cohort size, and report repeat frequency as a separate column rather than inside the rate.

03

Step 3

Deliver the cohort table with a caveat for cohorts whose members have not yet had a full window to reorder, then reconcile cohort sizes and repeat counts against the customer-level order export before publishing.

FAQ

Common questions when running this scenario

Cover decision rules, frequent misunderstandings, and required inputs so the team aligns on prerequisites before execution.

How does the window limit which cohorts can be compared?

Only cohorts whose members have had a full stated window since first purchase can be compared like for like. Later cohorts have had less opportunity to reorder, so their lower rates reflect time, not behaviour. They are reported with a caveat rather than ranked against mature cohorts.

Are the repeat rate and repeat frequency the same figure?

No. The rate is the share of a cohort with at least one qualifying later order; frequency counts how many later orders those repeaters placed. Mixing them lets a few high-frequency buyers look like broad repeat behaviour. Both are reported, in separate columns, under the same stated repeat definition.

Where do refunded orders enter the calculation?

The refund treatment chosen up front decides it, and the same choice applies to every cohort. If fully refunded orders are excluded, a customer whose only later order was refunded counts as a non-repeater. Partially refunded orders still count as purchases unless the merchant's rule says otherwise, and the chosen rule is printed with the table.

Related scenarios

Continue with adjacent or same-topic scenarios

Start with scenarios under the same topic, then expand into cross-topic matches suggested by similarity.

Next step

Want these AI scenarios embedded directly into daily operations?

Ciwi Spark builds Shopify-native AI tools and agents around the workflows merchants actually run: research, ads, translation, and customer support. Stop rewriting the same prompts by hand.