Start from the batch, not the product
A short-dated line is a batch problem. Two cases of the same product can carry best-before dates months apart, so the date that matters is the nearest one on stock you still hold. Record goods in with a batch and an expiry date, and the system can tell you which products are inside your clearance window before they become waste.
In MaxInvent, a product is flagged as short-dated when its nearest batch with stock left expires inside the window you set, 60 days unless you change it. A clearance discount on the batch is optional. Products with no batch expiry dates are never flagged, so the flag is only as good as the dates recorded at goods in.
List the quantity you can sell
Clearance stock is often the same stock your trade customers, reps and other marketplaces can see. A ClearanceFood listing made from the MaxInvent listing screen carries the best-before date you give it. When it is linked to batches, it is created with no more than those batches' remaining quantity; that figure does not take off stock already allocated to other orders, so check the quantity before you create it. With no batches linked, it is capped at the product's free stock. A ClearanceFood listing has a fixed total, so a create with nothing to list is refused rather than listed at zero.
Orders, events and the order check
- ClearanceFood sends order, payment, cancellation, dispatch and delivery events to MaxInvent by webhook.
- Each event is applied without moving an order backwards: a parcel that has gone out is not cancelled or reopened, and a cancelled order is not marked as shipped.
- An event that arrives before its order is kept and applied once the order is imported, so an early cancellation does not leave stock held for an order that no longer exists.
- A scheduled order check reads ClearanceFood's outstanding orders (pending, and paid or ready but not yet shipped), imports any a webhook missed and fills in buyer, address and lines an earlier import left blank.
- Orders from either route hold stock in the same way, and payment is checked again for each order before a label is bought.
What to check before you rely on it
Create one test listing for a product with a known batch and best-before date, and confirm the quantity is what you can actually sell, not what is on the shelf. Place a test order, then cancel it, and check that the stock comes back and the order does not move to dispatched. Finally, compare the order list with ClearanceFood's own record for a day or two before you stop checking by hand.
For the wider marketplace picture, see marketplace integration, and for recent changes, see what's new in MaxInvent.