A Guide to Custom E-commerce Loyalty Systems: Points, Tiers, Campaigns

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1All 2062 services
A Guide to Custom E-commerce Loyalty Systems: Points, Tiers, Campaigns
Medium
from 1 week to 3 months
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1358
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1250
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    956
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1188
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    929
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    947

We develop custom loyalty systems for online stores, marketplaces, and services. Recently, we implemented a solution that increased average order value by 25% and boosted user retention by 40% in the first months. A typical scenario: a client uses a ready-made plugin but cannot configure earning multipliers for premium categories or implement point expiration using FIFO. Moreover, standard plugins often generate N+1 queries when checking balance, causing performance drops under high load. We use Laravel 11, PostgreSQL, and Redis to ensure responsiveness even at 1000 requests per second. For example, one of our clients—an electronics e-commerce store—faced order checkout slowdown due to N+1 queries to the loyalty system. After implementing a custom solution with caching and batch inserts, order processing time dropped from 2 seconds to 200 ms. Our custom loyalty system is 2 times more effective at boosting repeat purchases than off-the-shelf plugins. Investment starts at $4,900 for a basic system, and our clients typically see a 25% increase in average order value, paying back in 4–6 months. In this article, we break down the architecture, common issues, and our implementation approach.

What problems do we solve

Most ready-made solutions do not account for business specifics. Typical pain points:

  • N+1 queries when accruing points—each operation hits the DB separately. We solve this with batch inserts and balance caching in Redis.
  • Concurrent redemption—race conditions when two orders spend the same points. We use SELECT ... FOR UPDATE and transactions.
  • Complex campaign rules—category multipliers, minimum cart gifts, time-limited promotions. We implement via configurable tables with JSONB conditions.
  • Point expiration—FIFO calculation and partial spending handling.

How it works: core architecture

The central element is the transaction log (Wikipedia). The balance is always derived from the sequence of operations, ensuring auditability.

-- Bonus account per user
CREATE TABLE loyalty_accounts (
    id              BIGSERIAL PRIMARY KEY,
    user_id         BIGINT UNIQUE REFERENCES users(id),
    balance         DECIMAL(12,2) DEFAULT 0,
    lifetime_earned DECIMAL(12,2) DEFAULT 0,
    tier_id         BIGINT REFERENCES loyalty_tiers(id),
    expires_at      DATE,
    updated_at      TIMESTAMPTZ DEFAULT NOW()
);

-- All point movements (append-only log)
CREATE TABLE loyalty_transactions (
    id              BIGSERIAL PRIMARY KEY,
    account_id      BIGINT REFERENCES loyalty_accounts(id),
    type            VARCHAR(32) NOT NULL, -- 'earn', 'redeem', 'expire', 'adjust', 'refund'
    amount          DECIMAL(12,2) NOT NULL,
    balance_after   DECIMAL(12,2) NOT NULL,
    reason          VARCHAR(255),
    source_type     VARCHAR(64),  -- 'order', 'manual', 'birthday', 'referral'
    source_id       BIGINT,
    created_at      TIMESTAMPTZ DEFAULT NOW()
);

-- Program tiers
CREATE TABLE loyalty_tiers (
    id              BIGSERIAL PRIMARY KEY,
    name            VARCHAR(64) NOT NULL,    -- Bronze, Silver, Gold, Platinum
    min_lifetime    DECIMAL(12,2) NOT NULL,
    earn_multiplier DECIMAL(4,2) DEFAULT 1.0,
    redeem_rate     DECIMAL(4,2) DEFAULT 1.0,
    perks           JSONB
);

The transaction log is a fundamental architectural choice. The balance is either calculated from history or stored denormalized and recalculated on discrepancy. This allows auditing any movement.

How to avoid point loss during concurrent redemptions?

The main issue—two simultaneous orders can spend the same points. The solution—account row locking and atomic transactions.

class LoyaltyService {
    public function earnPoints(User $user, float $amount, string $sourceType, int $sourceId): LoyaltyTransaction {
        $account = LoyaltyAccount::firstOrCreate(['user_id' => $user->id]);
        $tier    = $account->tier ?? LoyaltyTier::where('min_lifetime', 0)->orderBy('min_lifetime')->first();

        $points = round($amount * $tier->earn_multiplier * config('loyalty.earn_rate'));

        return DB::transaction(function() use ($account, $points, $sourceType, $sourceId) {
            $newBalance = $account->balance + $points;
            $account->update([
                'balance'         => $newBalance,
                'lifetime_earned' => $account->lifetime_earned + $points,
            ]);

            $newTier = LoyaltyTier::where('min_lifetime', '<=', $account->lifetime_earned)
                ->orderByDesc('min_lifetime')
                ->first();
            if ($newTier && $newTier->id !== $account->tier_id) {
                $account->update(['tier_id' => $newTier->id]);
                event(new TierUpgraded($account->user, $newTier));
            }

            return LoyaltyTransaction::create([
                'account_id'   => $account->id,
                'type'         => 'earn',
                'amount'       => $points,
                'balance_after'=> $newBalance,
                'source_type'  => $sourceType,
                'source_id'    => $sourceId,
                'reason'       => 'Accrual for purchase',
            ]);
        });
    }
}

