1C-Bitrix Web Form to Bitrix24 CRM Integration

1C-Bitrix Web Form to Bitrix24 CRM Integration We often encounter a recurring challenge: a website has a well-configured feedback form, but managers operate within Bitrix24 CRM, and leads are received via email without structured data. Data is not synchronized, the sales funnel is incomplete, and

Our competencies:

Frequently Asked Questions

1C-Bitrix Web Form to Bitrix24 CRM Integration

We often encounter a recurring challenge: a website has a well-configured feedback form, but managers operate within Bitrix24 CRM, and leads are received via email without structured data. Data is not synchronized, the sales funnel is incomplete, and analytics are absent. For example, a prospect submits a web form, but the manager learns about it an hour later—the lead becomes cold. Without automatic data sync, every call or application becomes manual work, while competitors already have CRM automation. Estimates indicate that lead loss can reach 30% without integration. The typical integration cost is $500–1000, offering a return on investment within 3 months through reduced manual labor and increased conversion.

The standard Bitrix web form modules (bitrix:main.feedback, bitrix:form.result.new) store results in the b_form_result table and send email notifications. Without CRM integration, data remains in the site database—managers do not see them in Bitrix24, and communication history is lost. According to the official 1C-Bitrix documentation, the OnAfterResultAdd event of the form module allows intercepting result data before notification is sent.

Why Native Web Forms Are Better Than CRM Forms

Bitrix24 CRM forms are easier to set up, but their hosting on a third-party domain (b24-cdn.bitrix24.by) negatively impacts SEO and page load speed. Moreover, you cannot customize their appearance to match the site design without an iframe wrapper. A native web form stays on your own domain, passes all UTM tags and cookies, and the styles are fully controlled by the site template. According to our experience, the conversion rate of such forms is 20–30% higher.

How to Set Up Integration: 6 Steps

  1. Audit current forms and CRM—determine which forms send data and which fields are needed in CRM.
  2. Create the handler—subscribe to the OnAfterResultAdd event in init.php.
  3. Field mapping—set up correspondence between form fields and lead fields in a configuration array.
  4. Create custom fields—via REST API crm.userfield.add for non-standard data.
  5. Deduplication—check existing leads by email/phone before creating a new one.
  6. Testing and deployment—verify data transfer, files, and business processes.

Web Form Result Handler

Bitrix provides the OnAfterResultAdd event of the form module. Subscribe in init.php:

AddEventHandler('form', 'OnAfterResultAdd', function($formId, $resultId, $fields) { // Only for needed forms $targetForms = [3, 7, 12]; // Form IDs: callback, consultation, partnership if (!in_array($formId, $targetForms)) return; $answers = CFormResult::GetDataByID($resultId, [], $arrResult); $mapped = mapFormAnswers($formId, $answers); $b24 = new B24Sender(getenv('B24_WEBHOOK_URL')); $b24->sendLead($mapped); }); 

Mapping Form Fields to Lead Fields

Web form fields are stored in b_form_field, answers in b_form_result_answer. Linked by FIELD_ID. Mapping is configured in a config:

$formMapping = [ 3 => [ // Form "Callback Request" 'q_name' => 'NAME', 'q_phone' => 'PHONE', 'q_comment' => 'COMMENTS', 'utm_source'=> 'UTM_SOURCE', ], 7 => [ // Form "Partnership" 'q_company' => 'COMPANY_TITLE', 'q_contact' => 'NAME', 'q_email' => 'EMAIL', 'q_direction' => 'COMMENTS', ], ]; 

Case Study: Multi-Step Application Form

From our practice—an IT integrator website with a project application form: 4 steps (project type, budget, timeline, contacts). The standard web form module stores all answers in b_form_result_answer. The task: create a qualified lead in Bitrix24 with filled fields and correct funnel.

Solution: steps 1–3 are saved in session, step 4 submits the complete form. In the OnAfterResultAdd handler, we collect all fields and create a lead with custom CRM fields:

$leadFields = [ 'TITLE' => 'Project: ' . $answers['project_type'], 'OPPORTUNITY' => $answers['budget_from'], // budget as lead amount 'CURRENCY_ID' => 'RUB', 'UF_CRM_PROJECT_TYPE' => $answers['project_type'], 'UF_CRM_DEADLINE_WEEKS' => $answers['deadline'], // UF_CRM_* — custom lead fields in Bitrix24 ]; 

Custom fields (UF_CRM_*) are created in Bitrix24 via crm.userfield.add beforehand. After lead creation, we automatically start a business process in Bitrix24 via bizproc.workflow.start. This guarantees no application gets lost.

How to Transfer Files from Forms to CRM?

If a form includes a file upload field (technical specification, brief), the file must be transferred to Bitrix24. REST API crm.lead.add does not support binary upload directly—we use disk.folder.uploadfile to upload to Bitrix24 Drive, then attach to the lead via crm.activity.add with type DOCUMENT. The file appears in the lead card, and the manager sees the attachment immediately.

Lead Deduplication

The same company often fills out the form multiple times. We check by email and phone before creating:

$existing = $b24->call('crm.duplicate.findByComm', [ 'type' => 'EMAIL', 'values' => [$email], 'entity_type' => 'LEAD', ]); if (!empty($existing['result']['LEAD'])) { // Add activity to existing lead, do not create new $b24->call('crm.activity.add', [...]]); } 

What's Included in the Service

Stage Duration Result
Audit of current web forms and CRM 1–2 h Field schema, form list, requirements
Handler setup and mapping 3–5 h Working handler for 1 form
Create custom fields in CRM 2–4 h Fields for non-standard data
Deduplication and repeat handling logic 4–6 h Protection against duplicate leads
File transfer from forms 4–6 h Files attached to lead
Launch business processes on lead 3–5 h Automatic application processing
Documentation and training 1–2 h Administrator instructions

Average cost: $800 per form, with discounts for multiple forms. Our team has 7 years of expertise in Bitrix integration and has successfully completed over 60 projects, ensuring reliable and efficient data flow.

Example of custom field setup Suppose you need to transfer project type and desired timeline. Via REST API, create fields UF_CRM_PROJECT_TYPE (list) and UF_CRM_DEADLINE_WEEKS (number). In the handler, map to these fields.

All work is performed with a guarantee—we take responsibility for the stability of integration and uninterrupted data transfer. The integration typically pays for itself within 3 months. Managers save up to 2 hours daily. If you have any questions, contact us—we'll assess the project within one day and offer the optimal solution. Order integration with quality guarantee.