Setting up document numbering in Bitrix24

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1175
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    747
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Configuring Document Numbering in Bitrix24

A manager creates a contract and writes the number by hand: "Contract #47." At the same time, another manager creates theirs—also "#47." A month later, accounting gets two contracts with the same number and different clients. Or another scenario: numbers are scattered—12, 15, 23, 8—because everyone numbers as they remember. Without automatic numbering, documents can't be properly maintained, found, or tracked.

Numbering Tasks

Proper numbering solves several issues:

  • Uniqueness — each document has a unique number, no duplicates
  • Order — numbers go sequentially, gaps are immediately visible
  • Classification — the number tells you document type, year, direction
  • Search — document found by number in seconds

Numbering Schemes

Bitrix24 supports flexible numbering through custom fields and business processes.

Simple sequential numbering: 001, 002, 003, ... — one counter for all documents. Good for small companies with one document type.

With document type prefix: CONT-001, INV-001, ACT-001 — separate counter for each type. You see by number what kind of document it is.

With year: CONT-2025-001 — counter resets January 1st each year. At new year start, numbering begins at 001.

With department or legal entity: CONT-MSK-2025-001 — for companies with multiple branches or legal entities. Each branch maintains its own numbering.

Technical Implementation

Numbering is implemented through a business process that launches when a document is created (from template or smart process element).

Business process logic:

  1. Determine document type (from card field)
  2. Read current counter value from storage (custom field in a special reference list or global variable)
  3. Increment counter by 1
  4. Format number by template: {Prefix}-{Year}-{Counter with leading zeros}
  5. Write number to document field
  6. Save updated counter

To prevent duplicates with simultaneous document creation, a lock is used—the business process handles the queue sequentially.

Counter Reset by Year

At year start, the counter should begin at 1. This is done by checking in the business process: if the year in the counter doesn't match the current year—reset the value and update the year.

Alternatively—a scheduled business process that zeroes all counters on January 1st.

Manual Correction

Sometimes you need to set a number manually—for example, when migrating existing documents. For this:

  • Field "Number (Manual)" — if filled, the business process uses it instead of auto-generation
  • Ability to set counter start value—to continue numbering from a specific number

Application to Different Entities

Numbering works in:

  • CRM document generator — number is substituted in .docx template via placeholder
  • Smart processes — number is assigned to element on creation
  • Lists — for internal documents: orders, memos, protocols

What We Configure

  • Numbering scheme: number format, prefixes, digit width
  • Business process for auto-numbering on document creation
  • Separate counters by document type, legal entity, department
  • Automatic counter reset at year start
  • Manual number correction and counter start value option
  • Integration with CRM document generator