Why choose a custom loyalty system over ready-made solutions?

Ready-made plugins often lack flexibility in accrual rules, CRM integration, and analytics. Compare:

Criteria Ready-made solution Custom development
Campaign configuration Limited template set Any logic with arbitrary conditions
Integration Only standard CMS Via API with any systems (1C, ERP, CRM)
Scalability Depends on platform Optimized for load (Redis, queues)
Analytics Only basic reports Custom dashboards and segmentation

A custom system pays for itself in 4–6 months through increased average check (20–30%) and 1.5x LTV growth. Our custom loyalty system is 2x better at boosting repeat purchases compared to off-the-shelf plugins. We specialize in e-commerce loyalty system development with points, tiers, and campaigns.

What loyalty tiers can be configured?

A typical tier hierarchy—from Bronze to Platinum—with different earning multipliers and privileges. For example:

Tier Minimum lifetime spend Earning multiplier Privileges
Bronze $0 1.0 Basic program
Silver $100 1.2 Priority support
Gold $500 1.5 Free shipping
Platinum $1000 2.0 Personal manager

Conditions can be customized for any business.

Implementation process

  1. Analysis: study business processes, gather requirements, prepare prototype.
  2. Design: database architecture, API, UI widgets. Align campaign logic.
  3. Development: iterative delivery every 2–3 days.
  4. Testing: unit and integration tests, load testing (up to 1000 RPS).
  5. Deployment: configure CI/CD, monitoring (Sentry, Grafana), documentation.

What's included

  • Architecture and documentation: DB schema description, API (OpenAPI), admin instructions.
  • Source code: backend + frontend, test coverage at least 80%.
  • Access: dedicated repository, development and staging environments.
  • Support: 1 month post-production support, then by SLA.

Estimated timelines and investment

Basic version with earning, spending, and transaction history—1.5–2 weeks, starting at $4,900. Extended version with tiers, campaigns, and point expiration—3–4 weeks, from $9,500. Mobile loyalty card with QR code and POS integration—adds 2–3 weeks, from $3,000. With over 10 years of e-commerce experience and 50+ successful loyalty system projects (including certified Laravel and React developers), we deliver guaranteed performance: tested up to 1000 RPS with a 12-month warranty on code and free bug fixes. Our custom loyalty system development services include points, tiers, and campaigns. Contact us to evaluate your project—we will assess within one day. Get a consultation on architecture and timelines. Our team has 10+ years of experience in e-commerce and has delivered 50+ loyalty systems.

Website CRM Integration: Bitrix24, amoCRM, Salesforce, HubSpot

A sales manager manually copies leads from email into the CRM. Half of them never make it. Follow‑up calls are missed. This isn’t a people problem — it’s an architectural gap between the website and the company’s core system. We close that gap with a direct site‑to‑CRM connection: leads land in the pipeline within 30 seconds after form submission, duplication is blocked, and status changes flow both ways automatically. Request a free integration audit to identify the bottlenecks in your current flow.

Integration isn’t just a POST to an API endpoint. It’s a battle against timeouts, duplicate records, data loss, and desynchronised states. We handle three core problems at once: asynchronous delivery (so the user never waits for the CRM), deduplication by email (one address – one lead), and two‑way feedback (a status change in the CRM instantly appears on the site). Below is how we tackle each.

Bitrix24: REST API and Event Handlers

Bitrix24 dominates the Russian B2B space. Its REST API works via OAuth 2.0 or an incoming webhook (webhook is simpler but less secure for production). Main entities are lead, deal, contact, and company.

Creating a lead requires POST /rest/crm.lead.add with the correct field set. Attaching it to a funnel means passing SOURCE_ID. Adding a timeline comment uses crm.timeline.comment.add. Real‑time tracking is done through Event Handlers: register a hook with event.bind; Bitrix24 pushes a POST to your endpoint when any deal status changes.

The real complexity lies in custom fields. Every Bitrix24 installation has its own set, and their IDs must be fetched via crm.lead.fields. Mapping those fields between the site and the CRM can be done manually or automatically — we use an automatic detection mechanism that works even in non‑standard configurations (proven on 20+ projects). We guarantee correct matching, so no lead arrives without the right pipeline stage or source tag.

amoCRM: Clean REST with Predictable Endpoints

amoCRM (now Kommo for international markets) offers a cleaner API. OAuth 2.0 with refresh token, JSON API, and well‑structured endpoints. Pipelines are pipelines, deals are leads, contacts are contacts.

A common mistake: when creating a deal you must supply pipeline_id and status_id explicitly. Without them the deal lands in the default pipeline – often the wrong one. Tags for source classification go into _embedded.tags. Incoming webhooks are configured in the admin panel; they support add, update, delete, status, and note events. We always verify the webhook signature using the API key and make sure the endpoint responds with 200 OK in under 5 seconds – otherwise the CRM marks delivery as failed.

