Enterprise Orders API
Extracted legacy ecommerce order logic into a .NET pipeline with 57 tests, 13-warehouse allocation, and AS400-safe idempotency.
Built at a private employer. Details are sanitized; architecture and outcomes are described without proprietary identifiers.
- Role
- Lead Backend Developer
- Year
- 2026
- Category
- software-dev
About This Project
Architected a C# .NET order processing service that replaces inline PHP commerce logic with a testable headless pipeline. The API validates SKUs, categorizes lines, allocates inventory across 13 active warehouses, optionally consolidates shipments, and persists structured order data for AS400 to finalize pricing and fulfillment. Built with an orchestrated eight-step flow, repository pattern, parallel inventory lookups, and a BypassTester harness for integration validation while the ASP.NET Core host remains on the roadmap.
Technologies Used
Engineering Challenges
Legacy Migration: Ported consolidation, will-call, dropship, backorder, and promo rules from a PHP monolith without changing fulfillment semantics documented in side-by-side PHP vs C# comparisons.
Service Boundaries with AS400: Kept pricing, promo tier selection, truck routing, and final ERP confirmation in AS400 while C# owned sourcing decisions and structured line types (FULFILL, BACKORDER, DROPSHIP, WILLCALL).
Multi-Database Integration: Coordinated SQL Server persistence, stored procedure wrappers, and linked-server reads to AS400 inventory, customer rankings, and promo tables.
Production Idempotency: Designed header-based keys, payload fingerprint mismatch detection, in-flight locking, and a Redis-backed distributed store to prevent duplicate orders on retry.
Technical Highlights
Parallel SKU Validation: Used concurrent inventory lookups with thread-safe aggregation for orders up to 500 line items.
Consolidation Engine: Attempted single-warehouse fulfillment for opted-in customers before falling back to per-line allocation with explicit CONSOLIDATION_FALLBACK warnings.
Dynamic Backorder Routing: Replaced hardcoded warehouse defaults with ITEMMAST IBOCOD intersection against live customer warehouse rankings.
Test Coverage: Authored 57 xUnit tests across idempotency, dry-run, categorization, allocation, consolidation, promo, dropship, will-call, and minimum order quantity scenarios.
Business Logic
Fulfillment Accuracy: Structured line types give ERP teams unambiguous sourcing decisions instead of opaque PHP branching.
Split-Shipment Reduction: Optional consolidation minimizes packages when inventory allows across the warehouse network.
Operational Safety: Idempotency and dry-run support reduce duplicate orders and let integrators validate payloads before commit.
Sandbox-First Delivery: Built and validated against a dedicated dev database before promoting schema and stored procedures to enterprise SQL Server.