Case study · 2024 · Construction · Manufacturing · Retail
B2B Commerce Replatform for a Building-Materials Distributor
A six-branch building-materials distributor sold almost everything by phone and fax, with a brochure site that couldn't show price or stock. We replatformed commerce around their ERP: a fast headless storefront where each account sees its own contract pricing and live branch availability, quotes convert to orders in one click, and the season peak is a load-test scenario rather than an outage risk.
Screens are illustrative recreations — client interfaces stay confidential.
The challenge
B2B buyers wanted to order at 6 a.m. from the job site, but everything ran through branch counters: pricing lived in ERP contract tables, stock lived in six branch systems, and the web presence could do neither.
The hard part wasn't the storefront — it was the ERP. Tiered contract pricing, unit-of-measure conversions, credit holds, and branch-level availability all had to be correct in real time, because a wrong price online is worse than no price.
What we built
GraphQL layer over the ERP
A caching GraphQL API wraps the ERP's pricing and inventory logic with per-account resolution — contract tiers, break quantities, and credit status evaluated server-side on every query, with cache invalidation driven by ERP change events.
Storefront built for trade buyers
Next.js storefront with SKU-dense list views, order-by-part-number, saved job lists, and crew-level sub-accounts — patterns from how contractors actually buy, validated in on-site sessions at two branches.
Quote-to-order workflow
Branch reps build quotes in the same system buyers see; acceptance converts to an ERP order with no re-keying, closing the loop that used to take three phone calls.
Performance as a requirement
Catalog search and pricing paths were load-tested against season-peak traffic models before launch; p95 search latency went from 1.9 seconds on the old stack to 210 ms.
The results
- 3.6×
- Online order share
- 210 ms
- p95 catalog search
- −31%
- Order-entry rework
7.6% → 27.5% of all orders in 9 months
down from 1.9 s on the previous stack
branch-reported corrections per 100 orders
- Online order share grew from 7.6% to 27.5% of total orders in nine months, concentrated in repeat trade accounts.
- Branch order-entry rework dropped 31% as quotes and web orders replaced phone transcription.
- The platform carried the spring season peak — the distributor's highest-traffic weeks ever — without degradation.
Client identities stay confidential; figures are rounded from end-of-engagement delivery reporting.
Stack & expertise
- Next.js
- React
- TypeScript
- GraphQL
- Node.js
- PostgreSQL
- k6