1C-Bitrix Custom Service Calculator Module Development

1C-Bitrix Custom Service Calculator Module Development A client enters the area, selects finishing — and leaves. Without a price. Without an application. Familiar? A service calculator on Bitrix solves this: the user gets an instant cost and submits an application. We develop custom modules that

Our competencies:

Frequently Asked Questions

1C-Bitrix Custom Service Calculator Module Development

A client enters the area, selects finishing — and leaves. Without a price. Without an application. Familiar? A service calculator on Bitrix solves this: the user gets an instant cost and submits an application. We develop custom modules that integrate into your site and work with CRM. No ready-made solutions — only tailored to your business logic and formulas.

Ready-made calculators in the Bitrix marketplace are practically nonexistent, or they are too primitive. For serious business — an insurance company, a construction contractor, a print shop — a module with flexible formulas and CRM integration is required. Our experience shows that a properly built calculator increases conversion by 2–3 times: the client understands pricing and trusts the company.

When Is a Custom Calculator Needed?

If your business uses non-standard rates, regional coefficients, or depends on data from 1C, a ready-made plugin won't suffice. A custom module gives full control over formulas and integrations. Compare: ready-made solutions handle only linear dependencies, while a custom module handles branching and external directories. Lead conversion with such a calculator is 2 times higher — proven on projects.

How the Formula Engine Works

The formula is stored in a JSON structure interpreted both on the server (PHP) and client (JavaScript). Synchronization is critical: the final amount in the interface must match the amount in CRM. The PHP interpreter FormulaEvaluator::evaluate($formula, $fieldValues) recursively traverses the tree and calculates the result. The frontend uses an identical JS interpreter.

{ "type": "add", "operands": [ { "type": "multiply", "operands": [ {"type": "field", "name": "area"}, {"type": "field", "name": "work_type_price"} ] }, { "type": "if", "condition": {"type": "gt", "left": {"type": "field", "name": "area"}, "right": 100}, "then": {"type": "multiply", "operands": [{"type": "ref", "name": "subtotal"}, -0.1]}, "else": 0 } ] } 

Comparison: Ready-Made vs Custom Module

Parameter Ready-Made Solutions Custom Module
Formula flexibility Only linear Any with conditions and references
CRM integration Limited Full, with lead and deal creation
Catalog price binding No Yes, via b_catalog_price
Dependent fields No Yes, with dynamic filtering
Admin interface Standard Under your brand and logic

Module Architecture: Tables and Field Types

The vendor.calculator module includes four main tables:

  • b_vendor_calc_calculator — calculators: id, name, slug, config (JSON of fields and steps), formula (JSON calculation tree), crm_target (lead/deal), is_active
  • b_vendor_calc_field — calculator fields: id, calculator_id, type, name, label, options (JSON), depends_on, validation_rules, sort
  • b_vendor_calc_result — saved calculations: id, calculator_id, session_id, user_id, params (JSON), result (JSON sum), created_at
  • b_vendor_calc_lead — link between calculation and CRM lead/deal: result_id, crm_type, crm_id

Field types:

  • number — numeric field with min/max/step
  • slider — slider with range
  • select — dropdown with coefficient binding
  • checkbox — flag with additional cost
  • radio — single choice
  • area — two-dimensional input (width × height)
  • catalog_product — select product from infoblock with auto-substitution of price

Why Reactive Recalculation Matters

On the frontend — reactive recalculation without page reload. On any field change:

  1. Current values of all fields are collected
  2. A local copy of the formula is computed in JS (same logic as PHP)
  3. The result is instantly updated in the interface
  4. Additionally: an AJAX request to the server for precise calculation using actual database prices
// Recalculation on field change document.querySelectorAll('.calc-field').forEach(field => { field.addEventListener('change', () => { const values = collectFieldValues(); const localResult = evaluateFormula(calculatorConfig.formula, values); updateResultDisplay(localResult); debounce(() => fetchServerResult(values), 500)(); }); }); 

Dependent Fields

Dependency is described in the field configuration:

{ "name": "material_type", "type": "select", "depends_on": { "field": "work_type", "map": { "painting": ["latex", "acrylic", "oil"], "wallpaper": ["paper", "vinyl", "non-woven"], "tile": ["ceramic", "porcelain", "mosaic"] } } } 

When work_type = 'painting' is selected, the material list filters to ["latex", "acrylic", "oil"]. The logic works both on the client and is validated on the server upon form submission.

CRM Submission

After calculation, the user fills in contact details and submits the application. The module creates a lead or deal:

$leadFields = [ 'TITLE' => 'Calculation from calculator: ' . $calculator['NAME'], 'NAME' => $formData['name'], 'PHONE' => [['VALUE' => $formData['phone'], 'VALUE_TYPE' => 'WORK']], 'EMAIL' => [['VALUE' => $formData['email'], 'VALUE_TYPE' => 'WORK']], 'COMMENTS' => $this->buildCalculatorComment($result), 'UF_CALC_SUM' => $result['total'], 'SOURCE_ID' => 'CALCULATOR', ]; $leadId = \Bitrix\Crm\LeadTable::add($leadFields)->getId(); 

Calculation parameters are written to the lead comment and to the custom field UF_CALC_PARAMS (JSON).

What's Included

  • Database architecture and module installer
  • Field builder and configurator with admin interface
  • Formula engine PHP + JavaScript
  • Reactive recalculation and dependent fields
  • Integration with trade catalog prices
  • CRM application submission (leads/deals)
  • Component for page placement
  • Documentation and training of your employee
  • 30-day warranty after delivery

Development Timeline

Stage Duration
Architecture, tables, installer 1 day
Field builder and configurator 2 days
Formula engine PHP + JS 3 days
Dependent fields, reactive recalculation 2 days
Catalog price integration 1 day
CRM submission 1 day
Admin interface 2 days
Page placement component 1 day

Total: 13 business days. Non-standard formulas with external references (rate grids, regional coefficients) — add 2–3 days.

Contact us to estimate your project. Over 10 years of Bitrix development experience — we guarantee quality and transparency. Get a consultation to discuss your task and prepare a commercial proposal. Learn more about CRM systems and Bitrix24 REST API.