Moving cases from deals into a chain of Bitrix24 smart processes
The law firm ran debt-collection cases in regular deal pipelines, where case management, legal-department work and enforcement were mixed in a single card. The process was moving to a chain of smart processes "case management → legal department → enforcement" — and hundreds of live cases had to be moved in full, with documents and history.
A boxed portal in active use with no way to roll back a mass write; different scenarios have their own field and list sets, and the portal's stock storage for file fields was corrupted — files were silently lost on a regular save.
- A shared migration engine instead of copy-paste per scenario: reading the source, stages, fields, files, writing and a report — a scenario is defined by config alone
- A safe-launch ladder: --inspect-fields to build the field map, --dry-run with a full write preview, --run and a separate verify after the run
- List values mapped between entities first by XML_ID, then by value text; every miss and dropped value is logged
- Normalization of dates in any format and file copying with original names preserved; with corrupted storage — a direct write and mandatory verification after saving
- Cross-linked timeline comments "source deal ↔ new item", so any lawyer finds the case history in two clicks; file repair based on the run log
- Copying between smart processes via a webhook from a Bitrix24 robot: 4 route profiles, token access verified with hash_equals
Four migration scenarios (maps of ~49, ~61, ~77 and ~20 field pairs) ran without a single error in the logs: for example, 335 deals were moved in one run in about 40 seconds. Further movement of cases between smart processes is triggered by the robot itself via the webhook.
Related services and solutions
Bitrix24 D7: boxed development and stabilization
I work not only with interface settings, but at the level of the box, the code and internal APIs.
Business process automation
When employees transfer data manually, reconcile spreadsheets, lose requests or repeat the same actions — I turn the routine into code.