Skip to Content
StarsellDocs
Products

Stock history

Every change to tracked stock, written the moment it happens - the reason, the order or purchase order behind it, who made it, and the stock before and after.

What is recorded

Each time a tracked version's stock changes, Starsell writes one line with the change and the stock right after it, so the history reads "Order #1042, -2, 14 to 12" without adding anything up. Lines are written in the same step as the change: when an order goes through, so does its line, and when it fails, neither does.

ReasonWhenLinked to
OrderAn order takes its units: checkout, an order typed in by hand, a draft turned into an order.The order
CancelCancelling an order puts its units back.The order
Return restockMarking an order as returned, or receiving a return with Put back in stock.The order
Refund restockA refund with Put back in stock for the units refunded.The order
Order editAdding, removing or changing the quantity of items on an order before it's sent.The order
AdjustedA change in Inventory, or a stock change through the store API.The team member
CountedA count in Inventory.The team member
Imported countCounts imported from a CSV file.The team member and the file
ReceivedUnits that arrived on a purchase order.The purchase order

Each unit goes back to stock once: a refund that already restocked a unit doesn't restock it again on a cancel. Bundles write their lines on the parts, since selling a bundle takes the parts' stock.

Nothing is written for versions that don't track stock, CJ versions included, and a change of 0 (a count that matched) isn't a line.

One version's history

Click any row in Inventory to open its history on the side: newest first, with the reason, the change, the stock before and after, the order or purchase order (both link to it), who made it, and the note. Show older changes loads more. Open in Stock history opens the full page filtered to that version.

The store's history

Inventory > Stock history lists every change in the store.

FilterWhat it does
7 days, 30 days, 90 days, All timeHow far back. 30 days to start.
SearchProduct name, version name or SKU.
ReasonOne or more reasons, for example only Received and Counted.
A product's nameClick it in the list to see only that version.

The list shows 50 changes a page, newest first.

For developers

  • List stock changes returns the same lines through the store API, filtered by version, product, order, purchase order, reason and date.
  • inventory.adjusted fires once per change made in Inventory or by receiving a purchase order, with every version it moved: { reason, note, via, purchase_order, adjustments: [{ product_id, variant_id, title, variant_name, sku, delta, previous_stock, stock }] }.

On this page