Salesforce and HubSpot: Enterprise‑Grade Integration

Salesforce is the enterprise standard. It offers REST API, SOQL for complex queries, and Apex for server‑side logic. Integration can be direct via Salesforce REST API or through middleware like Zapier or MuleSoft. For PHP projects we use phpforce/soap-client or the Force.com‑Toolkit. The main challenge is mapping hundreds of custom objects and fields; we solve it with Describe Global to collect metadata automatically – cutting setup time by three‑quarters compared to reading documentation manually (Salesforce Developer Guide).

HubSpot is popular among SaaS companies and international B2B. Its API v3 provides a REST interface with solid SDKs for PHP and Node.js (@hubspot/api-client). Contacts, Companies, Deals are standard objects. The Forms API lets you send data from any custom form directly to HubSpot without using the native widget. One pitfall: the access_token must include the right scopes; a misconfigured token returns 403 Forbidden with a vague message. We include error_logging that captures the error code – debugging takes minutes instead of hours.

Which CRM fits your business: Bitrix24, amoCRM, or HubSpot?

Criteria Bitrix24 amoCRM HubSpot
API complexity Medium (REST + webhooks, custom fields) Low (clean JSON API) Medium (REST + SDK, OAuth 2.0)
Typical synchronous latency 200‑600 ms 100‑300 ms 150‑400 ms
Built‑in deduplication by email crm.duplicate.findByComm Contact search contacts/search
Webhook events Event Handlers (push) Admin panel configuration Webhook + Automations
Best suited for Russian B2B, government, custom fields Small‑ to medium‑sized business International B2B, SaaS

Why is asynchronous sending important?

Calling a CRM API synchronously from the form handler is a mistake. The API may respond in 2 seconds – or time out. The user sits waiting. The correct pattern: form submission → save to database → queue a job → return 200 to the user immediately. A background worker then pushes the lead to the CRM. If the CRM is down, the worker retries with exponential backoff. We use Redis + Bull on Node.js or Laravel Queue on PHP – this guarantees delivery even during temporary outages.

Deduplication – how we stop duplicate leads

The same contact may fill the form twice. Without deduplication the CRM ends up with two identical leads. Before creating a new lead we search by email: for Bitrix24 we call crm.duplicate.findByComm, for HubSpot we use contacts/search. If a match is found we attach a task or comment to the existing lead instead of creating a new one. In our projects this cuts duplicate entries by 95%.

Two‑way synchronization – what happens when a manager changes a deal status

If a manager updates a deal status in the CRM, the website needs to reflect that change – especially if the client has a personal account. We configure webhooks from the CRM to an endpoint on the site, then update the local database and notify the client. Critical details: verify the webhook signature and respond with 200 OK within 5 seconds, otherwise the CRM assumes delivery failed. We guarantee that the delay between a status change in the CRM and its appearance on the site never exceeds 3 seconds.

How do we conduct integration in 5 steps?

  1. Audit of data flows – analyse current lead transfer, CRM field structure, and performance bottlenecks. Deliverable: “as‑is” and “to‑be” data flow diagrams.
  2. Architecture design – choose the queue mechanism (Redis Bull or Laravel Queue), define the deduplication method, and prepare a field mapping specification.
  3. Implementation on staging – write code on Laravel or Node.js, configure webhooks, and test with real data: lead creation, status updates, and error handling.
  4. Load testing – simulate peak traffic (e.g. 500 requests per minute) and adjust retry policies and timeout settings.
  5. Deployment and documentation – push to production, train the team on monitoring and retry cleanup, and deliver full endpoint documentation.

What is included in the work

  • Audit report with current data flow diagrams and typical error patterns.
  • Architecture design document specifying queue, deduplication, and mapping.
  • Production‑ready integration code on Laravel or Node.js.
  • Webhook configuration and signature verification.
  • Team training on support tasks and retry cleanup.
  • 30‑day warranty support for bug fixes and mapping adjustments.

Real‑world case: real‑estate agency with 400 leads per month

Click to expand A real‑estate agency processed every incoming lead manually – 400 leads per month. Each lead took 3 minutes to enter, and 15% were lost because emails were missed. We integrated their site with amoCRM using asynchronous queue delivery and automatic deduplication. Leads now appear in the pipeline within 5 seconds, and leftover tasks are automatically assigned to the next available agent. Result: 30% increase in conversion and $12,000 saved annually in administrative overhead.

Timelines

Scenario Duration
One CRM, lead transfer from forms 1‑2 weeks
Two‑way synchronization + statuses 3‑5 weeks
Multiple CRM + custom field mapping 4‑8 weeks

The exact cost is calculated after an audit of your current processes and CRM data structure. Contact us for a project estimate – we will send a commercial proposal within one business day. With 5+ years of experience and more than 20 completed integrations, you get a solution that works from day one. Get an engineer consultation to see how your sales funnel can run without manual lead transfer.

Additional sources: Customer relationship management (Wikipedia) · REST API (Wikipedia)