Numbering tokens, formats and rules
Every numbered document, every pattern token, digits, yearly restart and branch codes, with examples and what happens to old numbers.
A document number is built from a Pattern of tokens, filled in when the document is created. This page lists the documents, the tokens and the rules, with examples. Change them in Settings → Numbering.
Documents that get a number
| Card | Starting layout of a new agency | First number |
|---|---|---|
| Bookings | prefix TR, {PREFIX}-{YYYY}-{SEQ}, 5 digits, restarts each year |
TR-2026-00001 |
| Quotations | prefix Q, {PREFIX}-{YYYY}-{SEQ}, 4 digits, restarts each year |
Q-2026-0001 |
| Tax invoices | prefix INV, {PREFIX}-{YYYY}-{SEQ}, 5 digits, restarts each year, forward only |
INV-2026-00001 |
| Credit notes | prefix CN, {PREFIX}-{YYYY}-{SEQ}, 5 digits, restarts each year, forward only |
CN-2026-00001 |
| Debit notes | prefix DN, {PREFIX}-{YYYY}-{SEQ}, 5 digits, restarts each year, forward only |
DN-2026-00001 |
| Payment receipts | prefix RC, {PREFIX}-{YYYY}-{SEQ}, 5 digits, restarts each year |
RC-2026-00001 |
| Leads | prefix L, {PREFIX}-{SEQ}, 5 digits, keeps counting |
L-00001 |
Your agency may already use other values: the cards show what is set now.
Tokens
| Token | Button tip | Becomes | Example |
|---|---|---|---|
{PREFIX} |
Prefix | The card's Prefix (up to 10 characters, capital letters) | INV |
{BRANCH} |
Branch code | The Short code of the document's branch; the country code (for example SA) when the branch has no short code |
RUH |
{YYYY} |
Year | The year, 4 digits | 2026 |
{YY} |
Short year | The year, last 2 digits | 26 |
{SEQ} |
Running number | The running number, filled with zeros to Digits in the running number | 00042 |
Each token is used once. Anything else you type in the pattern (letters, /, -) is kept as it is.
Rules
- The pattern must contain
{SEQ}. - Digits in the running number is from 1 to 10. It is a minimum: the number grows past it when needed
(5 digits:
00042, then later123456). - Two or more dashes in a row become one, and a dash at the start or end is removed. So
{PREFIX}-{BRANCH}-{SEQ}in a document without a branch givesINV-00042, notINV--00042. - Start again at 1 each year: the first document of a new year gets running number 1. The pattern must then contain
{YYYY}or{YY}, or numbers would repeat. Off, the number keeps counting across years. - Tax invoices, Credit notes and Debit notes are Forward only: their Next running number can be raised, never lowered, so no number is used twice.
- The number the next document would get must not belong to a document already. If it does, the card does not save.
- A typed Next running number applies to the current year.
Branch series
A branch numbers its own documents when Each branch numbers its own documents is on, when the branch has Own document numbers on, or always when the branch is in Saudi Arabia (e-invoicing).
- Its series is copied from the agency's on its first document (or when you press Set up now). The pattern gets
{BRANCH}after{PREFIX}:{PREFIX}-{YYYY}-{SEQ}becomes{PREFIX}-{BRANCH}-{YYYY}-{SEQ}. - A branch series must keep
{BRANCH}, so two branches never give the same number. - Leads are always numbered by the agency.
- A branch that no longer numbers on its own keeps its old series, marked Not in use; its new documents use the agency series.
Examples
| Pattern | Prefix | Digits | Branch code | Next number |
|---|---|---|---|---|
{PREFIX}-{YYYY}-{SEQ} |
INV |
5 | — | INV-2026-00042 |
{PREFIX}-{BRANCH}-{YYYY}-{SEQ} |
INV |
5 | RUH |
INV-RUH-2026-00042 |
{PREFIX}{YY}/{SEQ} |
BK |
4 | — | BK26/0042 |
{BRANCH}-{PREFIX}-{SEQ} |
RC |
6 | MNM |
MNM-RC-000042 |
{PREFIX}-{SEQ} |
L |
5 | — | L-00042 |
Existing numbers
Numbers already given never change. A new prefix, pattern or digit count applies from the next document on, so your old and new documents can look different.
Related articles
- NumberingThe running numbers your bookings, quotations, invoices, notes, receipts and leads get, for the agency and for each branch.
- Change how documents are numberedChange the prefix, digits, pattern, next number or yearly restart of a document series, for the agency or for one branch.
- Set up ZATCA e-invoicing for a branchFrom the Saudi branch's seller details to onboarding a device with the OTP from the Fatoora portal and the first cleared or reported invoice.