Shopify’s purchase orders have been readable from the Admin API since version 2026-10 (inventoryPurchaseOrders). Before that they were preview-only. I built a small workflow on it that emails one morning list: shipments that are overdue, arriving this week, partly received, and POs the supplier hasn’t shipped yet.
How it works (11 nodes + an error alert)
Schedule → Settings → HTTP Request (Shopify OAuth2 credential, GraphQL) → Code (collect page) → IF (more pages? loops back through a Wait that only pauses when Shopify’s cost bucket runs low) → Code (sort) → Switch (email / optional Google Sheet).
The query, with status filter and everything needed for the four lists:
query($after: String) {
inventoryPurchaseOrders(first: 50, after: $after, query: "status:ORDERED") {
pageInfo { hasNextPage endCursor }
nodes {
id name orderedAt origin { supplierName } destination { name }
lineItems(first: 50) { nodes { title variantTitle totalQuantity } }
transfers(first: 10) { nodes {
totalQuantity receivedQuantity
shipments(first: 10) { nodes {
status dateReceived
tracking { arrivesAt company trackingNumber trackingUrl }
} }
} }
}
}
}
The expected date lives on the shipment (tracking.arrivesAt), not on the PO. Overdue = a shipment IN_TRANSIT or PARTIALLY_RECEIVED whose arrivesAt is before today; “not shipped” = no shipment in those states or RECEIVED. Fully received POs (received ≥ ordered) are skipped.
Things that cost me time
- Three scopes, not one:
read_inventory_purchase_orders,read_inventory_transfersandread_inventory_shipments. Without the last one the query fails atshipmentswith “Access denied for shipments field.” - “Oauth error failed_grant_with_invalid_scopes” when installing the app, although all scope names are valid. The cause was “Use legacy install flow” being on in the app version (Dev Dashboard). It rejected these newer scopes; with it off, the install went through.
InventoryPurchaseOrderLineItemhas noproductVariantfield. UseinventoryItem { variant { id } }if you need to match PO lines to orders.- The admin link to a PO is
https://admin.shopify.com/store/<shop>/purchase_orders/<numeric id from the gid>.
A replay of real runs on a test store (report email, tracking, partly received): Incoming Stock Tracker Pro live demo · TrenoxaHQ
Happy to share the workflow JSON or answer questions on the purchase order / transfer / shipment model.