Skip to content
All work

Case study 04 / 06

Purely White Deluxe

Oral care · Marketplaces

Target Plus, wired straight into Shopify and Flexport

  • Data engineering
  • Software engineering
  • Cloud & infrastructure
purelywhitedeluxe.com
Target Plus middlewareDemo data
Target Plus middleware operations dashboard

Key figures

Target polled for new orders
5 min
Reconcile as a safety net
15 min

The brief

  • The challenge

    Selling on Target Plus means meeting Target's rules on every listing and every order (acknowledgements, exact shipping methods, cancellation reasons, stock per distribution center) while the catalog lives in Shopify and stock and shipping live at Flexport.

  • What we built

    A direct Target Plus integration on the client's own Google Cloud: listings published from Shopify against Target's taxonomy; orders acknowledged and routed to Flexport; tracking, cancellations and inventory reported back to Target, and returns registered at Flexport, all operated from a dedicated console. Alongside it, a DataSync warehouse brings marketplace and order data into BigQuery.

  • Outcome

    A marketplace integration built in the brand's own Google Cloud: automated tests, vendor contracts validated against Target's and Flexport's published API specifications, and one pipeline that builds separate sandbox and production apps from the same code.

Related services: Platform integrationsCloud infrastructure

Expertise

What it took.

  • Data engineering

    • Incremental syncs of the Shopify catalog and Target listings and returns, with cursors and overlap windows.
    • A transactional outbox with priorities, backoff and stall detection, so order, stock, price, listing and return calls survive a failure, and idempotency keys keep a retry from applying twice.
    • Store-then-process webhooks with dedupe, a 15-minute reconcile as a safety net, and change-only inventory snapshots with a full ledger.
    • DataSync: marketplace and order data landed in the brand's own BigQuery, including HMAC-verified order webhooks stored as append-only events.
  • Software engineering

    • A FastAPI backend with an order state machine, idempotency keys and a circuit breaker on automatic cancellations.
    • A listing publisher built on Target's data model: variation families, taxonomy-driven attributes and pre-send validation.
    • Automated tests, including vendor contract mocks validated against Target's and Flexport's published OpenAPI specifications.
    • An operations console with in-app help and hand-drawn diagrams, from the system map to the order, listing and return lifecycles.
  • Cloud & infrastructure

    • One Cloud Build pipeline that provisions and deploys three Cloud Run services per app: UI behind Identity-Aware Proxy, IAM-only jobs, public webhook receiver.
    • Cloud SQL Postgres behind a PgBouncer VM on a private VPC, Cloud Scheduler with OIDC, and Secret Manager key rotation without redeploys.
    • Cloud Monitoring alert policies, in-app alerts and an insert-only database role for the public webhook.

Project 01

Target Plus middleware

FastAPI · React 19 · Cloud SQL · Cloud Run

Publishes the Shopify catalog to Target Plus (variation families, Target's taxonomy, list, offer and MAP prices, stock per distribution center), then polls Target for new orders every five minutes, acknowledges them, routes them to Flexport, reports tracking, cancellations and inventory back to Target, and registers Target returns at Flexport for inspection and restock. Everything is operated from a console with an attention queue and a full audit trail.

Goal
Meet Target's operating rules automatically on every listing and order, without ever losing or duplicating an order when a vendor API times out.
Highlights
  • Transactional outbox with priorities, backoff and stall detection
  • Store-then-process webhooks plus a 15-minute reconcile
  • Circuit breaker on automatic cancellations
  • Vendor contract mocks validated against Target's and Flexport's API specifications
Stack
  • Python
  • FastAPI
  • React 19
  • PostgreSQL
  • Cloud Run
  • Cloud SQL
  • Cloud Build
Target Plus middlewareDemo data
Target Plus middleware dashboard
(full size, opens in a new tab)
Operations dashboard: orders by state, and an attention queue with auto-cancel deadlines.
Target Plus middlewareDemo data
Order detail spanning Target and Flexport
(full size, opens in a new tab)
One order across Target and Flexport: revisions, line quantities and tracking.
Target Plus middlewareDemo data
Order timeline of events
(full size, opens in a new tab)
The same order's audit timeline: intake, partial routing, a line cancellation and the fulfillment push.
Target Plus middlewareDemo data
Target Plus product editor
(full size, opens in a new tab)
Listing editor built on Target's taxonomy: Shopify values beside Target's attributes, with the server's pre-send checks alongside.
Target Plus middlewareDemo data
Inventory page with ledger drawer
(full size, opens in a new tab)
Inventory per distribution center, with the movement ledger behind every number.
Target Plus middlewareDemo data
Jobs page showing the outbox
(full size, opens in a new tab)
The outbox: vendor calls queued, retried with backoff or flagged as stalled.
Target Plus middlewareDemo data
In-app system map diagram
(full size, opens in a new tab)
In-app help: how Shopify, Target Plus, Flexport and the three services fit together.

Project 02

Marketplace data warehouse

DataSync · BigQuery · Cloud Run

The brand's marketplace and order data lands in its own Google Cloud project through DataSync: a scheduled, signed TikTok Shop connector onboarded through a one-time seller link, and an HMAC-verified order-webhook receiver that appends every event to BigQuery with a latest-state view.

Goal
Bring the brand's marketplace and order data into a warehouse it owns and pays for.
Highlights
  • Per-resource sync configuration: staging table, merge target and keys
  • Webhook events stored append-only, so schema changes never break ingestion
Stack
  • DataSync
  • BigQuery
  • Cloud Run
  • Cloud Scheduler
  • Webhooks
DataSync consoleDemo data
DataSync connector inventory
(full size, opens in a new tab)
DataSync (demo tenant): marketplace, 3PL and ads connectors with their connection state.
DataSync consoleDemo data
DataSync sync configuration
(full size, opens in a new tab)
DataSync (demo tenant): per-resource sync configuration, with staging tables merged into history by key.
Diagram of the DataSync architecture
(full size, opens in a new tab)
DataSync: one ingestion platform, each client in its own cloud.

Your project next.