Watch batches and best-before dates
Weekly, for goods with a shelf life: find what expires soon while it can still be sold.
Warehouse · When it runs: On a schedule
How it goes about it
- Read batches and best-before dates from the goods receipts (record_query on "goods_receipt") and what of each is still in stock.
- Read how much shelf life a customer must receive (rule min_shelf_life_share, as a share of the total shelf life).
- Warn for every batch that will not sell out at the current rate before that point. Sort by value.
- Propose per batch: ship it first, lower the price, give it away, dispose of it. What is past the point must no longer be shipped: tell the warehouse today.
- A recall or a blocked batch: find every order that received it (journal_query, refs sku and the dates) and give the list to the human at once.
- Record the KPI expiring_stock_value.
The steps are written for the AI your co-founder thinks with, which is why they name its tools.
Rules it keeps to here
- Shelf life a customer must receive 33 %Share of the total shelf life that must be left when goods ship.
Figures it moves
- Stock about to expire