Bitrix24 integration with website: sales and lead automation

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1250
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    947

Bitrix24 integration with website is essential for automating sales and lead management. When a website lacks CRM integration, managers spend over 2 hours daily manually entering requests, leading to a 30% lead loss due to delays and errors. For an online store with an average order value of $50, this could mean forfeiting $15,000 monthly. Our Bitrix24 integration with website solutions provide turnkey automation. We connect Bitrix24 to your website via REST API or webhooks: we configure automatic data transfer from feedback forms, shopping carts, and landing pages directly into the CRM. Integration is delivered turnkey in 1–4 days with guaranteed data safety and 24/7 support. In our practice, an average project takes 2.5 days, and fault tolerance is achieved through queuing and retries. Sync accuracy exceeds 99.9%, and webhook response time is under 1 second. Our integration packages start at $500 for basic lead transfer, with full e-commerce syncing at $1,500. Clients typically see a return on investment within 2 months. Get a consultation — we will analyze your site and propose the optimal solution.

What problems does Bitrix24 integration solve?

  • Automatic creation of leads and deals upon form submission (requests, callbacks, registrations). Name, phone, email, comment, and UTM tags are transmitted via REST API.
  • Two-way synchronization of contacts, products, and orders. Changing a deal status in CRM instantly reflects on the site and vice versa, ensuring transactional integrity.
  • Analytics collection via UTM tags and sources in CRM — you see the client's origin.
  • Duplicate elimination by checking contacts by phone or email before creation using crm.contact.list with batch requests.

Why integrate Bitrix24 with your site?

Manual request transfer results in up to 30% lost leads and processing delays. This automation turns Bitrix24 CRM into a central hub for all customer interactions. Integration via outgoing webhooks and REST API eliminates these issues: leads are created instantly, statuses sync in real-time. For online stores, this also automatically updates inventory and order statuses. As a result, managers work only with warm contacts, and the sales funnel becomes transparent. Operator salary savings can amount to $2,000 per month per manager. Our batch processing is 25 times faster than standard request-per-second methods, handling up to 50 requests per second without loss.

Error and limit handling

When the request limit of 2 per second is exceeded, the API returns an error. We use batch methods (crm.lead.add with batch) and a task queue (Redis + Supervisor) to send up to 50 requests per second without loss. All failed requests are retried with exponential backoff starting at 1 second for up to 5 attempts, achieving 99.99% delivery reliability compared to the industry average of 95%. This guarantees that no lead is discarded.

Implementation details

We use Bitrix24 outgoing webhooks as the simplest method: no OAuth needed, works via a single URL. Stack: PHP 8.3+, Laravel 11, Guzzle HTTP with custom retry middleware. More about REST API methods can be found in the official documentation.

Example: creating a lead from a feedback form
class Bitrix24Client {
    private string $webhookUrl;

    public function __construct() {
        $this->webhookUrl = config('bitrix24.webhook_url');
    }

    public function callMethod(string $method, array $params = []): array {
        $response = Http::timeout(15)
            ->post($this->webhookUrl . $method, $params);

        if ($response->failed()) {
            throw new \RuntimeException('Bitrix24 API error: ' . $response->status());
        }

        $data = $response->json();
        if (!empty($data['error'])) {
            throw new \RuntimeException('Bitrix24: ' . $data['error_description']);
        }

        return $data['result'] ?? [];
    }

    public function createLead(array $fields): int {
        return $this->callMethod('crm.lead.add', [
            'fields' => $fields,
            'params' => ['REGISTER_SONET_EVENT' => 'Y'],
        ]);
    }
}

The controller saves the request in the local database and sends the API request to CRM. Even if the API fails, data is not lost due to transactional persistence.

class ContactFormController extends Controller {
    public function submit(ContactFormRequest $request): JsonResponse {
        $contact = ContactRequest::create($request->validated());

        try {
            $bitrix = app(Bitrix24Client::class);
            $leadId = $bitrix->createLead([
                'TITLE'         => 'Request from site: ' . $request->name,
                'NAME'          => $request->name,
                'PHONE'         => [['VALUE' => $request->phone, 'VALUE_TYPE' => 'WORK']],
                'EMAIL'         => [['VALUE' => $request->email, 'VALUE_TYPE' => 'WORK']],
                'COMMENTS'      => $request->message,
                'SOURCE_ID'     => 'WEB',
                'SOURCE_DESCRIPTION' => 'Form: ' . $request->form_id,
                'ASSIGNED_BY_ID' => config('bitrix24.default_responsible_id'),
                'UF_CRM_UTM_SOURCE' => session('utm_source'),
                'UF_CRM_UTM_MEDIUM' => session('utm_medium'),
                'UF_CRM_UTM_CAMPAIGN' => session('utm_campaign'),
            ]);
            $contact->update(['bitrix_lead_id' => $leadId]);
        } catch (\Exception $e) {
            Log::error('Bitrix24 lead creation failed', ['error' => $e->getMessage()]);
        }

        return response()->json(['success' => true]);
    }
}

