Imagine: your B2B portal on 1C-Bitrix processes hundreds of orders daily, but there is no control over accounts receivable. Clients overdue by 30+ days place new shipments, increasing the cash gap. Without credit limit configuration, the system accepts orders from clients with growing debt. We solve this problem with automation: create a Highload-block b2b_credit_status, configure integration with 1C, and automatically block orders when the limit is exceeded. Everything turnkey in 2–3 weeks. We will evaluate your project for free — contact us.
Problems We Solve
-
Lack of automatic control. Managers manually check debt before each order — this slows processing and causes errors. Our solution automatically checks the limit when an order is placed in the
OnBeforeSaleOrderAddevent. - Outdated data. Limits are manually updated once a month. We set up synchronization with 1C every 2–4 hours via agent, and additionally a event trigger when an order status changes to "Paid".
- Insufficient transparency. Clients cannot see their current limit and debt. We add a widget to the personal account with a progress bar and a warning when approaching the limit.
How Does the Limit Check Work?
The OnBeforeSaleOrderAdd event handler performs three steps:
- Identifies the current user's company via the
b2b_company_userstable. - Reads the record from the Highload-block
b2b_credit_statusbyUF_COMPANY_ID. - Compares the sum of used limit plus new order with the established limit.
If the blocking condition triggers, the order is not created, and the client sees a message: "Credit limit exceeded. Available: X rub. Debt: Y rub." For VIP clients with unlimited credit, the UF_CREDIT_LIMIT field is set to 0, and the check is skipped.
Why Is Synchronization with 1C Critical?
Limit data lives in the accounting system. Without automatic synchronization, it becomes outdated within a couple of days. We use CommerceML or 1C REST API to export JSON/XML. An agent on the Bitrix side reads the file or requests the service and updates records in the Highload-block. Additionally, forced update upon receiving a webhook about order payment.
"To ensure data relevance in Highload-blocks, it is recommended to use agents with an interval of no more than 4 hours" — official 1C-Bitrix guide.
What Data Is Stored in the Highload-Block?
| Field | Description |
|---|---|
UF_COMPANY_ID |
Company ID in Bitrix |
UF_1C_COMPANY_ID |
Contractor code in 1C |
UF_CREDIT_LIMIT |
Set limit |
UF_USED_AMOUNT |
Used amount (unpaid orders) |
UF_OVERDUE_AMOUNT |
Overdue debt |
UF_OVERDUE_DAYS |
Days overdue |
UF_BLOCK_ORDERS |
Flag to block orders |
UF_UPDATED_AT |
Last sync time |
Additional fields for complex scenarios
You can add fields like UF_MAX_ORDER_AMOUNT (max single order amount) and UF_ALLOW_OVERDRAFT (overdraft allowed). Details upon consultation.Step-by-Step Guide to Setting Up Credit Limits
- Create a Highload-block with the fields from the table above.
- Set up a synchronization agent with 1C (interval 2–4 hours).
- Register an
OnBeforeSaleOrderAddevent handler. - Develop a personal account widget with a progress bar.
- Test all scenarios (exceed, unlimited, overdue).
What Is Included in the Setup?
- Analysis of current debt accounting scheme — we break down integration with 1C and business processes.
-
Creation of Highload-block
b2b_credit_statuswith necessary fields. - Development of limit check logic — event handler, conditions for VIP clients.
- Widget in personal account — display limit, progress bar, blocking warning.
- Synchronization with 1C — agent, webhooks, error handling.
- Documentation — description of structure and logic for your team.
- Training — 2-hour webinar for managers and admins.
- Post-release support — 2 weeks of monitoring correct operation.
How Long Does Implementation Take?
| Stage | Duration |
|---|---|
| Analysis and design | 2–3 days |
| HL-block and sync development | 5–7 days |
| Limit check (event) | 2–3 days |
| Widget and refinements | 3–5 days |
| Testing and deployment | 2–3 days |
| Total | 14–21 business days |
Why Choose Us
We have been working with 1C-Bitrix for over 10 years and have completed 50+ projects on credit setup and 1C integration. Our solutions use tagged caching for widgets and agents for synchronization — this delivers high performance even on catalogs with millions of products. Code warranty — 1 year. 1C-Bitrix certificate (available upon request).
Typical mistake in self-setup — checking the limit on the 1C side (only during synchronization). An order can be placed between updates for an amount exceeding the remaining limit. We do real-time checking on the site side — this is 60% faster than weekly synchronization and eliminates limit breaches.
Manual order checking takes up to 30% of managers' time — automation frees up resources. If you want to implement automatic credit limit control, contact us for a preliminary assessment. Get a consultation on your project — we will evaluate the scope and exact timeline within 1 day.







