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

Update inventory from a designated source of truth

An automated feed overwrites the quantities that merchandising set by hand for launches or holds. In this case, the immediate task is to update inventory from a designated source of truth. The workflow should produce an inventory reconciliation and proposed correction file drawn from that source's own records.

Topic
Inventory Synchronization and Accuracy
Target keyword
shopify automatic inventory updates
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 update inventory from a designated source of truth.
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 designated source's per-SKU quantity records with extraction timestamp and stated feed cadence, the in-scope variant identifiers and locations, current Shopify on-hand and available quantities, and the merchant's hand-set and reserved positions with owner and expiry]. Compute the delta for each in-scope variant at each location as the source quantity minus the current Shopify quantity, exclude from writing any SKU marked as hand-set or reserved and any record whose extraction timestamp is older than the merchant's stated feed cadence, and flag rather than write every delta that would drive available stock negative or that belongs to a variant with orders placed after the extraction timestamp.
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, for one sync cycle, the designated source's per-SKU quantity records with the extraction timestamp and the cadence the merchant has stated for that feed, the variant identifiers and locations the feed is allowed to write, the current Shopify on-hand and available quantities for those variants, and the merchant's list of hand-set positions (launch allocations and holds) with the owner and the date each one expires.

02

Step 2

Compute the delta for each in-scope variant at each location as the source quantity minus the current Shopify quantity, exclude from writing any SKU marked as hand-set or reserved and any record whose extraction timestamp is older than the merchant's stated feed cadence, and flag rather than write every delta that would drive available stock negative or that belongs to a variant with orders placed after the extraction timestamp.

03

Step 3

Deliver an inventory reconciliation listing every in-scope variant with source quantity, current quantity, delta, disposition (write, hold or flag) and the reason, plus a proposed correction file carrying the pre-write quantity for rollback, then reconcile the row count against the in-scope variant list and confirm that no excluded SKU appears as a write row.

FAQ

Common questions when running this scenario

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

How is a hand-set quantity protected from the feed?

We exclude any SKU the merchant has marked as hand-set or reserved from the write set and report it as a hold, because launches and holds carry intent the feed does not know; the protection ends on the expiry date recorded for that position, after which the SKU returns to the feed's scope.

What happens when the feed data is stale at apply time?

Compare the extraction timestamp with the merchant's stated cadence and hold any record older than that window, since writing from a stale snapshot can sell stock already committed elsewhere; those SKUs appear as flags and re-enter on the next cycle that carries a fresh timestamp.

How do we confirm the update did not oversell?

Recheck, after applying, that no written location shows negative available stock and that variants with orders placed between extraction and apply were held rather than overwritten; the rollback quantities in the correction file let any location be restored to its pre-write figure if a check fails.

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.