Setting Up Credit Limits for B2B Clients on 1C-Bitrix
Imagine: your B2B portal on 1C-Bitrix processes hundreds of orders daily, but there is no accounts receivable control. Clients with 30+ days overdue place new shipments, increasing the cash flow gap.
Without credit limits configured, the system accepts orders from clients with growing debt. We solve this problem through automation: we create a Highload block b2b_credit_status, set up integration with 1C, and automatically block orders when the limit is exceeded. All turnkey in 2–3 weeks. We will estimate your project — contact us.
Problems We Solve
- No automatic control. Managers manually check debt before each order — this slows down processing and leads to errors. Our solution automatically checks the limit when placing an order in the
OnBeforeSaleOrderAddevent. - Outdated data. Limits are updated manually once a month. We set up synchronization with 1C every 2–4 hours via an agent and additionally an event trigger when the order status changes to "Paid".
- Insufficient transparency. The client does not see the current limit and debt. We add a widget to the customer account with a progress bar and a warning when approaching the limit.
How Does Limit Checking 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 used limit amount + the new order with the established limit.
If the blocking condition triggers, the order is not created, and the client sees the message: "Credit limit exceeded. Available: X. Debt: Y." 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 REST API 1C 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 manual.
What Data Is Stored in the Highload Block?
| Field | Description |
|---|---|
UF_COMPANY_ID |
Company ID in Bitrix |
UF_1C_COMPANY_ID |
Counterparty code in 1C |
UF_CREDIT_LIMIT |
Established limit |
UF_USED_AMOUNT |
Used amount (unpaid orders) |
UF_OVERDUE_AMOUNT |
Overdue debt |
UF_OVERDUE_DAYS |
Days overdue |
UF_BLOCK_ORDERS |
Order blocking flag |
UF_UPDATED_AT |
Last synchronization time |
Additional fields for complex scenarios
You can add fields UF\_MAX\_ORDER\_AMOUNT (maximum amount of a single order) and UF\_ALLOW\_OVERDRAFT (whether overdraft is allowed). Ask for details during a consultation.Step-by-Step Instructions for Setting Up Credit Limits
- Create a Highload block with the fields from the table above.
- Set up the synchronization agent with 1C (interval 2–4 hours).
- Register the
OnBeforeSaleOrderAddevent handler. - Develop a customer account widget with a progress bar.
- Test all scenarios (exceeding, unlimited, overdue).
What Is Included in the Setup?
- Analysis of the current debt accounting scheme — we review the integration with 1C and business processes.
- Creation of the Highload block
b2b_credit_statuswith the required fields. - Development of limit checking logic — event handler, conditions for VIP clients.
- Customer account widget — displaying the limit, progress bar, warning upon blocking.
- Synchronization with 1C — agent, webhooks, error handling.
- Documentation — description of the structure and logic for your team.
- Training — 2-hour webinar for managers and administrators.
- Post-release support — 2 weeks of monitoring correct operation.
How Long Does Implementation Take?
| Stage | Timeline |
|---|---|
| Analysis and design | 2–3 days |
| Development of the HL block and synchronization | 5–7 days |
| Limit checking (event) | 2–3 days |
| Widget and refinements | 3–5 days |
| Testing and deployment | 2–3 days |
| Total | 14–21 working days |
Why Clients Choose Us
We have been working with 1C-Bitrix for over 10 years and have completed 50+ projects on setting up credit and integration with 1C.
Our solutions use tagged caching for widgets and agents for synchronization — this provides high performance even on catalogs with millions of products. Code warranty — 1 year. 1C-Bitrix certificate (confirmed upon request).
A typical mistake when setting up on your own — 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 perform real-time checking on the website side — this is 60% faster than weekly synchronization and eliminates limit misses.
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 estimate the scope of work and the exact timeline within 1 day.

