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

Segment customers by recency frequency and monetary value

The team wants segments it can act on, yet ranking everyone on revenue alone puts recent one-time buyers and quiet long-standing accounts together. In this case, the immediate task is to segment customers by recency frequency and monetary value. The workflow should produce a customer segment table and interpretation guide scored from the merchant's records.

Topic
Customer Analytics and Segmentation
Target keyword
shopify rfm analysis
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 segment customers by recency frequency and monetary value.
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: [the purchase history with stable customer identifiers, order dates, order values and refund entries for the look-back span, the analysis date, the value measure to be scored, and the merchant's stated banding rule for each dimension]. Score recency as the days from the analysis date to the last eligible order, frequency as the count of separate eligible orders and value as the stated measure summed per customer, banding each dimension by the stated rule before combining the three bands into segments, and keeping customers with no eligible order out of the scoring.
Return a customer segment table and interpretation guide 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

Collect the purchase history with stable customer identifiers, order dates, order values and refund entries for one stated look-back span, together with the analysis date, the value measure to be scored and the merchant's stated rule for banding each dimension.

02

Step 2

Score recency as the days from the analysis date to the last eligible order, frequency as the count of separate eligible orders and value as the stated measure summed per customer, banding each dimension by the stated rule before combining the three bands into segments, and keeping customers with no eligible order out of the scoring.

03

Step 3

Deliver a customer segment table and an interpretation guide stating the band boundaries and the tie rule applied, verify that the number of scored customers equals the distinct buyers with eligible orders in the history, and flag customers whose three bands fall on opposite sides of their boundaries because a combined label hides that conflict.

FAQ

Common questions when running this scenario

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

Which orders feed each of the three scores?

Only orders passing the merchant's eligibility rule, with refunds treated as stated, because recency taken from a refunded order puts a customer closer than they are; frequency counts separate orders rather than units in one basket, and value sums the stated measure over the same eligible orders.

How are band boundaries set?

By the rule the merchant states for each dimension, either fixed cut-offs or banding the ranked customer list into equal-sized groups, recorded together with the analysis date, because recency bands shift as the analysis date moves and unrecorded boundaries make two reports impossible to compare.

What happens to customers sitting on a boundary?

The tie rule is fixed before scoring and applied the same way in every dimension, usually placing a boundary value in the stronger band; without it, customers move between segments on rounding alone and segment sizes swing between runs for no commercial reason.

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.