Inventory
Find products that are about to run out of stock, set reorder points and trace each stock change back to its cause.
Litestore tracks stock for each variant at each location where you keep stock. Use the Inventory page when you need to find out which products to reorder, which have already run out, or why a stock number changed.
Inventory page
You open the page from Catalog → Inventory. It has two lists, a reorder forecast and a low stock list. There's also a Movements page that shows every change, the reason for it, and who made it.
The two lists answer different questions. The forecast shows products that are going to run out soon, and the low stock list shows products that are already running low or sold out.
Litestore writes every stock change to a ledger. Entries are only ever added to the ledger and are never edited or removed.
In the database, this data is stored in the Inventory, StockLocation and StockMovement records.
Reorder forecast
The forecast calculates how many days of stock each variant has left at its recent sales rate, and it only lists the variants that are at risk.
It's best to work through this list first. It identifies fast-selling variants before they reach the reorder point, which gives a reorder time to arrive before the variant runs out.
Low stock
The low stock list shows every variant whose stock is at or below the reorder point. Variants that are out of stock appear at the top.
Reorder point
The reorder point is a single number for the whole store, and it's 5. A developer can change it in the code; there's no setting for it in the admin.
It applies to the whole store rather than to individual variants. Every part of Litestore that checks whether stock is low uses this same number, including the low stock list, the "Only 3 left" proof on the storefront, the availability shown to search engines and the merchant feed.
Because they all use the same number, they always treat the same products as low on stock.
Stock ledger
Litestore writes a movement for every stock change.
| Detail | What it records |
|---|---|
| Change | How much the quantity went up or down. |
| Quantity before | The stock before the change. |
| Quantity after | The stock after the change. |
| Reason | Why the stock changed. |
| Source | Whether the system, a person, the API or a webhook made the change. |
| Cause | What caused it, such as an order, a return, a transfer or a manual adjustment. |
Litestore writes the movement at the same time as it changes the quantity. Once a movement has been written, it's never edited or deleted.
Every movement has to add up:
quantity before + change = quantity afterLitestore doesn't allow a movement that changes nothing.
Stock calculation
The stock number on the page is the sum of the quantities at every active location that holds the variant.
Litestore doesn't store a separate total alongside the location quantities, so there's no second number that could get out of sync with them.
Stock drift is never corrected silently
If the stock levels don't match the recorded movements, the database view InventoryLedgerDrift lists the difference, which whoever runs the store can query. Litestore doesn't correct the difference automatically.
Locations
You choose what each location is used for. A location can fulfil online orders, offer customer pickup, do both, or do neither.
Each location also has a priority, which tells Litestore which location to prefer. A location can serve a single market or all of them.
Out-of-stock variants
You configure this for each variant, and stock tracking can also be turned off for a variant entirely.
If you leave tracking on, you choose what happens when the variant sells out. It can either block add-to-cart and checkout, or remain on sale as a back-order.
Setup
Stock locations
Specify which ones fulfil orders and which ones allow pickup.
Quantities
Enter stock for each variant at each location, and choose what each variant does when it reaches zero.
Reorder and low-stock lists
Use the reorder forecast and the low stock list. Orders, returns and manual adjustments each write a movement to the ledger for later review.
Quick reference
Ask the assistant "What's about to run out of stock?" for the same variants as the forecast, with days of stock left.
Work through the reorder forecast before the low stock list. The forecast shows products that will run out, the low stock list shows products that already have, and the out-of-stock rows at the top of that list represent sales you're currently missing.
Open Movements when you need to find out why a number changed. Each row shows the reason, the source and the cause.
If a number looks wrong, investigate it before you adjust it. Litestore calculates stock from its locations and records every change in the ledger, so any unexpected figure can be traced to a movement. The ledger points you to the movement that caused a difference, so you don't have to overwrite it.
Related
Products
A product's options create its variants, and the product has to pass a set of rules before it's published.
Orders
An order goes from payment to shipment, ships in parts if needed, and is also created by hand for phone or in-person sales.
Returns
A return comes back in, only resellable items go back into stock, and the refund follows.