NDA-Protected Deployment (Incognito)

NDA Client — B2B Wholesale Platform, Field Sales CRM (Web + Mobile) & 2-Way Comarch ERP Optima Integration

ClientNDA-Protected Client (B2B Distribution)
IndustryB2B Wholesale & Commercial Distribution
CategoryERP / MES / CRM Systems
TechnologiesNext.js (TypeScript), React Native / Expo (iOS & Android), PostgreSQL, Prisma ORM, Comarch ERP Optima (2-Way Sync / VPN), GUS API (BIR 1.2), WebSockets (Real-Time), RBAC (5 Roles)
01 / CLIENT LAYERWeb Portal (Next.js) + Mobile (React Native / iOS & Android)

Dedicated channels for B2B Contractors and Field Sales Reps

  • 24/7 Self-Service B2B Contractor Portal with customer-specific pricing, live stock availability, and PDF invoice history
  • Native iOS / Android mobile app for field sales representatives (visit logs, on-site order placement, Push notifications)
  • Real-time visibility into available trade credit limit, payment due dates, and allocated co-op marketing budgets
02 / BUSINESS LOGIC CORECRM, Tiered Discount Engine & Real-Time Credit Control

Commercial policy enforcement and instant credit-limit overrides

  • Automated verification of available trade credit and overdue invoices prior to accepting an order into fulfillment
  • Real-time conditional order release workflow (Override) reviewed and approved live by Executive Management (WebSockets + Push)
  • Multi-tier discount policies per product group and bulk customer portfolio reassignment across sales representatives
03 / INTEGRATION BUSComarch ERP Optima VPN Tunnel (2-Way) + GUS BIR 1.2 Registry

Transactional consistency with on-premise accounting & inventory

  • Bi-directional synchronization of customer master records, assigned account managers, and individual commercial terms
  • Automated creation of reservation orders (ZS / ZO) and retrieval of sales invoices (FS with PDF) and open receivables
  • Instant company registration lookup and validation via the Polish National Statistical Registry (GUS BIR 1.2) by Tax ID (NIP)
ACCESS CONTROL & PERMISSION MODEL (5 RBAC ROLES)

01 / B2B Contractor

24/7 self-service ordering, custom price lists, live trade credit balance, PDF invoices, and marketing budget tracking.

02 / Field Sales Rep

Mobile field operations (iOS/Android), account portfolio management, sales pipeline, visit reports, and proxy ordering.

03 / Sales Director

Discount policy governance, sales targets, team performance analytics, and bulk customer portfolio reallocation.

04 / Operations Director

Trade credit limit supervision, Comarch Optima receivables monitoring, and instant one-tap Override approvals.

05 / Marketing Manager

Promotional campaign setup, contractor-allocated marketing funds, and digital product collateral distribution.

CONTEXT & CHALLENGE
NDA-Protected Client (B2B Distribution)
Non-Disclosure Agreement (NDA)Due to a strict Non-Disclosure Agreement (NDA), the client's company name, trademarks, and screenshots containing contractor data are omitted from public view. Below we present the actual engineering architecture, 5-role RBAC permission model, and ERP synchronization mechanisms delivered in this deployment.

B2B CRM Platform, Contractor Portal (Web + iOS/Android) & Real-Time Trade Credit Control with Comarch ERP Optima

A B2B wholesale distribution enterprise serving a nationwide network of commercial contractors through field sales representatives, a marketing department, and an operations headquarters running on Comarch ERP Optima.

Fragmented sales workflows: field reps took orders by phone and email without real-time visibility into a customer's current credit balance or inventory levels in Comarch ERP Optima. Verifying exceeded credit limits, applying category-specific discounts, and settling marketing budgets required manual back-and-forth across sales, accounting, and management.

Architected and delivered a bespoke B2B ecosystem (Next.js web portal + React Native / Expo mobile app for iOS and Android) connected bi-directionally to Comarch ERP Optima and the GUS (BIR 1.2) registry. Implemented an automated discount policy engine, marketing budget tracker, and instant WebSockets-based credit-limit Override authorization.

01 / KEY METRIC

Web + Mobile (iOS / Android) for 5 RBAC Roles

02 / KEY METRIC

2-Way Comarch ERP Optima Sync + GUS BIR 1.2

03 / KEY METRIC

Real-Time Credit Limits & Executive Override Workflow

SYSTEM MODULES & MECHANISMS

Core functional pillars.

01 / MODULE

2-Way Comarch ERP Optima (VPN) & GUS Registry Sync

Automated GUS (BIR 1.2) company lookup by NIP, 2-way contractor and sales rep synchronization, live stock levels, order export (ZS/ZO), and invoice/receivables sync (FS with PDF).

02 / MODULE

Trade Credit Control & Live Override Workflow (WebSockets)

Pre-order validation of available credit limit and overdue balances. Conditional order release requests (Override) are routed in real time to the Executive Board.

03 / MODULE

Tiered Discount Engine & Co-Op Marketing Budgets

Multi-level discount rules bound to product categories and volume/value thresholds, paired with automated settlement of contractor-specific marketing budgets.

04 / MODULE

Field Sales CRM & Portfolio Management (Web + iOS/Android)

Sales opportunity pipeline, field visit tasks, interaction history, and bulk customer portfolio transfers between reps with automatic account manager updates in the ERP.

01 / ENGINEERING

Architecture & Constraints

Multi-channel architecture: Next.js (TypeScript) backend and web portal with PostgreSQL and Prisma ORM, native iOS/Android mobile app (React Native / Expo), real-time communication server (WebSockets + Push notifications), queued VPN synchronization bus to Comarch ERP Optima, and a SOAP client for GUS BIR 1.2.

Strict network security requirements: the Comarch ERP Optima database resides inside the client's internal network (accessible exclusively via an encrypted VPN tunnel). The solution had to operate simultaneously as a responsive web portal and a native mobile app (iOS / Android) across 5 strictly isolated RBAC roles.

02 / OWNERSHIP

My Role & Delivery

End-to-end Web and Mobile (iOS/Android) system architecture, 5-role RBAC permission matrix design, implementation of the tiered discount engine, trade credit control, and marketing budget module, plus the bi-directional VPN integration bus with Comarch ERP Optima and GUS (BIR 1.2).

Commercial and accounting workflow discovery, 5-role RBAC matrix engineering, encrypted VPN tunnel setup with the on-premise ERP environment, web and mobile app development, and transactional consistency testing across documents and balances.

03 / BUSINESS IMPACT

Outcome & Long-Term Value

Launched a 24/7 self-service B2B ordering channel (Web + Mobile) and equipped field sales reps with live inventory, pricing, and trade credit data from Comarch ERP Optima. Reduced conditional order approval times (credit limit Override) from several hours to under 60 seconds via real-time push notifications.

A scalable commercial platform acting as the digital backbone of the client's B2B wholesale operations — free from per-user licensing fees and providing full control over trade credit governance and pricing policies.

CONTACT

Let's engineer your next technology platform.

Need a custom ERP / MES system, a Headless eCommerce platform with a CPQ configurator, or a 2-way ERP integration? Get in touch to book a free consultation.

Get in Touch