North-star vision · Phase 2 goal

The Inventory Operating System

One system that owns the stock and runs everything around it. Add a unit once — it lists itself to Shopify, Trade Me, Meta & Google. It sells once — and the system withdraws it everywhere, prints the dispatch, updates the books, and fires the conversion back to the ad networks. A single source of truth, fully looped. This is the ambitious target — here's the whole picture on one page.
List once → sell everywhere Scan → print → ship → reconcile Sales loop back to ads & accounting One source of truth
How this fits the other docs. The foundation — the Trade Me API capability map, the AI photo→listing pipeline, and the Trade Me ↔ Shopify sync engine — is specced in trademe-ai-first-automation.md and trademe-shopify-stock-hub.md. This page is the north star those build toward: the full operating system with every channel, the fulfilment workflow, and the marketing + accounting loops wired in.

1 The single source of truth

The hub owns the stock. Every channel and every system reads from it and writes back to it — they never talk to each other.
The Stock Hub · single source of truth
1 physical unit = 1 record
IMEI/serial · grade · cost · photos · status · price
◆ Sell channels
  • Shopify (own site)
  • Trade Me
  • Meta Shops (FB/IG)
  • Google Shopping
  • + eBay AU later
▸ Fulfilment
  • Barcode / IMEI scan
  • Docket + label print
  • NZ courier + tracking
↻ Marketing loop
  • Stape server-side
  • Google Ads conv.
  • Meta CAPI
$ Accounting
  • Xero sale + COGS
  • Stock valuation
  • Per-unit margin

Because there's one truth, the same sale event does four jobs at once: it withdraws the listing everywhere else, triggers the dispatch, books the sale into accounting, and reports the conversion to the ad platforms. Nothing is keyed in twice; nothing drifts out of sync.

2 The system map — every API, grouped by job

What connects to the hub, what it does, and the interface it uses. Foundation pieces are buildable now; the rest is the Phase 2 build-out.
SystemJobInterfaceStage
ShopifyOwn-store listings, inventory, ordersAdmin GraphQL API + orders/paid webhookFoundation
Trade MeList / withdraw / photos / sold-items / Q&A / feedbackSelling API (OAuth 1.0a, poll)Foundation
Meta — FB/Instagram ShopsProduct feed to Facebook & Instagram shoppingCommerce / Catalog APIPhase 2
Google ShoppingFree listings + Shopping ads feedMerchant Center Content APIPhase 2
Barcode / IMEI scannerIntake capture & pick confirmationUSB/Bluetooth HID → hubPhase 2
PhotoRoomBackground removal / clean product shotsPhotoRoom API (~$0.02/img)Foundation
Vision LLM (Claude)Title, attributes, description, grade from photosAnthropic APIFoundation
Courier (Starshipit / GoSweetSpot)Shipping labels + tracking numbersCarrier API → NZ Post / NZ Couriers / AramexPhase 2
Label / thermal printerAuto-print order docket + shipping stickerPrint API / PDF spoolPhase 2
Stape sGTMServer-side conversion routing (the loop)sGTM container (MCP)Phase 2
Google AdsConversion import for paid attributionAds API — offline / enhanced conversionsPhase 2
Meta Conversions APIServer-side purchase eventsCAPI via StapePhase 2
XeroRecord the sale, COGS, stock valuationXero Accounting APIPhase 2
One honesty note on "Facebook Marketplace". Meta's Shops on Facebook & Instagram are fully feed-automatable via the Catalog API — that's the version we build. Peer-style Marketplace listings don't have an open public listing API (manual or approved-partner only), so treat "Meta" as Shops-via-catalog, with Marketplace as a manual add-on if it ever earns its keep.

3 Inbound — "do it once, everything goes out"

New stock arrives. One pass at the bench, and the unit is live across every channel.
01
Scan & grade

Scan IMEI/serial, assign grade (A/B/C), battery health, cost, supplier, photos. Hub mints the SKU + master record.

02
AI enrich

PhotoRoom cleans the shots; vision LLM writes the title (leads "Refurbished"), fills attributes, drafts the description, suggests a price.

03
Batch approve

Operator reviews a grid of drafts, edits inline, ticks approve. 200 units reviewed in minutes.

04
Publish everywhere

One action → live on Shopify, Trade Me, Meta Shops & Google — each listing linked back to the one master record.

The payoff: the work that today is done by hand, per-listing, per-channel, collapses to one enrich-and-approve pass. List once; sell everywhere; and every listing is built to the CRO standard the store audit found missing (titles, attributes, photos, "Refurbished").

4 Outbound — the fulfilment workflow

The flow you described: order in → alert → find & scan → the scan triggers everything else.
An order lands — from any channel

A Shopify sale (instant webhook) or a Trade Me sale (caught on the next poll) drops into one unified queue. The operator gets an alert / email.

Shopify orders/paid · Trade Me SoldItems poll
Find the unit & scan it

The operator walks to the shelf, finds the device, and scans the barcode / enters the reference. The hub checks the scanned IMEI matches the order — so the right physical unit ships.

