Skip to main content

How to create an advanced reorder rule

Build an advanced reorder rule formula with lead time, safety stock, free and incoming stock for suggested purchase order quantities.

Once you know how to set up reorder rules, you can go beyond the recommended rules and write a formula that accounts for your supplier lead time and the safety stock you want to keep. This article walks through building that formula step by step.

Where a reorder rule is used

SKULabs evaluates your reorder rule for each item when you add items to a purchase order with the Use suggested quantity filter turned on. You can enter a rule in three places:

  • Account default: go to Settings > Inventory > Settings, enter the rule in Re-order Rule under Purchase Order Settings, and click Save All.

  • One purchase order only: while adding items to a purchase order, open Filters and click (edit rule) next to Use suggested quantity. The rule applies to that session only.

  • One supplier item: edit the item in a supplier's catalog and enter a Re-order rule. When that supplier is selected on the purchase order, this rule is used for that item instead of the account rule.

SKULabs never suggests a negative quantity and always rounds the result up to a whole unit, so you do not need to wrap your formula in Math.max(..., 0) or Math.ceil().

Plan your reorder rule formula

Before writing the formula, decide on three numbers:

  1. The # days sold period of sales history to use (for example 30 days). Select the same value in the # days sold filter when you create purchase orders.

  2. Your average supplier lead time in days (for example 15 days). SKULabs does not track lead time per supplier or SKU, so you write it into the formula as a number.

  3. How much extra safety stock you want, if any (for example 50% more).

The parts of an advanced reorder rule

Reorder quantity: average daily sales times lead time

The base of your rule is the stock you expect to sell while you wait for the purchase order to arrive:

Average daily sales x average lead time

  • Average daily sales can be written as sold / 30, where 30 matches the # days sold filter. You can also use sold / num_days, which always follows the filter you selected, or the built-in velocity variable.

  • Write the lead time as a number.

Example: 30 days of sales history and a 15-day lead time gives (sold / 30) * 15.

Reorder point and safety stock

A reorder point is the stock you need to cover the highest expected demand over the longest expected lead time, which protects you against late deliveries and sales spikes. Think of it as the reorder quantity plus safety stock. A simple way to express it is the reorder quantity times a multiplier, for example ((sold / 30) * 15) * 1.5 if demand could be 50% higher than average before stock arrives.

If you do not keep safety stock, the reorder point is the same as the reorder quantity.

Free and incoming stock

  • free: on-hand stock minus stock reserved for open orders.

  • incoming: stock expected on purchase orders that are still open.

Subtracting free + incoming stops you from ordering stock you already have or have already ordered.

Putting the reorder rule together

The overall structure is:

Reorder quantity + Reorder point - (free + incoming)

Using the examples above:

  • Reorder quantity: (sold / 30) * 15

  • Reorder point with no safety stock: (sold / 30) * 15

  • Reorder point with 50% safety stock: ((sold / 30) * 15) * 1.5

  • Free and incoming stock: free + incoming

Example advanced reorder rules

Reorder rule without safety stock

2 * ((sold / 30) * 15) - (free + incoming)

Reorder rule with safety stock

((sold / 30) * 15) + (((sold / 30) * 15) * 1.5) - (free + incoming)

Reorder rules are available on select plans. For the full list of variables you can use, such as velocity, alert, contiguous_free and days_left, see Automating purchasing in SKULabs: How to set up reorder rules. If a rule shows an error, contact support@skulabs.com.

Did this answer your question?