/
/
Reorder the WooCommerce items about to run out first
For store and purchasing teams who want low WooCommerce stock ranked by days of cover by asking their AI assistant.
On this page
Connector
Connect WooCommerce, pick your AI tool and paste the prompt.
The problem
Reordering too late, or chasing items that barely sell
WooCommerce shows stock levels but not how soon each item will run out, so you reorder too late or chase items that barely sell. Working out sales per day for every low item is a spreadsheet job.
Without PopdockAI
- Filter low and out of stock products
- Export recent sales for each SKU
- Work out sales per day in a spreadsheet
- Reorder in the wrong order
With PopdockAI
- Low, out of stock and backordered items are found
- Recent sales are measured by SKU
- Daily sales and days of cover are worked out
- Items are ranked with the five most urgent shown, and nothing is changed
The prompt
Use this prompt
Copy it into any AI tool connected to PopdockAI. Swap the values in braces for your own.
**Objective:** Find every product and variation at or below `{stock-threshold}` units (default 5) or out of stock, and rank them by how soon they will run out, based on sales over the last `{lookback-days}` days (default 30).
**Step 1: Pull low and out-of-stock items**
* `woocommerce-get-product` with `stock-quantity.max` = `{stock-threshold}` and `status` = `publish`.
* `woocommerce-get-product` with `stock-status` = `outofstock`, and again with `onbackorder`.
* `woocommerce-get-product-variation` with `stock-quantity.max` = `{stock-threshold}`, then with `stock-status` = `outofstock`, then `onbackorder`.
Merge by product id or `product-variation-id`. Drop products whose `type` is `variable`; their stock lives on the variations.
**Step 2: Measure demand**
Call `woocommerce-get-order-line` with `date-created.from` = today minus `{lookback-days}` days and `max-records` 2000. Keep only lines whose `order-status` is `processing`, `completed` or `on-hold`. Sum `line-quantity` per `line-sku`. Match items by SKU, because `line-product-id` can hold the parent product's id for a variation.
**Step 3: Rank**
* Daily velocity = units sold / `{lookback-days}`.
* Days of cover = `stock-quantity` / velocity. No sales means no cover figure: show "no recent sales".
* Order: out of stock with recent sales first (lost sales now), then lowest days of cover, then on backorder, then low stock with no recent sales.
**Step 4: Report**
A table with columns name, SKU, product or variation, stock status, quantity, units sold, velocity per day, days of cover. Then a short list of the 5 most urgent items and, as a separate note, items that are `instock` but have an empty `stock-quantity` (stock not tracked, so they can never show as low).
**Rules & Guidelines:**
* This prompt is read-only. Do not call any write tool: `woocommerce-add-order`, `woocommerce-update-order`, `woocommerce-add-order-note`, `woocommerce-send-order-details`, `woocommerce-add-refund`, `woocommerce-add-customer`, `woocommerce-update-customer`, `woocommerce-add-product`, `woocommerce-update-product`, `woocommerce-update-product-variation`, `woocommerce-add-coupon`, `woocommerce-update-coupon`.
* To restock an item, point the user to the update-product-by-sku prompt.
* Pass `max-records` explicitly (500 unless stated otherwise). If a read returns exactly that many rows, say the result may be truncated and that totals are a lower bound.
* Never guess a SKU match. Items with no SKU get sales shown as "unknown".
**Validation:**
* If nothing is low or out of stock, say so and stop.
* If `{stock-threshold}` or `{lookback-days}` is empty or not a number, use 5 and 30.Who it's for
One answer, three teams that use it
Purchasing managers
Know what to reorder first
Items ranked by days of cover tell you what to buy before it runs out.
Which WooCommerce products have less than 14 days of cover based on the last 60 days?
Store owners
Catch out of stock items still selling
Out of stock items that are still in demand come first, so lost sales are fixed fast.
Which out of stock WooCommerce items were still selling last month?
Inventory managers
Find untracked stock
Items whose stock is not tracked are noted, so they can be set up properly.
Give me a WooCommerce low stock report for items under 20 units, with any untracked items.
How it works
What PopdockAI does when you ask
You set a stock threshold and a lookback, and your AI assistant ranks low items by how fast they sell. It is read-only and never guesses a SKU match.
01
Ask
You set a stock threshold and a lookback period.
02
Find
It finds low, out of stock and backordered products and variations.
03
Measure
It works out daily sales and days of cover by SKU.
04
Report
You get a ranked table and the five most urgent items.
What PopdockAI provides
The tools behind the answer
Ready made tools for WooCommerce and one secure connection to your AI tool. No code, no exports.
woocommerce-get-product
woocommerce-get-product-variation
woocommerce-get-order-line
This report is built from Get data tools only. PopdockAI applies the row, field and parameter rules your admin sets, and every query is written to the audit trail.
The outcome
Reorder in order of urgency
Related use cases
More ways to put this data to work
One prompt template with infinite possibilities.
Your AI assistant adapts its approach, tone, and capabilities to match each unique context while you maintain a single, manageable workflow.
Join forward-thinking companies that are transforming their operations with intelligent, secure AI automation.

.webp)
