Development of Bitrix24 business process templates

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
    1173
  • 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
    745
  • 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

Developing Business Process Templates for Bitrix24

The portal has accumulated eight similar approval processes with minor differences in amounts and approvers. Each was configured separately; when the rules change you have to edit eight copies. BP templates solve this problem — one template, parameters at launch.

What Is a Business Process Template

A template is a saved BP configuration that can be launched for any suitable document. Templates are stored in b_bizproc_workflow_template, bound to a document type (MODULE_ID, ENTITY, DOCUMENT_TYPE).

The key difference from a one-off BP: launch parameters. When starting a template the system shows the user a form with fields — the user enters data (e.g., the amount or reason for the request), and it becomes available inside the process as variables.

Parameters vs. Variables vs. Constants

Three data types in a BP template:

Parameters — requested from the user at launch. Type, required flag, and default value are set in the editor. Used where data changes from run to run.

Variables — internal variables that exist within a single BP instance. Initialized at the start, modified by actions. For example, the variable ApprovalResult accumulates voting results.

Constants — fixed values, identical for all runs of the template: threshold amounts, notification addresses, IDs of approving users. When rules change only the constant is updated — the entire graph doesn't need to be rebuilt.

Export and Import of Templates

Templates are exported to an XML file via the editor interface. The XML contains the full BP structure: all actions, conditions, settings, and field bindings. This allows:

  • Moving templates between portals (test → production)
  • Storing templates in version control
  • Building a library of standard processes

When importing to a new portal, field bindings (user IDs, list IDs) need to be remapped manually — they will differ. There is no automatic remapping.

Import/export path: [List] → Business Processes → [Template] → Edit → Export/Import.

Programmatic Template Creation

For bulk creation of similar templates (e.g., for 30 lists) the API is used:

$template = new \CBPWorkflowTemplateLoader();
$arTemplate = [
    'MODULE_ID'     => 'lists',
    'ENTITY'        => 'BizprocDocument',
    'DOCUMENT_TYPE' => 'iblock_' . $iblockId,
    'NAME'          => 'Request Approval',
    'DESCRIPTION'   => '',
    'AUTO_EXECUTE'  => \CBPDocumentEventType::Create,
    'TEMPLATE'      => $arProcessTemplate, // array from XML
    'PARAMETERS'    => $arParameters,
    'VARIABLES'     => $arVariables,
    'CONSTANTS'     => $arConstants,
];

$templateId = \CBPWorkflowTemplateLoader::Add($arTemplate, $errors);

AUTO_EXECUTE — automatic launch flag: on document creation, modification, or manually. Values: 0 (manual), 1 (create), 2 (modify), 4 (delete).

Template Versioning

Bitrix24 has no built-in git-like versioning for BP. Best practice: before every change, export the XML with the date in the filename and store it in a repository. On problems — import the old version.

Development Time

Task Time
Designing the template structure 2–4 h
Building the template in the editor 4–8 h
Testing and debugging 2–4 h
Documentation for administrators 2 h

Developing one template — 2–3 working days including scenario planning and testing on real data.