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

Synchronize stock while preserving quantity definitions

A connector copies quantities between systems without keeping the sellable figure apart from on-hand stock. In this case, the immediate task is to synchronize stock while preserving quantity definitions. The workflow should produce an inventory reconciliation and proposed correction file grounded in the merchant's own field mapping.

Topic
Inventory Synchronization and Accuracy
Target keyword
shopify inventory sync app
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 synchronize stock while preserving quantity definitions.
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 connector's field mapping, the definition each system gives its quantity fields, the sync direction and interval, the location identifier mapping, the merchant's conflict-resolution rule, and the quantities recorded at the previous sync]. Map every source quantity onto the destination field carrying the same definition before transfer, deriving available as on-hand minus committed rather than copying it, refuse to transfer any field with no matching definition on the destination side, and flag instead of writing each row whose mapped available figure would exceed its on-hand total or whose location identifier has no clean counterpart.
Return an inventory reconciliation and proposed correction file verified against the supplied 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 connector's field mapping between the two systems, the definition each side gives its quantity fields (on-hand, available, committed, incoming), the sync direction and interval, the location identifier mapping, the rule the merchant has stated for resolving conflicting writes, and the quantities recorded at the previous sync for rollback.

02

Step 2

Map every source quantity onto the destination field carrying the same definition before transfer, deriving available as on-hand minus committed rather than copying it, refuse to transfer any field with no matching definition on the destination side, and flag instead of writing each row whose mapped available figure would exceed its on-hand total or whose location identifier has no clean counterpart.

03

Step 3

Deliver an inventory reconciliation per SKU and location showing source field, destination field, definition applied, transferred value, previous value for rollback and any exception flag, then verify that the transferred row count matches the in-scope SKU and location pairs and that every excluded or flagged row carries a stated reason.

FAQ

Common questions when running this scenario

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

How do we keep available stock from exceeding on-hand?

Derive available at the destination as on-hand minus committed instead of copying the source's figure, because a copied total silently includes reserved units; any row where the derived number would exceed on-hand is flagged for the merchant rather than transferred.

What happens to a field with no destination counterpart?

It is left out of the transfer and listed as an unmapped field, since guessing a destination turns a definition error into a stock error; the sync proceeds for the mapped fields and the gap is raised for the merchant to resolve in the mapping.

How is a conflicting write between the two systems settled?

Apply the conflict rule the merchant has stated, such as newest timestamp wins or a designated side wins, and record which rule decided each row; where no rule covers a case the row is flagged and both values are preserved so the merchant can choose.

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.