Real-time Inventory Sync with Reconciliation
Context
Client Stack + Scale
A mid-market fashion retailer operating a direct-to-consumer model through Shopify Plus, with NetSuite as their ERP system. The company manages seasonal inventory across 8,000 SKUs with frequent product launches and restocks.
The Problem
What was breaking
Every morning at 6 AM, the operations team started their day with a 2-hour manual reconciliation ritual. They would export inventory reports from NetSuite, cross-reference them against Shopify's inventory levels, and manually adjust discrepancies in a spreadsheet. Twice a month, a customer would successfully order a product that was actually out of stock in the warehouse, resulting in fulfillment delays, customer service escalations, and refunds. During peak season (November–December), these incidents increased to 8–10 per week. The root cause: inventory updates were synced via a nightly batch job that would silently fail when NetSuite's API rate limits were exceeded. No alerts, no retries – just quiet data drift that compounded over time.
Daily 2-hour manual reconciliation window before operations could begin
Overselling incidents causing customer dissatisfaction and lost revenue
No visibility into sync failures or data drift
Batch job failures during high-volume periods with no automatic recovery
Ops team spending 40+ hours/month on inventory reconciliation instead of strategic work
The Solution
Architecture + Approach
We replaced the fragile batch job with an event-driven sync pipeline that processes inventory changes in real-time and includes automated reconciliation, drift detection, and self-healing capabilities.
Architecture Overview
Event-driven sync pipeline using NetSuite webhooks and Shopify Admin API
Redis queue with retry logic and exponential backoff for rate limit handling
PostgreSQL as the source-of-truth reconciliation layer
Scheduled reconciliation jobs (every 4 hours) to detect and auto-correct drift
Monitoring dashboard with Slack alerts for sync failures and drift detection
Technical Details
The sync pipeline operates in two modes: real-time event processing and scheduled reconciliation. When inventory changes in NetSuite, a webhook triggers our Node.js service, which validates the payload, checks idempotency (to prevent duplicate updates), and queues the update to Shopify with retry logic that respects rate limits. Every 4 hours, a reconciliation job runs that compares NetSuite inventory levels against Shopify, logs any discrepancies greater than 2 units, and auto-corrects them if they fall within defined tolerances (e.g., differences < 10 units are auto-fixed, larger discrepancies trigger human review). The system maintains a PostgreSQL audit log of every sync operation, enabling full traceability and debugging. All failures trigger Slack alerts with context, and the dashboard shows real-time sync status, latency metrics, and drift history.
The Results
Measurable Impact
Measured as percentage of SKUs with < 2 unit variance between systems over 90-day window
From NetSuite inventory change to Shopify update, including queue processing time
Operations team now spends 2.5 hours/month on reconciliation instead of 40+ hours
Zero overselling incidents in the 6 months post-launch (vs. 8–10/month during peak previously)
Additional Outcomes
Ops team reallocated saved time to demand forecasting and supplier relationship management
Reduced customer service tickets related to out-of-stock issues by 87%
Enabled same-day inventory updates for product launches instead of waiting for nightly batch
Complete audit trail allows troubleshooting fulfillment issues in minutes instead of hours
Get similar results
Tell us what systems you're connecting and what's breaking. We'll respond with a plan and timeline.