National Commerce Docs
n8n flows

Get Order Details (Debug)

Inactive debug tool for reconciling orders and shipments between ShipHero and Supabase, linking and cleaning up records.

An ad-hoc debug and data-repair tool for reconciling orders and shipments between ShipHero and Supabase: backfilling the store link on orphaned shipments, linking shipments to their orders, and cleaning up voided shipments.

At a glance

  • Status: Inactive
  • Trigger: Manual ("When clicking 'Test workflow'"). No production trigger.
  • Runs on: Hand-run debugging and cleanup only.
  • Talks to: ShipHero (GraphQL, orders and shipments); Supabase (Shipments, Orders, Stores, Brands).

How it works

  1. Get Shipments With No Orders reads Supabase Shipments where store IS null, then loops over them.
  2. Per shipment, Get Brand For Shipment supplies the ShipHero token and Get Shipments For The Order queries ShipHero by tracking number.
  3. If1 (total_count > 0) finds the matching Orders row and Link Order And Shipment sets Orders_id.
  4. A separate branch backfills the store field on Orders by matching shop_name against the Stores table.
  5. Another branch works from a hardcoded array of order IDs, plus a voided-shipment cleanup path (Delete Voided Shipment).

Notes

  • Inactive debug scenario.
  • Contains a hardcoded ShipHero Bearer JWT and a hardcoded list of order IDs.
  • Several branches are dead-ended.

On this page