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

Detect duplicate SKUs and identify affected variants

A merchant suspects two variants share one SKU because inventory moves when only one of them sells. In this case, the immediate task is to detect duplicate SKUs and identify affected variants. The workflow should produce a report that groups identical values and states which variant keeps the identifier and which needs a new one.

Topic
SKU Generation and Cleanup
Target keyword
shopify duplicate sku checker
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 detect duplicate SKUs and identify affected variants.
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 full SKU list with each value's product and variant identifiers, the inventory and supplier records referencing it, and the order history in which it appears]. Group identical values after normalising case, whitespace and leading zeros, then decide per group which variant keeps the identifier, keeping it on the record with the longest order and inventory history and assigning new values to the rest, while marking deliberately shared bundle identifiers as intentional rather than as duplicates.
Return a duplicate report listing affected variants and proposed splits 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 the full SKU list with, for each value, the product and variant identifiers that carry it, the inventory and supplier records that reference it, and the order history in which it appears.

02

Step 2

Group identical values after normalising case, whitespace and leading zeros, then decide per group which variant keeps the identifier, keeping it on the record with the longest order and inventory history and assigning new values to the rest, while marking deliberately shared bundle identifiers as intentional rather than as duplicates.

03

Step 3

Deliver a duplicate report listing each group with its variants, the keeper, the proposed new values and the inventory and order records each change touches, and verify that the number of groups plus singletons equals the total SKU rows and that re-running the check returns no groups at all.

FAQ

Common questions when running this scenario

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

Is a repeated SKU always an error?

No. Bundles and kits sometimes reuse an identifier deliberately, so confirm each group against the catalogue before renaming. Treat a repeat as an error only when two separately sellable variants share one value and inventory moves when only one of them sells.

Which variant keeps the original identifier?

Keep it on the record with the longest history in connected systems and assign new values to the others, because downstream records then keep resolving without review. The boundary is a deliberate bundle, where no variant is renamed at all.

What confirms the duplicates are resolved?

Re-run the check and confirm it returns no groups, then confirm inventory, supplier and reporting records still resolve to a single variant each. Where a downstream system caches the old value, note it explicitly rather than assuming the rename propagated.

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.