← All work

Spirits & ready-to-drink beverages

NetSuite-to-NetSuite sync between brand and co-packer

An hourly two-way sync that gives Stateside live visibility of its inventory, production, receipts and shipments at Sojo, and sends its purchase and sales orders to Sojo automatically.

  1. Sojo NetSuite
  2. Hourly Lambda
  3. DynamoDB event bus
  4. Stateside NetSuite
NetSuite-to-NetSuite sync between brand and co-packer
IllustrativeIllustrative: events flow both ways between two NetSuite accounts.
Client
Stateside Brands ↗
Spirits & ready-to-drink beverages
Stack
AWS Lambda, EventBridge, DynamoDB, Python, SuiteQL, SuiteScript Map/Reduce

Results

  • Live, syncing hourly
  • 8 streams from Sojo to Stateside and 2 back

The problem

Stateside could not see its own inventory and production at its co-packer without manual reports. Its purchase orders and sales orders also had to be re-keyed into Sojo’s NetSuite.

What I built

  • An event bus between two NetSuite accounts:
    • An hourly Lambda queries both accounts with SuiteQL.
    • It writes events to DynamoDB, with a checkpoint per stream and 30-day expiry.
  • An events API (GET /events, POST /events/ack) behind bearer auth.
  • Consumers in each account. A Map/Reduce script in each NetSuite account upserts records and marks every event processed or failed. Failed events can be replayed.
  • Data in both directions:
    • Items, locations, inventory balance, production, receipts, shipments and BOLs flow to Stateside.
    • Purchase orders and sales orders flow to Sojo.