What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Query fulfillments by sku and date for forecasting

Query fulfillments by sku and date for forecasting

shakervalley
Shopify Partner
3 0 0

Hi,

 

I'm working on production forecasting and would like to loop through and total daily fulfillments by SKU. Right now I'm doing so by querying Orders on created_at and sku, then accessing the lineItems and fulfillments arrays. However, because the time between order and fulfillment is unknown in advance and could be large in edge cases, this requires an overly expansive date range in the Orders query to capture fulfillments for a single day.

 

Is it possible to query fulfillments more directly by sku and created_at? I don't see that ability in fulfillmentOrders, for example, but perhaps it exists elsewhere?

 

Thank you!

Replies 0 (0)