Answer the question
In order to leave comments, you need to log in
How to collect leads in Bitrix 24 from joomla feedback forms?
there is a code
<?php
// URL в переменной $queryUrl
$queryUrl = 'https://(поддомен).bitrix24.ru/rest/1/(token)/crm.lead.add.json';
// параметры лида $queryData
$queryData = http_build_query(array(
'fields' => array(
"TITLE" => $_REQUEST['first_name'].' '.$_REQUEST['last_name'],
"NAME" => $_REQUEST['first_name'],
"LAST_NAME" => $_REQUEST['last_name'],
"STATUS_ID" => "NEW",
"OPENED" => "Y",
"ASSIGNED_BY_ID" => 1,
"PHONE" => array(array("VALUE" => $_REQUEST['phone'], "VALUE_TYPE" => "WORK" )),
"EMAIL" => array(array("VALUE" => $_REQUEST['email'], "VALUE_TYPE" => "WORK" )),
),
'params' => array("REGISTER_SONET_EVENT" => "Y")
));
// обращаемся к Битрикс24 при помощи функции curl_exec
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_POST => 1,
CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $queryUrl,
CURLOPT_POSTFIELDS => $queryData,
));
$result = curl_exec($curl);
curl_close($curl);
$result = json_decode($result, 1);
if (array_key_exists('error', $result)) echo "Ошибка при сохранении лида: ".$result['error_description']."<br/>";
?>
Answer the question
In order to leave comments, you need to log in
Throw out these forms and put CRM forms from B24. Everything is easily customizable, you can add your own CSS.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question