Setting up feedback with transfer to Bitrix24 CRM

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

Feedback Form Setup with CRM Transfer to Bitrix24

A contact form sends an email to the administrator — and that is where it ends. No task for the manager, no history in the CRM, no SLA on the response. Setting up direct submission to Bitrix24 resolves the problem in 4–6 hours.

Feedback component options

In 1C-Bitrix, feedback forms are implemented via:

  • bitrix:main.feedback — the standard component, a simple form.
  • bitrix:form.result.new — the extended web forms module supporting fields of any type.
  • A custom component or Ajax form built with React/Vue.

The approach is the same for all variants: intercept the moment of successful submission and call the Bitrix24 REST API.

Setup via the main.feedback component

The bitrix:main.feedback component uses the OnBeforeEventAdd event (module main). Subscribe in init.php:

AddEventHandler('main', 'OnBeforeEventAdd', function(&$eventName, &$lid, &$fields) {
    if ($eventName !== 'FEEDBACK') return;

    $b24WebhookUrl = COption::GetOptionString('my_module', 'b24_webhook');
    $http = new \Bitrix\Main\Web\HttpClient();

    $leadData = [
        'TITLE'    => 'Feedback from website',
        'NAME'     => $fields['NAME'] ?? '',
        'PHONE'    => [['VALUE' => $fields['PHONE'] ?? '', 'VALUE_TYPE' => 'WORK']],
        'EMAIL'    => [['VALUE' => $fields['EMAIL'] ?? '', 'VALUE_TYPE' => 'WORK']],
        'COMMENTS' => $fields['MESSAGE'] ?? '',
        'SOURCE_ID'=> 'WEB',
    ];

    $http->post($b24WebhookUrl . 'crm.lead.add.json',
        json_encode(['fields' => $leadData]));
});

What to create in the CRM: a lead or a deal

  • Lead — if the inquiry is from a new or unknown customer. The manager qualifies it and converts it to a contact/deal.
  • Deal — if the customer already exists in the database (identified by phone/email via crm.duplicate.findByComm).
  • Activity (call/message) — if you simply need to log the fact of contact with an existing contact.

For sites with a high volume of new inquiries, creating leads is the correct approach. For B2B with a limited customer base, create deals or activities directly.

Notifying the assignee

After a lead is created via REST, Bitrix24 automatically triggers a notification to the assignee (if CRM notifications are configured in the portal). You can additionally create a task:

$b24->call('tasks.task.add', ['fields' => [
    'TITLE'       => 'Respond to inquiry: ' . $leadData['NAME'],
    'RESPONSIBLE_ID' => $assignedId,
    'DEADLINE'    => date('c', strtotime('+2 hours')),
    'UF_CRM_TASK' => ['L_' . $leadId], // link to the lead
]]);

Storing the webhook settings

The Bitrix24 webhook URL is stored in module settings via COption (table b_option) — never hardcoded. The editing interface is located under Settings → Product Settings → Module Settings.

Basic feedback transfer setup for a single form takes 4–6 hours including testing.