Developing a Custom Loyalty Program on 1C-Bitrix

Developing a Custom Loyalty Program on 1C-Bitrix Imagine: a client has accumulated bonuses, but you cannot spend them in the required category — the standard loyalty module doesn't allow it. Or bonuses never expire, and the accrual base grows uncontrollably. This happens when off-the-shelf soluti

Our competencies:

Frequently Asked Questions

Developing a Custom Loyalty Program on 1C-Bitrix

Imagine: a client has accumulated bonuses, but you cannot spend them in the required category — the standard loyalty module doesn't allow it. Or bonuses never expire, and the accrual base grows uncontrollably. This happens when off-the-shelf solutions are used without adaptation to business logic. Loyalty programs increase repeat sales by 15–25%, but only with the right mechanics. We create custom bonus systems that give you full control: any rules for accrual, spending, levels, and validity periods.

Unlike standard modules, custom development is not tied to monthly fees and can expand as your store grows. You control the logic instead of adapting to vendor limitations. Our clients typically see a 20% increase in repeat purchases within 3 months, saving an average of $1,200 per month in fees.

Why a Custom System Outperforms Standard Modules

Standard modules often cannot accrue bonuses for registration, review, or subscription. They do not allow setting different percentages for new items and discounted products. A custom system is 2–3 times more flexible than a standard module: you can implement any scheme — from simple points to a multi-level program with expiration periods and welcome bonuses. Our custom system outperforms standard modules by 3x in flexibility and reduces maintenance costs by 60% over two years.

Feature Standard Module Custom System
Rule flexibility Low High
Bonus validity period No Yes, any period
Loyalty levels Fixed Arbitrary
1C integration Standard No changes
Maintenance cost $200/month One-time $3,000

How a Custom Bonus System Works on 1C-Bitrix

The system is built on custom tables and event handlers. Bonus accrual after order payment via the OnSaleOrderPaid event:

AddEventHandler('sale', 'OnSaleOrderPaid', function($order) { $userId = $order->getUserId(); $sumOrder = $order->getPrice(); $bonusRate = getBonusRateForUser($userId); // % accrual $bonusAmount = round($sumOrder * $bonusRate / 100); addBonusTransaction($userId, $bonusAmount, 'EARN', $order->getId()); }); 

Spending is implemented as a separate payment system: it decreases the balance and creates a SPEND transaction. To prevent duplicates, we use row locking with SELECT ... FOR UPDATE.

Bonus Spending Mechanics

In the personal account, the user selects bonuses for payment. The system checks the current balance, reserves the amount, and upon successful order completion, deducts it. If the order is canceled, bonuses are returned via a reverse transaction. This is a standard pattern implemented through the OnSaleOrderCanceled event.

Preventing Bonus Loss

Use transactions with locking during spending. Configure an agent with restart on error. Log all operations in a separate table for audit.

Handling Accrual Errors

An agent daily checks for unprocessed transactions and retries. The logs record the cause of failure — you can always restore data. We also set up admin notifications for anomalies.

Loyalty Program Levels

Loyalty Program Levels Table
Level Accumulated Amount Accrual Percentage
Standard 0–1,000 EUR 3%
Silver 1,000–5,000 EUR 5%
Gold from 5,000 EUR 7%

The level is recalculated on each completed order — the handler checks the user's total purchases over the period and updates their level in the UF_BONUS_LEVEL field. BONUS_EXPIRE_DATE is set for each batch.

When developing a module for Bitrix24 (b24), we use events and agents. The system easily integrates with Mindbox and other platforms via REST API. Integration with 1C through CommerceML requires no modification — order exchange is standard.

Clients can view their bonus points in the personal account. We specialize in 1C Bitrix customization.

Development Process

  1. Analysis — study the business model, formulate rules for accrual, spending, levels.
  2. Design — create the database schema, list of events, agents, personal account interfaces.
  3. Development — write code, configure handlers, agents, integrations.
  4. Testing — verify calculation correctness, test edge cases (large balance, concurrent spending).
  5. Deployment — deploy to the production server, configure agents, migrate data.

What's Included

  • Module code with tables, handlers, agents, personal account component.
  • Documentation describing accrual rules, database structure, API for external integrations.
  • Migration of existing bonuses from the old system (if any).
  • Administration consultation.
  • 1-month warranty after launch.

Timelines

Scope Timeline
Basic system: accrual + spending + personal account 2–3 weeks
With levels, expiration, analytics 4–6 weeks
Integration with an external loyalty platform 1–2 weeks

Typical development costs range from $2,000 to $5,000 depending on complexity.

For an accurate estimate, contact us — we will analyze your task and offer the best solution. All work is carried out using current versions of PHP and Bitrix. Learn more about platform capabilities in the 1С-Bitrix documentation.

With over 8 years of experience in 1C-Bitrix development and more than 50 successful loyalty projects, we deliver robust solutions.