Enterprise Orders API

Extracted legacy ecommerce order logic into a .NET pipeline with 57 tests, 13-warehouse allocation, and AS400-safe idempotency.

Private employer Details are sanitized; architecture and outcomes are described without proprietary identifiers.

At a glance

xUnit tests
57
warehouses allocated across
13
line items per order supported
500
Role
Lead Backend Developer
Year
2026
Category
Backend 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 standalone bypass test harness for integration validation while the ASP.NET Core host remains on the roadmap.

Technologies Used

C#Entity Framework CoreSQL ServerIBM DB2RedisxUnitFluentValidationREST

Engineering Challenges

  1. 01

    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.

  2. 02

    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).

  3. 03

    Multi-Database Integration

    Coordinated SQL Server persistence, stored procedure wrappers, and linked-server reads to AS400 inventory, customer rankings, and promo tables.

  4. 04

    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 by intersecting item master backorder routing codes with 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.