Context
A French retail player with around thirty physical stores wanted to launch e-commerce. The strong constraint: refuse any modification to their internal logistics system, an AS400 in place for fifteen years that orchestrates the entire back office (inventory, store orders, supply, invoicing). The real topic was therefore not to modernize the IS but to make a modern e-commerce site coexist with an untouchable legacy, while guaranteeing reliable two-way stock and order synchronization.
The challenge
The AS400 system exposed no modern API and could not be modified. We had to design an abstraction layer capable of reading legacy data while respecting its constraints, guaranteeing synchronization even during load peaks, and handling edge cases that always exist between e-commerce and physical logistics: unexpected stockouts, product returns, inventory discrepancies, orders canceled at checkout.
Our solution
We designed an intermediate API layer acting as a translator between the Next.js store and the AS400, without ever modifying the legacy. A RabbitMQ queue system absorbs peaks and guarantees no order is lost. We implemented nightly reconciliation comparing both systems' states, and an optimistic reservation system displays real-time inventory while preventing double sales. Launch happened in stages.
Results
- E-commerce revenue +40% in 6 months
- Zero undetected stockouts
- Legacy system preserved intact
- Customer satisfaction rate 4.8/5
