Numbering sequences
The per-company generator behind every readable document number — jobs, change notices, payments, and more.
Every document Carbon creates gets a : a job is J000001, a change notice is CN-000001, a payment is PAY-2026-07-000001. Those numbers come from , one small counter per document type per company. Sequences live under Settings → Sequences; every company is seeded with a full set, and you can retune any of them (prefix, counter, padding) without touching code.
When something needs a number, Carbon assembles it from three parts and advances the counter in the same operation, so two documents never collide:
{prefix}{next + step, zero-padded to size}{suffix}The number is stored on the document, not recomputed
Once created, a document's number never changes. Retuning a sequence only affects documents created after the change; it never renumbers what exists.
Fields
PAY-%{yyyy}-%{mm}- renders as PAY-2026-07-.Current + Step. Set it to restart or fast-forward numbering. Must be ≥ 0.6 gives 000001. Accepted range 1–20; most sequences ship at 6.1; must be ≥ 1.Date tokens
Prefix and suffix can embed the current date — how payments and journal entries get their year/month partitioning. Tokens are interpolated when the number is generated, not when you save: %{yyyy} (2026), %{yy} (26), %{mm} (01–12), %{dd} (01–31), plus %{hh} and %{ss} for hour and second.
Hour and second tokens don't work for every document type
Customers, suppliers, and quotes are numbered by a database trigger that only understands the four date tokens; putting %{hh} or %{ss} in those sequences leaves the literal token in the number. Stick to date tokens unless you know the document type is generated by an edge function.
Seed defaults
A new company is seeded with a sequence for every numbered document type:
| Document type | table | Prefix | Example |
|---|---|---|---|
| Job | job | J | J000001 |
| Quote | quote | Q | Q000001 |
| Sales order | salesOrder | SO | SO000001 |
| Sales RFQ | salesRfq | RFQ | RFQ000001 |
| Sales invoice | salesInvoice | AR | AR000001 |
| Purchase order | purchaseOrder | PO | PO000001 |
| Purchase invoice | purchaseInvoice | AP | AP000001 |
| Purchasing RFQ | purchasingRfq | PRFQ | PRFQ000001 |
| Supplier quote | supplierQuote | SQ | SQ000001 |
| Receipt | receipt | RE | RE000001 |
| Shipment | shipment | SHP | SHP000001 |
| Warehouse transfer | warehouseTransfer | WT | WT000001 |
| Stock transfer | stockTransfer | ST | ST000001 |
| Picking list | pickingList | PL | PL000001 |
| Inventory count | inventoryCount | IC | IC000001 |
| Change notice | changeOrder | CN- | CN-000001 |
| Issue (NCR) | nonConformance | NCR | NCR000001 |
| Inbound inspection | inboundInspection | II | II000001 |
| Gauge | gauge | G | G00001 |
| Maintenance dispatch | maintenanceDispatch | MAIN | MAIN000001 |
| Customer | customer | CUS | CUS000001 |
| Supplier | supplier | SUP | SUP000001 |
| Fixed asset | fixedAsset | FA | FA000001 |
| Depreciation run | depreciationRun | DR | DR000001 |
| Journal entry | journalEntry | JE-%{yyyy}-%{mm}- | JE-2026-07-000001 |
| Payment | payment | PAY-%{yyyy}-%{mm}- | PAY-2026-07-000001 |
| Credit memo | creditMemo | CR-%{yyyy}-%{mm}- | CR-2026-07-000001 |
| Debit memo | debitMemo | DR-%{yyyy}-%{mm}- | DR-2026-07-000001 |
A prefix on an older company may differ: a few sequences added after launch were backfilled with different defaults (jobs as WO, change notices re-prefixed from ECO- without renumbering existing records). Either way, change it under Settings → Sequences.
Accounting posts are the heaviest user of this machinery: every GL post pulls a fresh journalEntry number as it books, which is why that sequence carries a month token by default. Sequences are company-scoped, so two companies in the same group number independently even when they share a chart of accounts. Where the numbers land day to day: jobs, change notices, and payments.