- Grain: One row per (
sm_store_id,order_id): every valid order that was not cancelled. - Date field:
order_created_at. - Filters to start with:
order_fulfillment_status(fulfilled,partial,unfulfilled). - Joins: Join
obt_orderson (sm_store_id,order_id) for revenue, customer and marketing fields.
Which stores and orders have rows
Rows exist only for Shopify stores whose orders come entirely through SourceMedium’s own Shopify connection. Other stores have no rows, so an empty result means the store is not covered, not that every order shipped. Fulfilled orders stay in the table, so a covered store with nothing waiting still has rows. Orders Shopify marks as restocked or as needing no fulfillment are left out, and so are orders archived in Shopify before they were fully fulfilled. Orders archived after they shipped stay, so shipping times include them.Reading the columns
order_fulfillment_statuscovers the order’s lines that need fulfillment:fulfilledwhen all of them shipped,partialwhen some did,unfulfilledwhen none did.fulfillable_quantityis the units still waiting to ship. It is null when Shopify reports no quantity for a waiting line, so read null as unknown, not zero.first_fulfilled_at,first_in_transit_atandfirst_delivered_atall describe the order’s first successful fulfillment. For an order shipped in several parts, they describe the first part. Transit and delivery times appear only when Shopify reports them.orders_synced_atsays how current the store’s orders are: statuses reflect Shopify updates up to that time.
Example: orders waiting to ship
The same rulerpt_fulfillment_backlog_daily counts each day: unfulfilled or partly fulfilled, with units left to ship or an unknown number.

