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

Identify patterns in customer purchase behavior

The merchant suspects customers buy in predictable combinations and at predictable times, but has never checked the order data. In this case, the immediate task is to identify patterns in customer purchase behavior. The workflow should produce a customer segment table and interpretation guide, keeping only patterns the merchant's order history repeats.

Topic
Customer Analytics and Segmentation
Target keyword
shopify customer purchase behavior
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 identify patterns in customer purchase behavior.
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 order history with customer identifiers, order dates, line items and their categories, order values and refund entries for the stated span, the analysis date, the catalogue mapping used for categories, and the merchant's promotion calendar]. Test each candidate pattern, meaning the interval between orders, the category sequence and the items bought in one basket, against the history by counting how many customers and orders repeat it, keeping only patterns that recur across separate customers and periods and discarding anything resting on one account or one promotion.
Return a customer segment table and interpretation guide with each pattern tested against the records 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 order history with customer identifiers, order dates, line items and their categories, order values and refund entries for one stated span, together with the analysis date, the catalogue mapping used for categories and any promotion calendar the merchant keeps.

02

Step 2

Test each candidate pattern, meaning the interval between orders, the category sequence and the items bought in one basket, against the history by counting how many customers and orders repeat it, keeping only patterns that recur across separate customers and periods and discarding anything resting on one account or one promotion.

03

Step 3

Deliver a customer segment table and an interpretation guide listing every retained pattern with the customers and orders supporting it, verify the supporting counts against the order export, and mark each pattern as observed inside or outside promotion periods.

FAQ

Common questions when running this scenario

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

What keeps an observed sequence from being called a pattern?

It must recur across separate customers and more than one period and be checked against promotion periods, because a sequence seen once in a single account during a campaign is an observation; retained patterns carry the count of supporting customers and orders so the reader can judge the weight.

Should timing and basket composition be examined together?

Yes, because the interval between orders rarely explains why a customer returns on its own; the analysis reads spacing, category sequence and items appearing in one basket over the same span, and reports a pattern only where they agree rather than picking whichever looks strongest.

How are promotions kept from distorting the result?

Orders are tagged with the merchant's promotion calendar and each pattern is marked as observed inside or outside those periods, because campaigns compress intervals and enlarge baskets; a pattern appearing only during campaigns is reported as promotion-driven, not as standing behaviour.

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.