Priority rules
When there is more work than can be done at once, the order of processing has to be decided. Priority rules define that order, and they apply in two places at once.
Stockly → Warehouses → Rules → Priority.
Two places, one answer
Section titled “Two places, one answer”The same rules decide:
- which orders a wave takes, and in what order — before the picking list even exists;
- who gets stock that has just arrived, when several orders are waiting for it.
This is deliberately one table and not two: a rule placing wholesale before retail means the same in both situations, and two separate tables would diverge over time.
Priority and queue position are two different numbers
Section titled “Priority and queue position are two different numbers”This distinction has to be understood before the screen is used.
- Priority decides which rule catches an order. The lowest number that fits wins.
- Queue position decides where the caught order goes.
In daily use the second column remains empty; left blank it means the position on the list, so the table is read as displayed: the higher the row, the earlier the order is served.
The separate column exists for one case that a single number cannot express:
A customer belongs to a group served with priority, but is behind on payments and should be served last. The rule about them has to sit high to catch the order before the group rule sees it, and a high position means early. The contradiction is resolved only when the rule that catches the order and the place the order takes in the queue are two separate values.
That rule then gets a high priority and an extreme queue position.
Applies to: what a rule narrows itself to
Section titled “Applies to: what a rule narrows itself to”A rule may name customers, customer groups, sales channels, shipping methods, carrier profiles and warehouses. An empty field means any, never none.
Each axis may name several values at once — “Wholesale + Partner” is one row, not two. Listing more values does not make a rule more specific: an enumeration narrows the set the rule applies to, but it does not make the rule a stronger statement about any single order. Priority is the tool for settling two rules that both fit.
Only when: the conditions
Section titled “Only when: the conditions”Three criteria narrow when a rule applies, and never decide which rule wins:
- Order value from / up to — a money threshold.
- Currency — an order total carries no currency of its own, so a value threshold applies only to orders in the currency named here. A threshold with no currency is not limited by currency.
- Promised within (hours) — catches an order once its promised shipping date is that close. This criterion changes over time: an order that is not urgent in the morning becomes urgent later the same day.
Three consequences of this model
Section titled “Three consequences of this model”The customer group is the current one. An order does not record the group its customer was in when they bought; the group is read from the customer’s record. Moving a customer to another group therefore changes how their existing orders are served, which for a rule placing wholesale before retail is usually the intended behaviour.
An order placed without an account has no customer record behind it. Only the channel, shipping method, carrier or value can catch it, and rules by customer and by group pass it by.
A rule does not reserve stock in advance. When goods arrive, it orders the demands already competing for them. Guaranteeing stock for a specific customer is a different function.
The default rule
Section titled “The default rule”The last row of the list is set in italics and carries a padlock. It is not a record but built-in behaviour: an order that no rule caught is placed behind every order a rule spoke for, and such orders are ordered among themselves by age. It cannot be deleted or edited, because the queue has to have a defined order even when every rule is removed.
The direction, oldest or newest first, is set as a rule of its own, in the Tie-break field. The first rule that states it decides, and leaving the field empty is not a statement.
Examples
Section titled “Examples”Wholesale channel before retail : one rule: applies to = the wholesale channel, priority 10. The rest of the world stays on the default.
Express before economy : applies to = shipping method “express courier”, priority 20.
Anything due today goes to the front : no scope, condition “promised within 24 hours”, priority 5. Catches every order against the clock, whoever the customer is and whatever the channel.
A customer behind on payments goes last : applies to = that customer, priority 1 (so it catches before the group rule), queue position = extreme.