Number ranges
Document numbers look like a formatting detail until an ERP rejects an order because the number does not match its expected pattern, or an auditor asks why your delivery notes jump from 000412 to 000418. Set the ranges before you go live; changing them afterwards is possible but leaves a visible seam.
How a number is built
A range is a template plus a counter:
{prefix}{counter, zero-padded}{suffix}
| Field | Meaning | Example |
|---|---|---|
code | The range's identifier. Three are seeded: order, delivery, return | order |
prefix | Text in front | ORD- |
suffix | Text behind | -X |
padding | Width the counter is padded to | 6 → 000123 |
counter | The last number handed out | 122 |
step | How far the counter advances per draw | 1 |
position_step | The gap between line-item numbers on a document | 10 → positions 10, 20, 30 |
With prefix: ORD-, padding: 6 and counter: 122, the next order is
ORD-000123. The detail page shows the next number as a preview, so you can
see the shape before you commit.
position_step is the one people overlook and later want. A step of 10 means
position numbers 10, 20, 30, which leaves room to insert a line between two
existing ones without renumbering the document. Most ERP systems number this
way and some expect it.
Three documents, three ranges
| Code | Draws for |
|---|---|
order | The order number |
delivery | Each shipment, your delivery note |
return | Each registered return |
They are separate on purpose. A shared counter means your first return is number 4,412 and nobody can tell how many returns you have had.
Which range a document draws from is set per market. That is real multi-market numbering: a market can point its order key at its own range code and number off its own counter. A code that names no range is refused outright rather than falling back silently: a wrong number is worse than a failed call.
channel_id
field, but it is a label, not a selector: one code is one range, and the draw
never reads the channel. You cannot have webshop orders numbered WEB-000123
and EDI orders numbered EDI-000123 from two ranges both called order. If
your accounting requires separate sequences per sales channel, plan for separate
markets, or number in your ERP instead.Create or change a range
- Go to Configuration › Number ranges.
- On a fresh tenant with nothing configured, select Seed defaults to create
the
order,deliveryandreturnranges. - Select a range, or New range for an additional one.
- Set
prefix,suffixandpaddingto match what the receiving system expects. - Set
step. Leave it at1unless you have a specific reason. - Set
position_stepto10unless your ERP wants something else. - Check the Next number preview before saving.
Migrating from an existing sequence
If you are moving from a shop or ERP that already issued numbers, set the
counter to the last number that system handed out. The next draw continues from
there, and you avoid issuing a number that already exists somewhere in your
accounting.
Confirm what "last issued" means before you type it: the highest number the old system ever issued, rather than the highest number on an open order.
What to check
- Place a test order and confirm the number matches the pattern exactly, including padding.
- Create a shipment on it and confirm the delivery note draws from the
deliveryrange, not the order range. - Confirm positions are numbered with your
position_step. - Hand a real order number to whoever owns the receiving system and have them confirm it parses.
- Check the counter on Configuration › Number ranges has advanced by your
step.
Gaps are normal
Your sequence will have gaps. An order that fails validation after the number is drawn, or an approval request that is rejected, consumes a number that is never reused; counters do not go backwards. If your accounting expects a gapless sequence, have that conversation with them before go-live.
Next
- Process an order — where these numbers show up.
- Reconcile orders with your ERP — the other numbers on an order.