Automatic Numbering
Automatic, sequential number generation for transactions and master data with customizable prefixes
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 Type | Default Prefix | Example |
|---|---|---|
| AR Invoice | AR- | AR-000013 |
| AR Credit Memo | CRM- | CRM-000001 |
| AR Debit Memo | DBM- | DBM-000001 |
| AR Payment (Receipt) | RCV- | RCV-000001 |
| Recurring Invoice | RCI- | RCI-000001 |
| Wallet Top-up | WLT- | WLT-000001 |
Accounts Payable#
| Transaction Type | Default Prefix | Example |
|---|---|---|
| AP Invoice (Bill) | AP- | AP-000001 |
| AP Credit Memo | VCM- | VCM-000001 |
| AP Debit Memo | VDM- | VDM-000001 |
| AP Payment | APAY- | APAY-000001 |
Banking#
| Transaction Type | Default Prefix | Example |
|---|---|---|
| Bank Deposit | DEP- | DEP-000001 |
| Bank Withdrawal | WD- | WD-000001 |
| Bank Transfer | TRF- | TRF-000001 |
| Bank Fee | FEE- | FEE-000001 |
| Bank Interest | INT- | INT-000001 |
Journal Entries and Adjustments#
| Transaction Type | Default Prefix | Example |
|---|---|---|
| Journal Entry | JE- | JE-000007 |
| Reclassification | RCL- | RCL-000001 |
| Opening Entry | OB- | OB-000001 |
| Closing Entry | CLS- | CLS-000001 |
| Depreciation | DEPR- | DEPR-000001 |
| FX Gain | FXG- | FXG-000001 |
| FX Loss | FXL- | FXL-000001 |
| Inventory Adjustment | INVADJ- | INVADJ-000001 |
Allocations and Tax#
| Transaction Type | Default Prefix | Example |
|---|---|---|
| Cost Allocation | CAL- | CAL-000001 |
| Revenue Allocation | RAL- | RAL-000001 |
| Intercompany Charge | ICC- | ICC-000001 |
| Tax Payment | TAXPAY- | TAXPAY-000001 |
| Tax Adjustment | TAD- | TAD-000001 |
| Usage Accrual | USA- | 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 Type | Default Prefix | Padding | Example |
|---|---|---|---|
| Customer | CUST- | 6 | CUST-000001 |
| Vendor | VEND- | 6 | VEND-000001 |
| Employee | EMP- | 6 | EMP-000001 |
| Item | ITEM- | 6 | ITEM-000001 |
| Fixed Asset | FA- | 6 | FA-000001 |
| Expense Report | EXPR- | 6 | EXPR-000001 |
| Recurring Contract | CON- | 6 | CON-000001 |
| Sale | SALE- | 6 | SALE-000001 |
| Bank Statement | BS- | 6 | BS-000001 |
| Budget Version | BV- | 4 | BV-0001 |
| Journal Entry | JE- | 6 | JE-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#
- The system defines a default prefix for each transaction type (e.g.,
AR-) - When a new entity is created, it copies the default prefixes
- The entity can then override any prefix (e.g., change
AR-toINV-)
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.