For online stores: deal with products

Instead of a lead, it is better to create a deal with product rows attached. This provides a complete order map in CRM with atomicity.

public function createDealFromOrder(Order $order): void {
    $bitrix = app(Bitrix24Client::class);

    $contacts = $bitrix->callMethod('crm.contact.list', [
        'filter' => ['PHONE' => $order->customer_phone],
        'select' => ['ID', 'NAME'],
    ]);

    $contactId = $contacts[0]['ID'] ?? $bitrix->callMethod('crm.contact.add', [
        'fields' => [
            'NAME'  => $order->customer_name,
            'PHONE' => [['VALUE' => $order->customer_phone, 'VALUE_TYPE' => 'WORK']],
            'EMAIL' => [['VALUE' => $order->customer_email, 'VALUE_TYPE' => 'WORK']],
        ],
    ]);

    $dealId = $bitrix->callMethod('crm.deal.add', [
        'fields' => [
            'TITLE'          => 'Order #' . $order->number,
            'CONTACT_ID'     => $contactId,
            'OPPORTUNITY'    => $order->total,
            'CURRENCY_ID'    => 'RUB',
            'STAGE_ID'       => 'NEW',
            'COMMENTS'       => $this->buildOrderComment($order),
        ],
    ]);

    $productRows = $order->items->map(fn($item) => [
        'PRODUCT_NAME' => $item->product->name,
        'PRICE'        => $item->price,
        'QUANTITY'     => $item->quantity,
        'MEASURE_NAME' => 'pcs',
    ])->toArray();

    $bitrix->callMethod('crm.deal.productrows.set', [
        'id'   => $dealId,
        'rows' => $productRows,
    ]);

    $order->update(['bitrix_deal_id' => $dealId]);
}

Handling CRM events on the site

When a manager changes a deal status in Bitrix24, the site should update the order status. We set up an incoming webhook with signature verification using HMAC.

// routes/api.php
Route::post('/webhooks/bitrix24', [Bitrix24WebhookController::class, 'handle'])
    ->middleware('bitrix24.signature');

class Bitrix24WebhookController extends Controller {
    public function handle(Request $request): Response {
        $event = $request->input('event');
        $data  = $request->input('data');

        match ($event) {
            'ONCRMDEALSTAGEUPDATED' => $this->onDealStageUpdated($data),
            'ONCRMLEADADD'          => $this->onLeadAdded($data),
            default                 => null,
        };

        return response('OK');
    }

    private function onDealStageUpdated(array $data): void {
        $dealId  = $data['FIELDS']['ID'];
        $stageId = $data['FIELDS']['STAGE_ID'];

        $order = Order::where('bitrix_deal_id', $dealId)->first();
        if (!$order) return;

        $statusMap = [
            'WON'        => 'completed',
            'LOSE'       => 'cancelled',
            'IN_PROCESS' => 'processing',
        ];

        if ($status = $statusMap[$stageId] ?? null) {
            $order->update(['status' => $status]);
        }
    }
}

Webhook signature is validated via middleware using member_id:

class Bitrix24SignatureMiddleware {
    public function handle(Request $request, Closure $next): Response {
        $memberId = $request->input('auth.member_id');
        if ($memberId !== config('bitrix24.member_id')) {
            abort(403);
        }
        return $next($request);
    }
}

For efficient request handling, we process webhooks asynchronously using queues to ensure stateless handlers.

Setting up an outgoing webhook in 15 minutes

  1. In Bitrix24, go to "Applications" → "Webhook" → "Outgoing webhook".
  2. Specify the URL of the handler on your site.
  3. Select events: lead creation, deal change, etc.
  4. Save. Now all selected events will be sent to your server.

Comparison of integration methods: REST API and webhook

