CASE STUDY 03 / BACKEND AUTOMATION
Stock
Sync
A Go CLI that keeps Shopify inventory aligned with existing stock-control systems.
- role
- Backend + Integration Engineering
- stack
- Go · Shopify · Powersoft · Esoft
- status
- PRODUCTION
- outcome
- Repeatable daily inventory synchronization
ESOFT
+ DIFF
INVENTORY
01 / THE STAKE
Inventory is only trustworthy when every system agrees on what can actually be sold.
02 / SYNC LIFECYCLE
One run.
Four controlled stages.
- 01EXTRACT
- 02NORMALIZE
- 03COMPARE
- 04UPDATE
The CLI reads the latest inventory export from Powersoft or Esoft.
Source records are mapped into one predictable stock model.
Current Shopify inventory is compared by product and location.
Only required changes are sent to Shopify, then reported for review.
03 / KEY DECISIONS
Automation should be
boringly predictable.
Normalize before integrating
Each stock-control format is translated into one internal inventory model.
- TRADE-OFF
- Every source adapter must explicitly maintain its mapping rules.
- REJECTED
- Letting Shopify-specific logic leak into each source-system parser.
Update only the difference
The sync compares states and sends only inventory values that changed.
- TRADE-OFF
- Comparison adds a read phase before writes can begin.
- REJECTED
- Rewriting every product quantity during every daily run.
Make the run observable
The CLI reports what was read, matched, changed, skipped, or rejected.
- TRADE-OFF
- Structured run reporting requires deliberate error classification.
- REJECTED
- Returning one success or failure message for the entire operation.
05 / RESULT
Inventory updates became one repeatable operation.
The tool turns different stock-control exports into a consistent synchronization flow, reducing manual updates and making each run easier to inspect.
WHAT I’D CHANGE
Turn adapters into explicit contracts.
I’d formalize source adapters behind a versioned interface with fixtures and conformance tests, making additional stock systems safer to introduce.
Procurement Explorer