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, webhook only. It has not run since at least 1 Oct 2026.
  • Trigger: Webhook (Singular Brand Pull, POST /webhook/2712518e-711c-49d9-a963-42a74b78cbee). The daily Schedule (Every Morning, ~03:00), the Execute Workflow trigger from New Brand Onboarding, and the Manual trigger are all disabled.
  • Runs on: One brand per webhook call. The nightly run across all active brands is switched off.
  • 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, one Inventory SKU row is created per warehouse. Create Inventory Record For Warehouse1 posts to Inventory?on_conflict=base_sku_id,Warehouses_id with Prefer: resolution=ignore-duplicates, so a warehouse that already has a row is skipped. See one row per Base SKU per warehouse.
  7. Case components are expanded and linked. When called synchronously it responds to the webhook.

Notes

  • An older branch (Create Inventory Record For Warehouse then Link Inventory And Base SKU In Junction Table) creates an Inventory row with no Base SKU and links it through the _nc_m2m_zs06f_yiwk table. That table no longer exists, so the branch fails if it is ever reached.
  • Authenticates via ShipHero Login → Auth Cookies. Get Shiphero Access Cookies sends that webhook's x-webhook-secret header through the ShipHero Cookies Webhook Secret credential.
  • Heavy merge/aggregate plus counter-based batch loops.
  • Shared error-handler set as the error workflow.

On this page