Build Notes: a stock-sync dry run with duplicate handling

See what happens before a connection goes live

A stock update arrives twice. Another update reuses the same ID with a different price. One row contains a negative quantity. These are useful situations to check while a connection is still a small, reviewable build.

We built this original East Coast Integrations example with fictional products and events. It maps stock and prices between two in-memory data sets. The checked run on December 3, 2026 processed 10 fictional events: 3 applied updates, 1 identical duplicate skipped, and 6 held for review. All 14 local automated tests passed under Node.js v24.22.1.

This is a synthetic demonstration. It has no network connection, customer data, or live supplier or store access. Its results describe the bundled example.

Start with explicit mapping

The example uses two source SKUs and two existing destination records. SRC-DEMO-LAMP maps to DEMO-LAMP-100; SRC-DEMO-SENSOR maps to DEMO-SENSOR-200. A valid event replaces the mapped record's stock and price together. Prices use whole minor currency units: 2399 USD means $23.99.

The rules accept nonnegative safe integers and a matching currency. They hold unknown SKUs and unrecognized event fields. An ambiguous mapping fails before events are processed. Nothing in this example creates a product or converts currencies.

The awkward cases are part of the result

Fictional input Observed result
Three valid stock-and-price updates Applied to the mapped records in input order
Same event ID and identical payload repeated Skipped once as a duplicate
Same event ID with changed content Held as an event ID conflict
Invalid stock or invalid price Two rows held without applying their values
Unknown source SKU, currency mismatch, or missing event ID Three rows held with separate reasons

The three applied events are updates across two SKUs. After the supplied sequence, the fictional lamp has stock 10 at $23.99 and the sensor has stock 7 at $39.99. Those values are fixture results, with no sales or customer outcome attached.

A conflicting repeat keeps the first occurrence's identity and previously accepted values. It does not roll back an earlier update. In this example, correcting a held row that already has a valid ID requires a fresh ID.

What the checks establish

The source, fictional fixtures, test output, and result report are kept together so the local checks can be rerun. The tests cover normal mapping, duplicate and conflict handling, invalid input, and configuration rules. The report shows each row's outcome and the final records.

Shopify also documents that webhook deliveries may repeat. This generic example has its own fictional event IDs; it does not implement Shopify's webhook headers or signature verification.

What a real project still needs

All duplicate tracking, destination state, and holds live inside one synchronous run. Starting a new process starts from the fixtures again. The report is evidence of the run; it is not a durable queue or restart-safe processing journal.

Accepted updates follow input order. There is no event-time check to stop an older, newly identified event replacing a newer value. The example also leaves out authentication, live writes, rate limits, reconciliation, and operating alerts. It establishes no throughput, exactly-once delivery, or vendor compatibility guarantee.

For a real connection, we scope those decisions with the actual systems, permitted access, expected volume, and failure rules. A useful first milestone is a dry run that shows what would change and which records need attention.

Bring one workflow to scope

Tell us which systems should share information, what each field means, and what should happen when a record repeats or fails a check. Bring a non-confidential example and the result you expect. Leave credentials and private customer records out of the inquiry.

Start with Project Discovery, explore Integration Quickstart, or read what makes a system integration reliable. We confirm the scope, access, acceptance checks, and schedule before booking work.

Tell us what you want to connect.