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

Report product sales using consistent product identifiers

Listings have been renamed and merged over time, so totals built from product titles no longer square with the orders. In this case, the immediate task is to report product sales using consistent product identifiers. The workflow should produce a sales table keyed by identifier whose totals reconcile with the supplied records, noting any unmatched rows.

Topic
Product Performance Analytics
Target keyword
shopify product sales report
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 report product sales using consistent product identifiers.
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: [product and variant identifiers, order lines with quantities and prices, return records, the reporting window, and the merchant's stated gross or net basis]. Match every line to exactly one identifier so renamed listings merge under their current identifier and no variant is double counted, then compute per-product totals on the merchant's stated gross or net basis, deducting returns where that basis requires it.
Return a sales table keyed by identifier with totals reconciled against the supplied records and unmatched rows noted 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

Pull product and variant identifiers, order lines with quantities and prices, return records and the reporting window from the merchant's records, fixing the order status filter so cancelled and test orders are excluded consistently.

02

Step 2

Match every line to exactly one identifier so renamed listings merge under their current identifier and no variant is double counted, then compute per-product totals on the merchant's stated gross or net basis, deducting returns where that basis requires it.

03

Step 3

Deliver the sales table keyed by identifier with its basis stated on every table, then reconcile the table's totals against the order export and list any line that could not be matched with its reason.

FAQ

Common questions when running this scenario

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

Why must every row carry a stable product identifier?

Identifiers survive title edits and merges, so revenue stays attached to the same item across periods, while titles split or double count history after a rename. Keying the report on identifiers is what keeps week-over-week comparisons meaningful.

Should returns be deducted from product sales?

Deduct them when the report is meant to show retained revenue, and label every table gross or net so the numbers are read correctly. The chosen basis must match the one used in the reconciliation against the order export.

What if two records describe the same product?

Merge them under one identifier before totaling and note the merge in the output. Otherwise the same item appears as two lower-ranked rows and the sum no longer reconciles with the supplied records.

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.