Skip to content

Numbering schemes

A numbering scheme produces formal document identifiers - INV-2026-0042, CTR/26/0007. Schemes are defined under Numbering in the administration section.

The numbering schemes administration screen

Numbering schemes and their patterns. Sequence values are allocated server-side.

A scheme’s pattern is a template built from tokens:

Token Expands to
{YYYY} Four-digit year, e.g. 2026.
{YY} Two-digit year, e.g. 26.
{MM} Two-digit month, e.g. 03.
{SEQ} The allocated sequence value, unpadded.
{SEQ:0000} The sequence value, zero-padded to the given number of digits.

Anything else in the pattern is literal.

Pattern Produces
INV-{YYYY}-{SEQ:0000} INV-2026-0042
CTR/{YY}/{SEQ:0000} CTR/26/0007
{YYYY}{MM}-{SEQ:000} 202603-014
{SEQ:0000} 0042

{SEQ:0000} is the default when no pattern is given.

If a pattern contains no {SEQ} token at all, the allocated value is appended anyway, padded to four digits, with a separator inserted unless the pattern already ends in - or /.

A pattern of INV-{YYYY} therefore yields INV-2026-0042, not INV-2026 repeated. A scheme cannot be configured into producing the same identifier twice.

Numbers are allocated server-side, in the database. Two people numbering documents at the same instant receive different numbers; there is no client-side counter to drift or collide.

Allocation is a deliberate act: a number is issued when it is requested, not automatically on every upload. This is what you want - a formal identifier should be assigned when a document becomes the thing that needs one, not to every draft that passes through.

Choose padding for the volume you expect over the scheme’s life, not this year’s. {SEQ:000} allows 999 before the format grows a digit, and identifiers that change shape partway through a series sort badly and read as a mistake.

Four digits is a reasonable default. Six is not excessive for a high-volume scheme.

{YYYY} and {MM} expand from the allocation time, so a number issued in March 2026 carries 2026 and 03.

Note that the tokens format the date but do not reset the sequence. If you want a series that restarts each year, that is a matter of how you manage schemes, not something the pattern does on its own. A pattern containing {YYYY} with a continuously increasing sequence produces INV-2026-0042 followed by INV-2027-0043, which is valid but may not be what was intended.

Changing a pattern affects numbers allocated from then on. Already-issued numbers are recorded on their documents and do not change - which is correct, because an identifier that changes retroactively is not an identifier.

Expect a scheme’s history to contain more than one format if it has been edited. That is a reason to settle the pattern before the scheme goes into use.