Skip to content

Replenishment rules

The purchasing side of running out was already handled: set a restock level on an ingredient and Buying proposes the order. A replenishment rule does the same for what you make. When the 250 ml jars fall below the level you chose, BatchDash plans a batch of the recipe at the size you brew, produced as that format. The run lands in your list and in the planner’s tray, and nothing else happens until you give it a day.

Open the product and find the Replenishment card, under cost and margin. Set up rule asks two things:

  1. The level available stock must fall below, in the product’s own unit.
  2. The batch size to plan, the same control as the New run dialog. It is seeded from the last batch you planned into this format.

Where you use sales orders, two switches join them: Keep available stock above a level, ticked unless you untick it for a product you only make to order, and Also cover confirmed orders. The section below explains them.

The dialog reads the rule back as one sentence while you type, so what will be saved is read before it is saved.

The rule dialog on the hot sauce jar

The recipe version is not a field. The rule always plans the recipe’s current version at the moment it fires, so promoting a version next month is automatically what the next batch plans from. The format is not a field either: the rule belongs to the product page it was written on.

The Replenishment card, waiting on the run it planned

Under the sentence, three lines say where things stand:

  • Available stock against the trigger, and the confirmed-orders shortfall when the rule covers orders. Available is what the product page shows in its header: on hand, minus held, minus what open batches and confirmed orders have spoken for. Each figure turns amber when it is the one that is short.
  • The state. One of these:
State Meaning
Armed Watching. It will plan a run the next time available stock is below the trigger.
Waiting: RUN-000131 is planned. It planned a run and will not plan another until that run completes, or stock comes back above the trigger.
Waiting: available stock has not come back above 24 jar since the last proposal. You abandoned the run it planned. It stays quiet until stock recovers and dips again.
Paused. You paused it. Resume when you want it watching again.
Paused: the recipe has no current version. It stopped itself: there is nothing to plan. Give the recipe a current version and it resumes on its own.
Paused: run references are set by hand in this organization. Every run needs a reference and a rule will not invent one. Switch production references back to automatic in your organization settings.
Paused: this product is archived. An archived product is not made. Restore it and the rule resumes.
  • The last run it planned, with its date and reference.

A rule creates a planned run when all of these hold: one of its triggers is met (available stock below the level, or confirmed orders short), the rule is armed, no run it planned is still open, and nothing has paused it. It is checked every few minutes, so expect the run within minutes of the sale that crossed the line. A rule creates at most one run a day.

Firing disarms the rule. It arms again when every trigger it has is clear (stock back up to the level, and no shortfall on the orders), or when the run it planned completes. So if you abandon the proposal, the rule takes that as “not now” and stays quiet until stock genuinely recovers and dips again. If you complete the run and stock is somehow still short, it may propose another batch, because that shortage is real and new.

An ordinary production run: the recipe’s current version, the rule’s batch size as target output (or as many whole batches of it as covering the orders takes), produced as the product’s format, consuming stock, with its bill of materials, its shortfalls and its shopping list like any planned run. The only difference is the Planned by rule chip next to its status, which it keeps for its whole life; the chip’s tip names the product and links back to it.

A run planned by a rule

It lands without a date. The rule knows what to make; only you know when there is a free kettle and a free morning. It waits in the Runs without a date tray of the planner, marked “needs a date”. Drag it onto a day, edit it, or abandon it, exactly like a run you planned yourself.

The tray naming the run

A rule can also watch your sales orders. Tick Also cover confirmed orders and the rule fires when confirmed orders need more than is available, the “short” figure the product page and the order already show. The run it plans is sized to cover that shortfall in whole batches of the size you set: 300 jars short and a batch of 72 plans one run of five batches, which you can split across days or brew as one if the kettle allows. When a batch cannot be counted into the format, the rule plans one batch and says nothing about sizing.

A made-to-order product needs no level at all: untick Keep available stock above a level and the rule only answers orders.

The card then reads both figures, and the run’s chip says how it was sized.

A rule creates planned runs and nothing else. It never starts one, never completes one, never moves stock and never signs anything. A production run is a record of something that physically happened, and it is trustworthy because a person did each step and said so. The rule proposes; you execute.

Pause stops the rule watching until you Resume; both are one click and move no data. Edit changes the triggers or the batch size and re-arms the rule. Delete rule, in the card’s menu, removes the rule; runs it already planned are kept.

Read next: planning a run, then planning production for the day it lands on.