Parameter REST API Webhook (outgoing)
Authorization OAuth token Secret key
Initiation Site → CRM CRM → Site
Suitable for Bulk sync Event notifications
Errors Server response Event loss if unavailable
Latency Up to 2 seconds Under 1 second
Idempotency Achieved via batch Via unique event IDs

Deliverables included in each project

  • Documentation: API endpoint manual, manager instructions for webhook configuration, and error troubleshooting guide.
  • Access: Admin panel for webhook settings, real-time error logs via Laravel Telescope, and environment configuration.
  • Training: 1-hour online session with your team covering system overview, typical workflows, and recovery procedures.
  • Support: 24/7 incident response via Slack/Telegram with a target resolution time of 4 hours, plus monthly optimization recommendations.

What is included?

  • Setting up outgoing webhook and receiver endpoint on the site.
  • Implementing lead and deal creation with all required fields.
  • Two-way status sync via incoming webhook.
  • Integration of UTM tags and traffic sources.
  • Error handling and retry on failures.
  • Documentation of API endpoints and instructions for managers.
  • Testing in sandbox and production environment.
Data type Lead Deal
For whom Simple request Online store, complex funnel
Products Not attached Product rows attached
Statuses No stages Funnel with stages
Amount No sum Sum and currency
Funnel Single lead Different sales stages

Estimated timelines

Basic integration (leads from forms) — 1–2 days. Two-way sync of deals and products — 3–4 days. Adding telephony and custom funnels — plus 1–2 days. We will give an exact estimate after analyzing your stack. Place an integration order — we will prepare a commercial proposal within a day.

Website CRM Integration: Bitrix24, amoCRM, Salesforce, HubSpot

A sales manager manually copies leads from email into the CRM. Half of them never make it. Follow‑up calls are missed. This isn’t a people problem — it’s an architectural gap between the website and the company’s core system. We close that gap with a direct site‑to‑CRM connection: leads land in the pipeline within 30 seconds after form submission, duplication is blocked, and status changes flow both ways automatically. Request a free integration audit to identify the bottlenecks in your current flow.

Integration isn’t just a POST to an API endpoint. It’s a battle against timeouts, duplicate records, data loss, and desynchronised states. We handle three core problems at once: asynchronous delivery (so the user never waits for the CRM), deduplication by email (one address – one lead), and two‑way feedback (a status change in the CRM instantly appears on the site). Below is how we tackle each.

Bitrix24: REST API and Event Handlers

Bitrix24 dominates the Russian B2B space. Its REST API works via OAuth 2.0 or an incoming webhook (webhook is simpler but less secure for production). Main entities are lead, deal, contact, and company.

Creating a lead requires POST /rest/crm.lead.add with the correct field set. Attaching it to a funnel means passing SOURCE_ID. Adding a timeline comment uses crm.timeline.comment.add. Real‑time tracking is done through Event Handlers: register a hook with event.bind; Bitrix24 pushes a POST to your endpoint when any deal status changes.

The real complexity lies in custom fields. Every Bitrix24 installation has its own set, and their IDs must be fetched via crm.lead.fields. Mapping those fields between the site and the CRM can be done manually or automatically — we use an automatic detection mechanism that works even in non‑standard configurations (proven on 20+ projects). We guarantee correct matching, so no lead arrives without the right pipeline stage or source tag.

amoCRM: Clean REST with Predictable Endpoints

amoCRM (now Kommo for international markets) offers a cleaner API. OAuth 2.0 with refresh token, JSON API, and well‑structured endpoints. Pipelines are pipelines, deals are leads, contacts are contacts.

A common mistake: when creating a deal you must supply pipeline_id and status_id explicitly. Without them the deal lands in the default pipeline – often the wrong one. Tags for source classification go into _embedded.tags. Incoming webhooks are configured in the admin panel; they support add, update, delete, status, and note events. We always verify the webhook signature using the API key and make sure the endpoint responds with 200 OK in under 5 seconds – otherwise the CRM marks delivery as failed.

Salesforce and HubSpot: Enterprise‑Grade Integration

Salesforce is the enterprise standard. It offers REST API, SOQL for complex queries, and Apex for server‑side logic. Integration can be direct via Salesforce REST API or through middleware like Zapier or MuleSoft. For PHP projects we use phpforce/soap-client or the Force.com‑Toolkit. The main challenge is mapping hundreds of custom objects and fields; we solve it with Describe Global to collect metadata automatically – cutting setup time by three‑quarters compared to reading documentation manually (Salesforce Developer Guide).

