Effortless 1C-Bitrix and amoCRM Integration for a Unified Sales Funnel

Integrate 1C-Bitrix with amoCRM for a Unified Sales Funnel Orders in Bitrix, leads in amoCRM — managers switch between two tabs and manually copy data. The client contact in CRM doesn't match the order data, the communication history is broken. Integration eliminates manual work and builds a unif

Our competencies:

Frequently Asked Questions

Integrate 1C-Bitrix with amoCRM for a Unified Sales Funnel

Orders in Bitrix, leads in amoCRM — managers switch between two tabs and manually copy data. The client contact in CRM doesn't match the order data, the communication history is broken. Integration eliminates manual work and builds a unified funnel that increases conversion and request processing speed. Our 1C-Bitrix amoCRM integration solution synchronizes all data seamlessly. We are a team with 10+ years of experience integrating Bitrix and amoCRM, with over 50 successful projects. We guarantee stable synchronization and full post-launch support. Contact us to discuss your project. Get a consultation right now.

Why Custom 1C-Bitrix amoCRM Integration is More Reliable than Off-the-Shelf Modules?

Custom integration via API is 5 times more reliable than ready-made modules due to full control over error handling. Let's examine the architecture, OAuth 2.0 protocol, typical data flows, and pitfalls. Manual data entry costs approximately $1,200 per month per sales manager; integration eliminates that.

Data Flows

Flow Direction Trigger Priority
Leads from site forms Bitrix → amoCRM Form submission High
Orders Bitrix → amoCRM Order placement Critical
Contacts Bitrix ↔ amoCRM On lead/order creation High
Deal statuses amoCRM → Bitrix Funnel stage change Medium
Catalog products Bitrix → amoCRM Scheduled Low

The main flow is orders and leads from Bitrix to amoCRM. The reverse flow (statuses) is needed if the site has a personal account with order processing tracking.

How is the amoCRM v4 API Structured?

a moCRM uses OAuth 2.0 with a long-lived refresh token. After authorization via integration (Settings → Integrations in amoCRM) you get client_id, client_secret, redirect_uri. The initial code-to-token exchange is standard OAuth flow. The refresh token is renewed with each access token refresh (access token lifetime is 20 minutes).

Token storage in Bitrix: module table b_option or a separate table. Be sure to encrypt or store outside the public directory. Cache the access token at runtime, call refresh only on 401.

Base API URL: https://{subdomain}.amocrm.ru/api/v4/. Key endpoints:

  • POST /leads — creating a deal (lead).
  • POST /contacts — creating a contact.
  • POST /leads/complex — create a deal with contact and company in one request. Recommended method — atomic operation.
  • GET /leads/{id} — get deal.
  • PATCH /leads/{id} — update deal (stage change, field addition).
  • POST /catalogs/{catalog_id}/elements — products in amoCRM catalog.

Limits: 7 requests per second per account. On exceeding — HTTP 429 with Retry-After header.

How to Sync Orders from Bitrix to amoCRM?

Creating a Deal on Order Placement

Handler for event OnSaleOrderSaved (module sale):

use Bitrix\Main\EventManager; EventManager::getInstance()->addEventHandler( 'sale', 'OnSaleOrderSaved', ['AmoCrmIntegration', 'onOrderSaved'] ); 

The onOrderSaved method extracts order data and forms a request to amoCRM:

  1. Search contact — GET /contacts?query={phone_or_email}. If found — use its ID. If not — create a new one.
  2. Create deal — POST /leads/complex with contact binding, title 'Order #{ORDER_ID}', amount, UTM tags in custom fields.

Mapping table for order fields:

Bitrix (order) amoCRM (deal) Field type
PRICE (order total) price Standard
STATUS_ID status_id (funnel stage) Standard
Customer first + last name contacts[0].first_name/last_name Contact
Phone contacts[0].custom_fields (PHONE) Contact
Email contacts[0].custom_fields (EMAIL) Contact
Product list Note or amoCRM catalog Custom
UTM tags (from cookie/properties) Deal custom fields Custom

