Rebuilding a Global B2B Commerce Platform: 6-Month Migration That Cut Checkout Time by 58%
This case study details how we rebuilt a legacy B2B commerce platform used by 1,200 enterprise buyers across APAC and the Middle East. The client faced frequent outages, slow pricing calculations, and a fragmented catalog that made scaling nearly impossible. We led a six‑month modernization program that consolidated product data, refactored the pricing engine, and delivered a new Next.js + NestJS architecture with resilient AWS infrastructure. The result was a 58% faster checkout, a 41% reduction in support tickets, and a measurable lift in repeat orders. The story covers the challenge, goals, approach, implementation, results, and lessons learned — from mapping complex pricing rules to rolling out with zero downtime. It also shares the metrics that mattered most to leadership and the operational changes that made the improvements stick.
Case StudyB2B CommercePlatform ModernizationNext.jsNestJSAWSPerformanceCase Study
# Overview
A leading industrial supplier operating across APAC and the Middle East engaged Webskyne to modernize its B2B commerce platform. The platform served more than 1,200 enterprise buyers, each with custom pricing rules, negotiated contracts, and multi-tier approvals. Over the years, the system grew organically into a fragile monolith with batch-driven catalogs, a pricing engine tied to a legacy ERP, and a checkout flow that frequently timed out under peak demand. The business wanted a safer, faster, and more scalable digital channel that would reduce manual order handling while improving the buying experience for procurement teams.
We delivered a complete platform rebuild in six months, migrating to a service-oriented architecture built with Next.js, NestJS, and AWS-native infrastructure. The initiative consolidated product data, rebuilt the pricing engine, and introduced a modern approval workflow. The outcome: checkout time dropped by 58%, order errors fell by 72%, and repeat orders increased by 18% within the first quarter post-launch.

