Docs/System & Configuration/Automatic Numbering

Automatic Numbering

Automatic, sequential number generation for transactions and master data with customizable prefixes

7 min read

Overview#

Artifi automatically generates unique, sequential identifiers for all transactions and master data. You never need to manually assign a number -- just specify the type, and the system handles the rest.

Key Features#

  • Automatic numbering — provide the transaction type, the system generates the number
  • Entity-specific sequences — each legal entity has independent number sequences
  • Customizable prefixes — override defaults per entity (e.g., "AR-" vs "INV-")
  • Concurrency-safe — prevents duplicate numbers even under heavy load
  • Smart table routing — transactions and journal entries are automatically routed to the correct table

Transaction Numbering#

Artifi supports 28 transaction types, each with its own number series. Numbers are generated automatically when you post a transaction.

Accounts Receivable#

Transaction TypeDefault PrefixExample
AR InvoiceAR-AR-000013
AR Credit MemoCRM-CRM-000001
AR Debit MemoDBM-DBM-000001
AR Payment (Receipt)RCV-RCV-000001
Recurring InvoiceRCI-RCI-000001
Wallet Top-upWLT-WLT-000001

Accounts Payable#

Transaction TypeDefault PrefixExample
AP Invoice (Bill)AP-AP-000001
AP Credit MemoVCM-VCM-000001
AP Debit MemoVDM-VDM-000001
AP PaymentAPAY-APAY-000001

Banking#

Transaction TypeDefault PrefixExample
Bank DepositDEP-DEP-000001
Bank WithdrawalWD-WD-000001
Bank TransferTRF-TRF-000001
Bank FeeFEE-FEE-000001
Bank InterestINT-INT-000001

Journal Entries and Adjustments#

Transaction TypeDefault PrefixExample
Journal EntryJE-JE-000007
ReclassificationRCL-RCL-000001
Opening EntryOB-OB-000001
Closing EntryCLS-CLS-000001
DepreciationDEPR-DEPR-000001
FX GainFXG-FXG-000001
FX LossFXL-FXL-000001
Inventory AdjustmentINVADJ-INVADJ-000001

Allocations and Tax#

Transaction TypeDefault PrefixExample
Cost AllocationCAL-CAL-000001
Revenue AllocationRAL-RAL-000001
Intercompany ChargeICC-ICC-000001
Tax PaymentTAXPAY-TAXPAY-000001
Tax AdjustmentTAD-TAD-000001
Usage AccrualUSA-USA-000001

Master Data Numbering#

Artifi generates unique identifiers for 11 master data types. Each legal entity gets its own independent sequence for every type.

Record TypeDefault PrefixPaddingExample
CustomerCUST-6CUST-000001
VendorVEND-6VEND-000001
EmployeeEMP-6EMP-000001
ItemITEM-6ITEM-000001
Fixed AssetFA-6FA-000001
Expense ReportEXPR-6EXPR-000001
Recurring ContractCON-6CON-000001
SaleSALE-6SALE-000001
Bank StatementBS-6BS-000001
Budget VersionBV-4BV-0001
Journal EntryJE-6JE-000001

Country-specific prefixes: Entities onboarded with a country code may have country-prefixed series. For example, an Estonian entity might use EE-CUST-, EE-VEND-, and EE-FA- prefixes.


Transaction Table Routing#

Artifi uses two separate tables for different transaction purposes, and numbers are routed automatically:

Business Transactions (28 types)#

All business transactions -- AR invoices, AP bills, bank deposits, tax payments, allocations, and more -- are stored in a unified transactions table. These are generated from normal business operations.

Manual Journal Entries (1 type)#

Manual journal entries for adjustments, corrections, and other GL postings are stored separately. This provides:

  • Clear purpose separation between automated and manual postings
  • Distinct audit trail to easily identify human-initiated adjustments
  • Separate access control to restrict who can create manual journal entries
  • Optimized queries with smaller, purpose-specific tables

The routing is enforced at the database level -- manual journal entries cannot accidentally be stored in the business transaction table, and vice versa.


How Number Generation Works#

When you create a transaction or master data record, the system follows a simple flow:

1. Validate the transaction type (check it's enabled)
       │
2. Look up the number series (prefix, counter, padding)
       │
3. Generate the number (prefix + zero-padded counter)
       │  Example: 'AR-' + '000013' = 'AR-000013'
       │
4. Increment the counter atomically
       │
5. Create the record with the generated number

The entire operation runs inside a database transaction with row-level locking, ensuring that no two concurrent requests can generate the same number.


Customizing Prefixes#

Each legal entity can customize number prefixes independently. The system provides defaults, but you can override them per entity.

Default Prefix Logic#

  1. The system defines a default prefix for each transaction type (e.g., AR-)
  2. When a new entity is created, it copies the default prefixes
  3. The entity can then override any prefix (e.g., change AR- to INV-)

Example customizations:

  • Entity 9 (US): AR-000001, AR-000002 (uses default "AR-" prefix)
  • Entity 10 (UK): INV000001, INV000002 (customized to "INV" with no hyphen)
  • Entity 13 (EU): INVOICE-000001 (fully custom prefix)

Padding Options#

The number of digits can be customized:

  • 4 digits: AR-0001 through AR-9999
  • 6 digits (default): AR-000001 through AR-999999
  • 8 digits: AR-00000001 through AR-99999999

Number Gaps#

Gaps in number sequences are normal and expected in accounting systems. They occur when:

  • A transaction fails validation after a number was generated
  • A draft transaction is deleted
  • A concurrent operation rolls back

For example: AR-000013 (success), AR-000014 (failed validation), AR-000015 (success). The gap at AR-000014 is expected and does not indicate a problem.


Uniqueness Guarantees#

Every generated number is guaranteed unique within its legal entity:

  • Unique constraints at the database level prevent duplicate numbers per entity
  • Row-level locking prevents concurrent requests from generating the same number
  • Atomic operations ensure the counter increment and record creation happen together

Previewing Next Numbers#

You can preview the next number that will be generated for any transaction type or master data series without actually incrementing the counter. This is useful for displaying expected numbers in forms or reports before a record is committed.


Entity-Specific Sequences#

Each legal entity maintains completely independent number sequences. This means:

  • Entity 1 can be at AR-000042 while Entity 2 is at AR-000007
  • Different entities can use different prefixes for the same transaction type
  • Adding a new entity automatically creates all 28 transaction type settings and 11 master data number series

All number series are created automatically when a new legal entity is set up, either during onboarding or when adding entities to an existing organization.


Summary#

  • 28 transaction types with automatic number generation
  • 11 master data types with independent sequences
  • Entity-specific sequences with customizable prefixes and padding
  • Concurrency-safe with row-level locking
  • Smart routing to the correct table based on transaction type
  • Gap-tolerant design aligned with standard accounting practices
  • Preview support for displaying next numbers before committing

Subscribe to new posts

Get notified when we publish new insights on AI-native finance.