A supplement seller has the same stock problem as any shop with dated goods, with one extra twist: the same product often arrives in several deliveries, and each carton carries its own lot code and its own best-before date. Shopify’s inventory count says there are 120 jars of magnesium on the shelf. It does not say that 30 of them are best before March and 90 are best before next September. This guide shows how to record each lot with Datima Expiry Management so the oldest stock is the stock that ships first. It is based on the app’s current guides (batches, what happens on a sale and getting started), and the examples are illustrative, not results from a store.
What this does, and what it does not
Datima records quantities by lot and date, deducts each shipped order from the batch that expires first, and shows what is approaching its date. It is an inventory tool. It is not a regulatory, recall, traceability or good-manufacturing-practice system, and it does not decide how long a product may lawfully be sold or what a label must say. Keep using your supplier paperwork and your own rules for those; Datima records the dates and lot codes you enter and sorts by them.
The situation: one product, three deliveries
Take a shop selling a magnesium capsule product with one variant. Over four months it receives three cartons:
| Lot code | Best before | Units received |
|---|---|---|
| MG-2403 | 2027-03-31 | 30 |
| MG-2406 | 2027-06-30 | 60 |
| MG-2410 | 2027-10-31 | 90 |
Shopify holds one number for the variant, 180. When orders are packed from a shared shelf, nothing in that number says which carton to open. Without a record by lot, the newest carton is easy to pick because it is on top, and the March lot ages in the back.
Step 1: record each delivery as a batch
A batch in Datima is a quantity of one variant that expires on one date. Open Products, find the product and press Add batch. The form needs the quantity and either an expiry date or a lot code; the lot code, bin, received date and note are optional extras. For supplements, enter all of the useful ones:
- Expiry date as the best-before date printed on the carton. It drives the dashboard card, the order sales are deducted in, any markdown tier and when Write off appears.
- Quantity as the units that arrived in that carton.
- Lot code as the code on the carton. It is shown on every row, in the shipment history and in the weekly digest, so a packer can match the carton in their hand to the row on screen.
- Bin, if you keep stock in places such as shelf bays, so the person picking knows where the lot sits.
Typed dates use the YYYY-MM-DD shape. For a date a year or two ahead, the shelf-life shortcuts under the date field save clicks; see entering expiry dates without clicking through the calendar. Dates in the past are allowed, which matters on day one: stock that has already passed its date shows under Expired on the dashboard.
If you already have a spreadsheet of lots, import it instead of keying each one. The CSV import guide describes the template, the review step before anything is written, and the file of failed rows to correct and upload again.
Step 2: let sales deduct oldest-first
From the moment a product has a batch, Datima watches your orders. When an order ships, the units come off the batch that expires first; when that batch is used up, the next one is used. Nothing happens when the order is only placed, and a cancelled order never touches a batch. A refund puts the units back on the batch they came from. This rule is first-expired-first-out, FEFO. If you want the reasoning behind it and how it differs from first-in-first-out, read FEFO versus FIFO rather than expecting it repeated here.
In the example, the first 30 units shipped come off MG-2403, then MG-2406, then MG-2410. The packer’s only job is to physically pick from the lot the app shows; the app does the arithmetic.
Datima deducts what it sees on the fulfilled order. It cannot know which physical carton was actually opened, so if the shelf and the record disagree, correct the shipment. The shipment history on a product’s page has a Correct button that lists the batches that could plausibly have been picked, and keeps both the original record and the correction.
Step 3: watch the dates, not just the count
The dashboard groups batches by how soon they expire, and the product list shows each product’s soonest date. Datima can also email a weekly digest, which works for a shop where nobody opens the app every day. Two things you can do as a date nears:
- Lower the price. Automatic markdowns can reduce the price as a batch approaches its date and put it back when that batch is gone. The default ladder, which you can change, is described in automatic markdowns for short-dated stock. Check the rules against your own policy on selling close to the date before turning them on.
- Write off. When units have passed their date, the Write off button zeroes the batch and adjusts Shopify’s inventory, after you confirm. It is deliberate and never automatic; see writing off expired stock.
Edge cases worth planning for
- Lot with no date. A batch can be tracked by lot code alone. It then has no expiry position, so it will not sit on an expiry card. See batches without an expiry date.
- Stock the app does not cover yet. If more units ship than your batches cover, Datima shows them as unmatched sales instead of inventing a batch. Add the missing batch, then correct the unmatched shipment.
- Batches and Shopify differ. Each product’s page shows Tracked and Shopify counts side by side. A difference usually means a delivery has not been entered as a batch yet.
- Several places. With more than one location, a sale takes from the location that fulfilled the order.
- Editing and deleting. Changing a batch’s date or quantity never changes Shopify’s inventory. A batch that has had sales cannot be deleted; zero it to keep the history.
A short check you can run
- Pick one supplement product with two lots on the shelf and record both as batches with their dates and lot codes.
- Open the product page and confirm each row shows the date, the lot code and the quantity you typed.
- Fulfil a test order and compare the shipment history with the lot you expected; the earlier date should be the one reduced.
- Look at the dashboard card for each lot and confirm it matches the date on the carton.
These steps describe what the guides say should happen. This article does not report that someone has run them.
Next step
Start with the stock closest to its date. Record those lots first, then work back through the rest. For the wider picture of why dates matter in a Shopify shop, read how to track expiry dates in Shopify.