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

Identify products at risk of stocking out

A merchant reorders on a fixed rhythm and cannot tell which SKUs will run dry before the next replenishment arrives. In this case, the immediate task is to identify products at risk of stocking out. The workflow should combine the merchant's own stock levels, sales pace and recorded arrival dates into a per-item risk list with estimated timing.

Topic
Stock Availability and Alerts
Target keyword
shopify stockout prediction
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 products at risk of stocking out.
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: [sellable quantity per SKU, sales pace over a window covering the merchant's known seasonality, replenishment lead times on record, and confirmed inbound receipts with expected arrival dates]. Estimate the date each SKU reaches zero by extending the observed pace forward, net off any confirmed receipt landing before that date, mark a SKU at risk where the estimated date falls before the replenishment lead time elapses, and mark as low confidence any SKU whose window was too short or whose pace was disturbed by a promotion or a prior stockout.
Return a stockout risk list with estimated timing 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

Combine, per SKU, the sellable quantity now on hand, the sales pace observed over a window long enough to cover the merchant's known seasonality, the replenishment lead time on record, and the confirmed inbound receipts with their expected arrival dates.

02

Step 2

Estimate the date each SKU reaches zero by extending the observed pace forward, net off any confirmed receipt landing before that date, mark a SKU at risk where the estimated date falls before the replenishment lead time elapses, and mark as low confidence any SKU whose window was too short or whose pace was disturbed by a promotion or a prior stockout.

03

Step 3

Deliver a stockout risk list per SKU with the estimated date, the confidence mark, the pace and receipts the estimate rests on and the reorder it implies, present it as a forecast to verify rather than an observed fact, and reconcile the SKUs listed against the inventory extract so none at zero is missing.

FAQ

Common questions when running this scenario

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

How much history does an estimate need?

A window long enough to cover normal demand and any seasonality the merchant knows about, since a short window swings with one order. Where the window is short the row is marked low confidence rather than dropped, so the SKU still appears.

Do open purchase orders change the projection?

Yes, confirmed receipts with dates are netted off, because stock arriving before the estimated zero date removes the exposure. Unconfirmed or undated orders are excluded from the calculation and listed separately, so the estimate never rests on a hoped-for delivery.

Is a predicted stockout the same as running out?

No, it is a forecast from the supplied pace, lead times and receipts and is labelled as such with its confidence. It should be validated by comparing past projections against what actually happened before it drives a purchase order.

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.