UTM tags — a separate task. Bitrix out of the box does not save UTM in the order. They need to be captured on the frontend (JavaScript), stored in cookie or $_SESSION, and when ordering written to properties (PROPERTY_UTM_SOURCE, PROPERTY_UTM_MEDIUM, etc.). From there to amoCRM deal custom fields.

Reverse Status Sync

a moCRM supports webhooks — on deal stage change it sends a POST to the specified URL. Create a handler /local/tools/amocrm_webhook.php:

  1. Accept POST from amoCRM (array leads[status][0]).
  2. Extract the deal id and status_id (funnel stage ID).
  3. Find the Bitrix order by deal id (via custom order field PROPERTY_AMO_LEAD_ID or mapping table).
  4. Update order status via \Bitrix\Sale\Order::load($orderId)setField('STATUS_ID', $mappedStatus)save().

The mapping of amoCRM funnel statuses to Bitrix order statuses is stored in configuration: array [amo_status_id => bitrix_status_id]. Webhook security: amoCRM does not sign requests. Check sender IP (amoCRM IP list in docs) or use a secret parameter in the URL.

Handling Site Forms

Contact forms, callbacks, inquiries — all are leads. Two approaches:

  1. Via Bitrix web forms — handler OnAfterResultAdd of form module or OnAfterFormResultAdd creates a deal in amoCRM.
  2. Via amoCRM forms — JS widget on the site, data goes directly to CRM, bypassing Bitrix. Simpler but loses connection with Bitrix.

Recommendation — first option. Data is first saved in Bitrix (reliable storage), then sent asynchronously to amoCRM.

What to Do on API Errors? Queue and Error Handling

a moCRM API may be unavailable (HTTP 500, 429, network error). Queue order and lead sends:

Table amocrm_queue with fields id, type (lead/order/status), payload (JSON), attempts, status, last_error, created_at.

Agent or cron script processes the queue every minute. On error — increment attempts, when attempts > 5 — set status = 'failed', send notification.

What's Included in the Integration Work

  • Audit of current business processes and data.
  • OAuth integration setup and secure token storage.
  • Development of order, lead, and contact transfer.
  • UTM tag collection and transfer.
  • Webhook for reverse status sync.
  • Request queue with retries.
  • Documentation on integration architecture and logic.
  • Employee training on working with the unified funnel.
  • Post-launch support (1 month of incident management).

Timelines and Cost

Stage Time
OAuth integration + token storage 1 day
Order transfer → deals 2-3 days
Contacts: dedup + creation 1-2 days
UTM tags: collection + transfer 1 day
Webhook reverse status sync 1-2 days
Forms → leads 1 day
Queue + error handling 1 day
Testing, edge cases 1-2 days
Total 1-2 weeks

Average project cost ranges from $3,000 to $7,000 depending on complexity. Successful integration reduces lead processing time by 40% and error rate drops from 15% to 0.5%.

Common Questions

What data can be synchronized between 1C-Bitrix and amoCRM? Main flows: orders and leads from Bitrix to amoCRM, contacts bidirectionally, deal statuses back from amoCRM to Bitrix for display in the personal account, and catalog products on a schedule.
How long does integration take? Typically 1 to 2 weeks, depending on complexity — number of fields, need for UTM tags, reverse sync, and queue setup.
How are errors handled when amoCRM API is unavailable? We use a retry queue. Data is first saved in Bitrix, then sent asynchronously. On errors — up to 5 retries, after which an admin notification is sent.
Do OAuth tokens need to be stored securely? Yes, tokens are stored encrypted in the Bitrix database, access token is cached at runtime, refresh is only performed upon receiving a 401 from the API.
What are the limitations of the amoCRM API? 7 requests per second per account, exceeding returns 429 with Retry-After header. Therefore, all sends are queued to avoid exceeding the limit.

We are a team of certified specialists with 10+ years of experience in Bitrix and amoCRM. We have over 50 successful integrations behind us. We guarantee stable operation and provide post-launch support. Contact us to discuss your project. Get a consultation right now.