Scan-to-confirm against the master record
The scan triggers the print

That one scan fires the order docket and the shipping label/sticker — buyer address, courier, tracking — printing together, ready to peel and stick.

Courier API (label + tracking) → thermal printer
Label on, packed, lodged

Operator sticks the label, packs, and lodges with the courier. The physical job is done.

Stock updated — withdrawn everywhere

The hub marks the unit sold and pulls the listing from every other channel (the unique-unit withdrawal — no overselling the same phone twice).

Shopify set-qty-0 / unpublish · Trade Me Withdraw
Tracking pushed back

The tracking number flows back to the channel that made the sale, and the order is marked dispatched.

Trade Me mark-shipped · Shopify fulfilment
Booked for accounting

The sale, the unit's cost (COGS) and the stock decrement post to Xero automatically — the books stay live, per-unit margin is captured.

Xero Accounting API
Conversion fired back to the ad networks

The sale event is reported server-side to Google Ads and Meta — closing the loop so the ad spend that drove the sale gets the credit (see §5).

Stape sGTM → Google Ads + Meta CAPI
One scan, eight outcomes. The operator does two physical things — find it, scan it, pack it. The system does the other six: confirm, print, ship-update, withdraw-everywhere, book it, and report the conversion. That's the leverage — a team's worth of admin compressed into a barcode beep.
The honest tension — routing vs multi-channel. The companion spec's default oversell fix is to route unique high-value units to ONE channel (TM-only or Shopify-only). That deliberately reduces the dual-listing this Hub exists to enable — so be clear-eyed about where the value actually lands: the Hub's clearest payoff is the list-once pipeline plus commodity / multi-quantity stock (accessories, parts, new-old-stock), which dual-lists safely. Dual-listing is reserved for low-oversell-risk stock; premium qty-1 units are single-channel by policy. The "list once → sell everywhere" promise holds fully for the commodity pool, and partially — by design — for the unique high-value units.

5 The marketing loop — sales back to the ad networks

The piece most inventory systems never touch — and the one squarely in your wheelhouse.

Most stores spend on ads but can only measure the sales the website pixel happens to see. With the hub as the source of truth, every sale is a known event — so we route the right signal to the right platform, server-side, through Stape:

Own-store (Shopify) sales — full closed loop

  • Click ID captured on the way in (gclid / fbclid / wbraid)
  • Purchase fired server-side via Stape sGTM → Google Ads + Meta CAPI
  • Enhanced conversions for accuracy; deduped, durable, ad-blocker-proof
  • Smarter bidding → lower CPA → more profitable scale

Marketplace (Trade Me) sales — blended & honest

  • No click ID on a Trade Me sale — so we don't fake attribution
  • Booked in the hub for blended ROAS & true channel P&L
  • Where a click identifier exists, fed as an offline conversion
  • Google Shopping / PMax fed clean stock + price from the same hub
Why it's the differentiator: this is exactly the server-side conversion plumbing you already run for Gerrard's (Stape sGTM + offline conversion import). Bolting it onto the inventory hub means the ad platforms learn from real, deduplicated, full-funnel sales data — across channels — which is how you out-bid competitors flying blind on pixel-only data.

6 Why a single source of truth changes the business

Once
Touch a unit one time — list, sell, ship, book & report all flow from it
Double-keying — no re-entering stock, sales or numbers between systems
Live
Books, stock & ad data are always current, not reconciled weekly

Every sale becomes a data flywheel: it feeds the ad platforms better signal, feeds accounting a clean margin, feeds reporting a real-time picture of what's selling, and frees the listings on every other channel — automatically. The business runs on two operators + a picker not because corners are cut, but because the system does the connective work a back-office team would otherwise do by hand.

7 Where we can go — the build path

P1
Foundation

Master catalogue + AI listing publisher + Trade Me ↔ Shopify unique-unit sync. (Specced in the companion docs.)

P2
This page

Scan-driven fulfilment + auto-print + courier, the ads loop (Stape → Google/Meta), Xero, Meta Shops + Google feeds.

P3
Scale channels

eBay AU, Reebelo, Mighty Ape as new spokes — the hub doesn't change, you just add adapters.

North star

Near-autonomous ops — and the option to multi-tenant it as a product for other NZ Shopify + Trade Me sellers.

It's an ambitious build — and that's the point. Foundation pays for itself on TYDI alone. Phase 2 is the goal we aim at: the moment a barcode beep runs the whole back office and every sale teaches the ad platforms, TYDI isn't "a store that uses AI" — it's an operating system that happens to sell refurbished electronics. That's the moat, and the thing worth pointing the build at.
North-star operating-model vision, not a build spec — each block becomes its own project. API availability (esp. Meta Marketplace, Google Ads offline-conversion attribution without a click ID, and Trade Me's polling-only model) should be re-verified before committing engineering time. Foundation pieces are documented and buildable today; Phase 2 is the aspirational target.
← Back to the document hub