Developing a partner account on 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1167
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    563
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    743
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Development of a Partner Cabinet on 1C-Bitrix

A partner cabinet is a tool for managing an affiliate program through your website. A partner registers, receives a referral link, attracts customers, and tracks rewards in their personal account. 1C-Bitrix provides a basic affiliate mechanism in the sale module, but for a full-featured partner program, it typically requires significant custom development.

Standard affiliate mechanism

The sale module includes an "Affiliates" subsystem (\Bitrix\Sale\Affiliate). Basic functionality:

  • Partner registration via the bitrix:sale.affiliate.register component
  • Referral link generation with a partner_id parameter
  • Tracking clicks and orders made through the referral link
  • Commission calculation (fixed percentage of order amount)
  • bitrix:sale.affiliate.cabinet component — view statistics and balance

Limitations of the standard solution:

  • Single level of referrals (no multi-level programs)
  • Fixed percentage without flexible conditions (no volume-based or product category-based tiers)
  • Minimal interface — statistics without visualization, no charts or analytics
  • No payment mechanism — only internal account balance
  • No marketing materials or promotional tools

For a real partner program, the standard module serves as the foundation, with business logic built on top through custom handlers and additional entities.

Partner registration

Partner registration differs from standard user registration. A partner completes an extended questionnaire:

  • Full name / Company name
  • Tax ID (for legal entities)
  • Business sector, promotion channels
  • Payment details (bank account, e-wallet)
  • Agreement to partner program terms

The application is not activated immediately — it goes to moderation. A manager reviews the data and makes a decision. Upon approval, the partner is assigned to a "Partners" user group and given an initial program level.

Technical implementation: extended registration form on bitrix:main.register with additional UF_* fields. An OnAfterUserRegister handler creates a record in the partners table (highload block) and sends a notification to the manager.

Referral system

A partner receives a unique link like https://site.ru/?partner_id=XXX or https://site.ru/?ref=PROMO_CODE. When clicked, the partner identifier is stored in a cookie with a configurable lifetime (typically 30–90 days).

Attribution models:

  • Last click — reward goes to the partner whose link was used last before the order
  • First click — reward goes to the first partner in the chain
  • Linear — reward is split among partners proportionally

The standard module supports only last click. For other models, we create a custom transitions table that captures the entire chain, and a handler on the OnSaleOrderPaid event that applies the needed distribution logic.

Promo codes — an alternative to referral links. A partner receives a named promo code that the customer enters when placing an order. The promo code is linked to the partner through a cart rule (\Bitrix\Sale\Discount) and simultaneously records the sale to the partner.

Partner levels

A multi-level program motivates partners to increase volumes. Levels are stored in a separate highload block with parameters:

Level Transition Condition Commission Bonuses
Starter Registration 5% of order amount Basic promo materials
Silver Turnover from 500,000₽ per quarter 7% Extended banners, priority support
Gold Turnover from 2,000,000₽ per quarter 10% Personal manager, co-branding
Platinum Turnover from 5,000,000₽ per quarter 12% + volume bonus Custom terms, joint events

Level recalculation is triggered by an agent (\CAgent) on schedule — daily or on every paid order through a handler. When a level changes, the partner receives a notification and the commission percentage updates for future orders.

Additional reward models:

  • Fixed amount per order (for services)
  • Percentage of first customer order + percentage of repeat orders (LTV model)
  • Achievement bonus: attracted 50 customers — receive a one-time bonus
  • Multi-level marketing: percentage from sales of partners you attracted (implemented via recursive parent_partner_id binding)

Partner dashboard

The main cabinet screen displays key metrics and management tools.

Statistics:

  • Clicks on the referral link (by day, week, month)
  • Registrations of attracted customers
  • Orders: count, amounts, average check
  • Conversion: click → registration → order
  • Accrued rewards and current balance
  • Dynamics over periods — line charts, comparison with previous periods

Data is aggregated in a statistics highload block. Details for each click, registration, and order are stored in separate tables. Charts are built with Chart.js or ApexCharts, with data loaded via AJAX requests to a custom controller (\Bitrix\Main\Engine\Controller).

Tools:

  • Referral link generator with UTM parameters
  • List of promo codes with the ability to create new ones (within level limits)
  • Payment history with filtering by period and status

Reward calculation

Calculation is performed when an order status changes to "Paid" via the OnSalePayOrder handler. Algorithm:

  1. The partner is determined by the partner_id cookie or the order's promo code
  2. The partner's current level and commission percentage are loaded
  3. The calculation base is computed — order amount minus shipping, coupons, and VAT (configurable)
  4. Reward is credited to the partner's internal balance
  5. If multi-level marketing is enabled — rewards are recursively credited to upper-level partners with decreasing percentages
  6. A record is created in the accruals journal (highload block: partner_id, order_id, amount, type, date)

Cancellation and returns: when an order is cancelled or funds are returned, the reward is reversed through a reverse entry in the journal. If the reward has already been paid — a partner debt is created, which is accounted for in the next payout.

Payouts

The payment system works on a claim basis. A partner submits a withdrawal request upon reaching the minimum amount (threshold is configurable).

Request processing steps:

  1. Partner clicks "Withdraw funds," specifies the amount and payment details
  2. The request goes to a moderation list (manager sees it in the admin panel)
  3. Manager verifies the data, confirms the payout
  4. After actual payment, the request status changes to "Paid," and the partner's balance decreases

For legal entities — payment is made by an act of work performed. The system generates an act from a template, the partner signs it, and accounting processes the payment.

Marketing materials

A cabinet section with promotional materials for partners:

  • Banners in various formats with embedded referral link (HTML code for insertion)
  • Logos and brand guidelines for co-branding
  • Email template samples
  • Product/service descriptions for posting on partner sites
  • PDF presentations

Materials are stored in an infoblock tied to the partner level. A starter-level partner sees a basic set, a gold-level partner — an extended set with custom options.