National Commerce Docs
n8n flows

Pull Brand SKUs

Bulk-syncs a brand's product, base, and case SKUs plus per-warehouse inventory from ShipHero into Supabase.

Bulk-syncs all SKUs for one brand, or every active brand, from ShipHero into Supabase (Product SKUs, Base SKUs, and Case SKUs plus per-warehouse inventory records) so the portal catalog stays current.

At a glance

  • Status: Active
  • Trigger: Webhook (Singular Brand Pull, POST /webhook/2712518e-711c-49d9-a963-42a74b78cbee), a daily Schedule (Every Morning, ~03:00), an Execute Workflow trigger from New Brand Onboarding, and Manual.
  • Runs on: All active brands on the nightly schedule, or one brand when invoked directly.
  • Talks to: Supabase (Brands, SKU tables, inventory and junction tables); ShipHero (GraphQL plus authenticated cookie endpoints).

How it works

  1. Entry inputs are merged; either all active brands load, or one brand is selected.
  2. A counter loop iterates brands.
  3. Per brand, Get Shiphero Access Cookies authenticates, then SKUs are pulled with cursor paging (Get Product SKUs List, Get Case SKUs, Get Lone SKUs).
  4. Lists are aggregated, merged, and de-duped against already-processed SKUs.
  5. Base and Product SKU rows are found or created, enriched via ShipHero.
  6. Per Base SKU, per-warehouse Inventory SKU rows are created and linked in a junction table, checking for existing rows first.
  7. Case components are expanded and linked. When called synchronously it responds to the webhook.

Notes

  • Runs nightly at ~3 AM across all active brands.
  • Authenticates via ShipHero Login → Auth Cookies.
  • Heavy merge/aggregate plus counter-based batch loops.
  • Shared error-handler set as the error workflow.

On this page