The warehouse and the ERP both claimed the same quantity, with batch exports and a spreadsheet referee in between; the sync hands the count to the floor and the money to the back office.
About the client
A growing mid-market distributor running NetSuite as the system of record for commercial activity. A dedicated WMS drives floor execution across several warehouses
Product
A bidirectional integration layer with an add-on forecasting service. The layer carries releases and confirmations both ways. Inventory counts stay in sync, and planners get live demand forecasts right inside their NetSuite workflow.
“We used to joke that our inventory was accurate once a month, the morning after close. Now the shelf and the books agree all day, every day. My planners open NetSuite and see the warehouse as it stands right now, and that changed the way this whole company plans.” — Director of Supply Chain at the distributor.
Tech Stack
Back-end technologies: SuiteTalk REST web services with SuiteQL queries; RESTlets in SuiteScript 2.x behind OAuth 2.0 with a least-privilege integration role; event-driven queue backbone with idempotent writes and a dead-letter queue; forecasting models on multi-year sell-through and live warehouse events.
Front-end technologies: recommendations surfaced inside the client’s existing NetSuite planning workflows.
Introduction
The distributor managed its commercial operations in NetSuite and its warehouses in a dedicated WMS. Picking and packing lived in one system. Booking and invoicing lived in the other. Between them sat a batch file exchange with a supporting cast of spreadsheets: classic islands of automation, joined after the fact.
That glue held for years. Then daily order volume outgrew it, and the seams opened everywhere the two systems met:
A shipment confirmed in the WMS at 10 a.m. reached NetSuite after the afternoon cut-off. A pallet received against a purchase order waited on swivel-chair work, with someone rekeying the item receipt into NetSuite by hand. Cycle-count variances hit the books only at month-end. Planners built forecasts a day in arrears: demand plans came from history that trailed the floor, leaving planners flying blind on live allocations and damage adjustments.
The picture that emerged looked like a paradox: fast-moving SKUs ran dry while slower-moving items tied up working capital. The client’s planning and operations leads wanted one thing:
Same-day replenishment decisions grounded in actual warehouse stock.
Challenges
The batch exchange updated the ERP after the fact, and the data lagged by hours. Each delay sounds minor on its own. Stack them up, and it becomes death by a thousand cuts: the whole back office was working with yesterday’s data, planning off an extract that trailed the floor. The cost hit both ends of the P&L: stockouts on the fast movers and carrying cost piling up on the slow movers.
Every quantity lived in two places, and the two agreed only at month-end. When the WMS counted 40 units on the shelf, and NetSuite carried 44, someone had to pick a winner by hand. Disputes like that erode trust in the numbers, and a forecast is only as good as the numbers behind it.
Message queues built to survive outages deliver each message at least once, sometimes more. The ERP times out mid-post and a retry follows a successful transaction. A plain write path converts that into two Item Fulfillments for one physical shipment, and finance finds out weeks later. The challenge: make every retry land as the single transaction it was meant to be.
Solution
Devox engineers designed and built a bidirectional integration layer as a set of versioned, authenticated API contracts on an event-driven backbone. The first move was a rule, agreed before a single line of code:
The system that touches the physical unit owns the quantity. Commercial and financial attributes stay in NetSuite.
In short: the floor is ground truth, and the back office owns the money. One owner per field, settled at the design table, so the disputes that usually surface in production get settled on paper first. The core integration flows:
“When a WMS and an ERP both think they own the quantity, the integration turns into a referee. We flipped it: the floor owns the count, the back office owns the money. Potential conflicts are resolved at the design stage, before they reach production. The same design-first mindset shaped the whole write path, down to how a retry lands as one single transaction.” — Engagement Manager, Devox Software.
Together, the flows run both halves of the distributor’s business through one layer: order-to-cash on the sell side and procure-to-pay on the buy side.
Synchronous and asynchronous contracts. Synchronous calls carry command-style actions such as order release and inventory availability checks, where the caller needs an answer in the moment. High-volume status updates ride the asynchronous backbone, so a temporary slowdown on one side leaves picking on the floor and posting in finance running at full speed.
The NetSuite side. OAuth 2.0 token authentication against a dedicated integration role with least-privilege permissions. Standard record operations and SuiteQL queries go through SuiteTalk REST web services. Where a single round-trip must run custom validation or post several records at once, a RESTlet written in SuiteScript 2.x accepts the complete business payload and executes the whole transaction inside NetSuite.
The four core sequences:
And the heart of the build: a write path designed for a world that redelivers.
One key per logical action. Every write operation carries an idempotency key, born once on the producer side and kept identical across all retries. The key is built from stable business attributes that identify the logical operation itself, separate from the transport attempt:
A field-length limit in sight? A deterministic SHA-256 hash of the same fields steps in. Generating a new UUID for each attempt is deliberately avoided, as it would assign a new ID to the same event on every retry. The identity stays tied to the logical event, so a retry carries the same key as the original.
Claim first, then post. Before the first outbound call or queue publish, the layer persists the key together with a payload hash and a pending status. On the receiving side, the consumer claims the key atomically: an INSERT … ON CONFLICT DO NOTHING in a relational store, or a SET NX EX in Redis. A fresh claim opens the gate, and the side effect (the Item Fulfillment or Item Receipt or Adjustment) lands only after the claim succeeds. A key that already exists returns the previously stored answer and skips the repeat work.
A fixed script for every outcome.
A second barrier inside the ERP. In NetSuite, the key sits in a custom external-id field or a lightweight custom record the RESTlet consults before posting. The Dynamics 365 variant of the same framework stores the key in a Dataverse idempotency table or carries it as a Service Bus message property, checked inside the very transaction that posts the warehouse document. A repeat delivery finds the existing record and returns the complete record.
Traceability, end to end. Keys are retained beyond the longest expected retry interval (typically 24 to 72 hours) and expire after that. A separate correlation ID rides every message from the queue through the API call into the ERP records. It covers the last mile of every transaction: an operator can walk one physical scan from the floor all the way to the general-ledger posting.
Trust, verified nightly. A reconciliation job compares on-hand quantities by SKU and location between the two systems and flags discrepancies that exceed an agreed tolerance, so the team sees real drift with the rounding noise filtered out. A thin gateway paces the calls within NetSuite’s account-level limits using exponential back-off, and messages that keep failing land in a dead-letter queue after a fixed retry count. Integrity stands on two independent mechanisms, and each carries half the weight.
Forecasts fed by the live stream. Once the stream earned trust, the team layered an inventory-forecasting service on top. Models train on multi-year sell-through enriched with promotional calendars and supplier lead times, and live WMS events. They produce SKU-location demand forecasts and dynamic safety-stock levels. Recommendations surface inside the planners’ existing NetSuite workflows, and approved replenishment recommendations automatically generate POs. The POs flow back to the WMS for receiving. Forecasts refresh continuously as actual activity diverges from the prior projection. Forecasting lives by an old engineering adage: “garbage in, garbage out.” So the service consumes only events past the idempotency gate, and each receipt and each shipment counts exactly once.
Results
Stockouts down, capital freed. A measurable drop in stockout incidents on fast movers alongside working capital freed up from slower-moving product lines. [Exact stockout and working-capital figures: slot from client.]
Summary
The distributor started with two systems keeping separate score and delivered a single operational stream with one source of truth: WMS execution and NetSuite demand planning in continuous agreement. Forecasts read live warehouse events, and every retry lands as the single transaction it was meant to be.
The framework stands ready for the next site, on NetSuite or on Dynamics 365, with new warehouses and 3PL partners plugging into the same contracts.
Having trouble booking? Open the booking page.
Tell us where your system needs help — we’ll show you how to move forward with clarity and speed. From architecture to launch — we’re your engineering partner.
Book your free consultation. We’ll help you move faster, and smarter.
Share the details of your project – like scope or business challenges. Our team will carefully study them and then we’ll figure out the next move together.
We appreciate you reaching out. Your message has been received, and a member of our team will get back to you within 24 hours.
In the meantime, feel free to follow our social.
Welcome to the Devox Software community! We're excited to have you on board. You'll now receive the latest industry insights, company news, and exclusive updates straight to your inbox.