# Challenge
The client’s legacy platform had been in operation for nearly a decade. It had evolved from a simple order portal into a mission‑critical system, but its architecture did not keep pace with the business’s growth. The most pressing problems were:
- **Performance bottlenecks**: Checkout relied on synchronous pricing calls to a legacy ERP. A single order could trigger hundreds of pricing lookups, causing timeouts and failures.
- **Data fragmentation**: Product data lived in three separate systems (ERP, PIM, and local spreadsheets maintained by regional teams). This led to inconsistent descriptions, duplicate SKUs, and incompatible units of measure.
- **Limited scalability**: The monolith was deployed on a single server cluster with minimal observability. Any scale-up required weekend outages, and load spikes during quarterly reorder cycles were common.
- **Manual interventions**: Procurement teams often placed orders through email or phone because the platform failed during checkout. This created high support costs and delayed fulfillment.
- **Regulatory and compliance risks**: Region-specific tax handling and export restrictions were implemented through patchy scripts, making audits difficult.
# Goals
The modernization program defined clear business and technical goals:
1. **Reduce checkout latency by at least 40%** for enterprise buyers and enable 99.9% uptime during peak reorder periods.
2. **Unify product data** across regions into a single source of truth, with auditability and automated synchronization.
3. **Rebuild the pricing engine** to support complex contract logic while decoupling it from the ERP.
4. **Improve order accuracy**, reducing order modifications and credit notes by at least 50%.
5. **Enable future growth**, including multilingual storefronts and regional marketplaces without re-architecting.
6. **Deliver with zero downtime**, ensuring procurement teams could continue ordering throughout the migration.
# Approach
We structured the work into four parallel tracks: discovery, data consolidation, platform architecture, and phased migration. The guiding principles were to isolate risk, keep delivery incremental, and validate changes with real customer workflows.
## Discovery and Process Mapping
We conducted workshops with procurement managers, regional sales leaders, and the internal IT team. This surfaced the real-world edge cases that the legacy system handled, including:
- Multi-year contract pricing with region-specific discount tiers
- Quantity-based rebates applied at month-end
- Approval chains triggered by order value and export destination
- Special handling for hazardous materials and regulated items
We translated these workflows into clear domain models, then documented them in an architecture decision record (ADR) repository. This became the foundation for both the new pricing engine and the approval workflow.
## Data Consolidation Strategy
The product catalog was the most fragile part of the system. We proposed a staged consolidation approach:
1. **Extract and normalize** all SKU data into a central staging database.
2. **Resolve conflicts** using a rules engine that prioritized PIM data unless explicit ERP overrides existed.
3. **Introduce canonical IDs** and standardized units of measure.
4. **Create an automated sync pipeline** to keep the new catalog aligned with ERP updates.
## Architecture and Platform Design
We designed a service-oriented architecture that kept the storefront responsive while isolating high-complexity domains. Key components included:
- **Next.js frontend** for fast SSR and improved SEO for public catalog pages
- **NestJS backend services** for pricing, approvals, inventory, and order orchestration
- **AWS infrastructure** with ECS for containerized services, RDS for transactional data, and OpenSearch for catalog search
- **Event-driven integrations** via SNS/SQS to decouple ERP sync and order processing
- **Observability** using CloudWatch, X-Ray, and structured logging for traceability
## Phased Migration
To avoid downtime, we implemented a dual-run strategy. New services would run alongside the legacy system, gradually taking over as confidence grew. We introduced feature flags and canary releases to isolate risk by region and buyer group.
# Implementation
## Catalog Unification
We built an ETL pipeline in Python to ingest data from ERP, PIM, and spreadsheets. The pipeline produced canonical SKUs, normalized descriptions, and standardized units. It also created a versioned audit log so each change could be traced to its source.
Within four weeks, we consolidated 72,000 SKUs into a single source of truth. The new catalog API delivered consistent data to both the frontend and external integrations, eliminating the discrepancies that had plagued regional teams.
## Pricing Engine Rebuild
The pricing engine was the most complex component. The legacy system computed prices on demand using synchronous ERP calls, which was both slow and brittle. We rebuilt this as a dedicated NestJS service with two key improvements:
- **Contract caching**: Contract rules were preloaded into Redis with TTL-based invalidation. This reduced per-order pricing calls from hundreds to a handful.
- **Rule evaluation engine**: We implemented a modular rules system that could apply tiered discounts, region-specific tax handling, and export compliance checks.
The engine supported advanced scenarios like mixed-currency orders and cross-region approvals. We validated it against historical order data, achieving 99.3% accuracy on first pass. The remaining 0.7% were edge cases that required newly defined rules rather than code fixes.
## Checkout and Approval Workflow
The checkout experience was redesigned to be clearer for procurement users while aligning with internal compliance requirements. We introduced:
- A multi-step checkout flow that surfaced contract pricing and tax before approval
- Approval routing based on order value, region, and product type
- Automatic notifications and approval history accessible in the buyer portal
We integrated approvals with Slack and email notifications for internal teams, reducing response times by 32%.
## Infrastructure Modernization
We shifted the platform to AWS, using ECS to run services and RDS for transactional storage. Key infrastructure upgrades included:
- **Autoscaling** based on queue depth and CPU utilization
- **Blue/green deployments** for safe releases
- **CI/CD pipelines** with automated testing and schema checks
- **Disaster recovery** via multi-region backups and replication
Observability was embedded from the start. We created dashboards for order latency, pricing engine performance, and API error rates, enabling the operations team to diagnose issues in minutes instead of hours.
## Migration and Rollout
We rolled out the new platform region by region. For each region, we ran the new pricing engine in shadow mode, comparing its output to the legacy system. Only once we achieved >99% pricing parity did we switch traffic to the new engine.
For the frontend, we launched the new Next.js storefront behind a feature flag and invited a pilot group of 40 buyers. Their feedback guided refinements to navigation and order history views before full rollout.
# Results
The modernization delivered significant performance and operational improvements within the first 90 days post-launch:
- **Checkout time decreased by 58%** (from 2.4 minutes to 1.0 minute on average).
- **Support tickets related to order errors dropped by 72%**.
- **Repeat orders increased by 18%** as procurement teams trusted the platform more.
- **System uptime improved to 99.95%**, even during quarterly reorder spikes.
- **Catalog consistency** across regions improved, reducing manual corrections by 65%.
These improvements were not just technical — they translated directly into operational savings and higher customer satisfaction.
# Metrics
We tracked metrics across performance, operations, and business outcomes. The most important were:
## Performance
- Checkout latency: **2.4 minutes → 1.0 minute** (58% reduction)
- Pricing engine response time: **1.8 seconds → 320 ms** (82% reduction)
- Page load time for catalog: **3.6 seconds → 1.4 seconds** (61% reduction)
## Reliability
- Uptime during peak reorder cycle: **99.2% → 99.95%**
- Deployment rollbacks: **10/month → 2/month**
- Mean time to recovery (MTTR): **4 hours → 35 minutes**
## Operations
- Manual order interventions: **420/month → 115/month**
- Pricing disputes: **96/month → 28/month**
- Support tickets tied to platform errors: **310/month → 87/month**
## Business Impact
- Repeat orders: **+18%** within one quarter
- Average order size: **+9%** due to more accurate contract discounts
- Time-to-approve orders: **2.2 days → 1.5 days** (32% faster)
# Lessons Learned
## 1. Decouple complexity early
The biggest risk was tying critical workflows to the legacy ERP. By decoupling pricing and catalog logic into dedicated services, we reduced dependency risk and unlocked faster iteration. This decision also simplified future enhancements like marketplace integrations.
## 2. Data quality is a product feature
Catalog accuracy turned out to be as important as performance. Procurement users cared deeply about correct SKUs, units, and documentation. Investing in data normalization and audit trails improved trust and reduced manual corrections.
## 3. Shadow mode builds confidence
Running the new pricing engine in parallel with the legacy system was vital. It gave stakeholders measurable evidence that the new system could handle edge cases, and it created a safe path to rollout without disruptions.
## 4. Observability isn’t optional
The old platform failed silently. By embedding dashboards and alerts from day one, we ensured the operations team could act quickly and confidently. This also enabled proactive monitoring rather than reactive firefighting.
## 5. Rollout strategy matters as much as architecture
Even the best systems can fail if the rollout is rushed. The phased approach, combined with buyer pilot groups, allowed us to refine the experience and stabilize performance before full deployment.
# Conclusion
This project demonstrates how a methodical modernization program can deliver rapid business value without disrupting mission‑critical operations. By addressing data integrity, pricing complexity, and infrastructure reliability in parallel, we created a platform that not only solved immediate pain points but also positioned the client for regional expansion and new digital offerings.
For the client, the platform is now a dependable revenue engine rather than a constant source of operational risk. For procurement users, it is faster, more transparent, and easier to trust. And for internal teams, it provides observability and control that were previously missing.
If your organization is facing similar challenges — fragmented data, legacy dependencies, and performance bottlenecks — the path forward is clear: invest in a strong foundation, deliver in phases, and measure the outcomes that truly matter.