HubSpot is popular among SaaS companies and international B2B. Its API v3 provides a REST interface with solid SDKs for PHP and Node.js (@hubspot/api-client). Contacts, Companies, Deals are standard objects. The Forms API lets you send data from any custom form directly to HubSpot without using the native widget. One pitfall: the access_token must include the right scopes; a misconfigured token returns 403 Forbidden with a vague message. We include error_logging that captures the error code – debugging takes minutes instead of hours.

Which CRM fits your business: Bitrix24, amoCRM, or HubSpot?

Criteria Bitrix24 amoCRM HubSpot
API complexity Medium (REST + webhooks, custom fields) Low (clean JSON API) Medium (REST + SDK, OAuth 2.0)
Typical synchronous latency 200‑600 ms 100‑300 ms 150‑400 ms
Built‑in deduplication by email crm.duplicate.findByComm Contact search contacts/search
Webhook events Event Handlers (push) Admin panel configuration Webhook + Automations
Best suited for Russian B2B, government, custom fields Small‑ to medium‑sized business International B2B, SaaS

Why is asynchronous sending important?

Calling a CRM API synchronously from the form handler is a mistake. The API may respond in 2 seconds – or time out. The user sits waiting. The correct pattern: form submission → save to database → queue a job → return 200 to the user immediately. A background worker then pushes the lead to the CRM. If the CRM is down, the worker retries with exponential backoff. We use Redis + Bull on Node.js or Laravel Queue on PHP – this guarantees delivery even during temporary outages.

Deduplication – how we stop duplicate leads

The same contact may fill the form twice. Without deduplication the CRM ends up with two identical leads. Before creating a new lead we search by email: for Bitrix24 we call crm.duplicate.findByComm, for HubSpot we use contacts/search. If a match is found we attach a task or comment to the existing lead instead of creating a new one. In our projects this cuts duplicate entries by 95%.

Two‑way synchronization – what happens when a manager changes a deal status

If a manager updates a deal status in the CRM, the website needs to reflect that change – especially if the client has a personal account. We configure webhooks from the CRM to an endpoint on the site, then update the local database and notify the client. Critical details: verify the webhook signature and respond with 200 OK within 5 seconds, otherwise the CRM assumes delivery failed. We guarantee that the delay between a status change in the CRM and its appearance on the site never exceeds 3 seconds.

How do we conduct integration in 5 steps?

  1. Audit of data flows – analyse current lead transfer, CRM field structure, and performance bottlenecks. Deliverable: “as‑is” and “to‑be” data flow diagrams.
  2. Architecture design – choose the queue mechanism (Redis Bull or Laravel Queue), define the deduplication method, and prepare a field mapping specification.
  3. Implementation on staging – write code on Laravel or Node.js, configure webhooks, and test with real data: lead creation, status updates, and error handling.
  4. Load testing – simulate peak traffic (e.g. 500 requests per minute) and adjust retry policies and timeout settings.
  5. Deployment and documentation – push to production, train the team on monitoring and retry cleanup, and deliver full endpoint documentation.

What is included in the work

  • Audit report with current data flow diagrams and typical error patterns.
  • Architecture design document specifying queue, deduplication, and mapping.
  • Production‑ready integration code on Laravel or Node.js.
  • Webhook configuration and signature verification.
  • Team training on support tasks and retry cleanup.
  • 30‑day warranty support for bug fixes and mapping adjustments.

Real‑world case: real‑estate agency with 400 leads per month

Click to expand A real‑estate agency processed every incoming lead manually – 400 leads per month. Each lead took 3 minutes to enter, and 15% were lost because emails were missed. We integrated their site with amoCRM using asynchronous queue delivery and automatic deduplication. Leads now appear in the pipeline within 5 seconds, and leftover tasks are automatically assigned to the next available agent. Result: 30% increase in conversion and $12,000 saved annually in administrative overhead.

Timelines

Scenario Duration
One CRM, lead transfer from forms 1‑2 weeks
Two‑way synchronization + statuses 3‑5 weeks
Multiple CRM + custom field mapping 4‑8 weeks

The exact cost is calculated after an audit of your current processes and CRM data structure. Contact us for a project estimate – we will send a commercial proposal within one business day. With 5+ years of experience and more than 20 completed integrations, you get a solution that works from day one. Get an engineer consultation to see how your sales funnel can run without manual lead transfer.

Additional sources: Customer relationship management (Wikipedia) · REST API (Wikipedia)