National Commerce Docs
n8n flows

Missing Shipment Data Pull (v1)

The original single-tenant flow that backfilled missing ShipHero shipment data into Supabase one day at a time, now disabled.

The original (v1) flow, superseded by the 2.0 flows and disabled. It backfilled missing ShipHero shipment data into Supabase, creating shipments, orders, packages, line items, and Product SKU links one day at a time for a single brand.

At a glance

  • Status: Inactive, the original v1, superseded by the 2.0 flows.
  • Trigger: A self-restarting webhook, a daily schedule (~03:00, prior day), and a manual Test trigger.
  • Runs on: A single brand, one day at a time.
  • Talks to: ShipHero GraphQL, Supabase, and an internal n8n webhook (self-restart pagination).

How it works

  1. Choose Trigger To Use normalizes the cursor and date: from the webhook body, or "yesterday" from the schedule.
  2. It pages ShipHero shipments by end-cursor; once run-index ≥ 149 it re-POSTs to its own webhook to restart, otherwise it waits and continues, advancing the date until a hardcoded stop date.
  3. Manual counter-loops iterate shipments, then packages, then line items.
  4. It looks up each package by Tracking_ID in Shipments and creates it if absent (service level, box dims, weight, label cost, warehouse link).
  5. It resolves the order, creates the Orders record, and links order to shipment.
  6. Per line item it finds or creates Shipment Line Items, links to the package, resolves or creates Product SKUs, links SKU to line item through _nc_m2m_6596wjr977, removes duplicates, and updates the shipped quantity.

Notes

  • Contains a hardcoded stop date of 2024-10-02 (the pull will not advance past it) and a leftover test node.
  • Single-brand design predating the multi-brand 2.0 flows. Its error workflow is Jb68QA5JyoPkR27O, not the shared handler.

On this page