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.







