B2B Portal Development
A B2B portal is a closed web platform for corporate customer relations: wholesale orders, contract management, document collaboration, and company personal accounts. Key difference from B2C: multi-level pricing, complex user hierarchy within one company, integration with accounting systems (1C, SAP).
Authentication and User Hierarchy
In B2B, account belongs to company (organization), not individual. Inside company — multiple users with different roles:
Organization: "Technoprom" LLC
├── Director (owner) — full access
├── Buyer — orders, price view
├── Accountant — invoices, reports, finance
└── Viewer — catalog view only
Employee invitation: director enters email → employee gets invite link → sets password → assigned role.
Implementation: RBAC (Role-Based Access Control) at route and object level. Spatie Laravel Permission or Casbin for Node.js.
Contract Pricing
Individual price lists — key B2B portal function. Each customer can have own price per item or item group. Data structure:
-- Price list linked to organization
CREATE TABLE price_lists (id, organization_id, name, valid_from, valid_to);
-- Rules: for specific product or category
CREATE TABLE price_list_rules (
price_list_id, product_id, category_id,
price_type ENUM('fixed', 'discount_percent', 'multiplier'),
value DECIMAL
);
Price calculation: first search for specific product rule, then category rule, then base price.
Wholesale Orders and Minimum Quantities
B2B orders typically larger and more complex than retail:
- Minimum order quantity (MOQ)
- Catalog unit orders with weight/packaging coefficients
- Deferred orders (pre-order with shipment date)
- Quick add by SKU (bulk add form)
- Order templates — save item list for repeat orders
Document Management
Post-order documents auto-generated:
- Invoice (PDF) — platform details + order lines
- UPD/shipping document — after shipment
- Reconciliation statement — per period
PDF generation: wkhtmltopdf, puppeteer, dompdf (PHP), @react-pdf/renderer (Node.js). Document templates stored in DB, filled with order data.
1C Integration
Most B2B customers use 1C for accounting. Integration via:
- 1C REST API (HTTP-services on 1C 8.3+ platform)
- Two-way sync: balances and prices from 1C → portal; orders from portal → 1C
Update frequency: from realtime (via 1C notifications) to hourly (cron). For critical balances — reserve on order creation via queue.
Organization Personal Account
Account sections:
- Dashboard — turnover per period, order statuses, balance
- Orders — history, statuses, tracking
- Documents — invoices, UPD, statements (download PDF, request original)
- References — delivery addresses, contacts
- Users — manage employees and roles
- Credit limit — current debt, limit, transaction history
Technology Stack
| Layer | Technologies |
|---|---|
| Backend | Laravel / Django / Spring Boot |
| Frontend | React + Next.js / Vue + Nuxt |
| API | REST + WebSocket for notifications |
| DB | PostgreSQL with row-level security |
| Integrations | 1C REST API, ERP WebServices |
| Documents | Puppeteer / dompdf |
Timeline
B2B portal MVP (catalog with personal pricing, order placement, company account, invoice generation): 3–4 months. With 1C integration, document workflow, advanced analytics: 5–8 months.







