Shopify flow to calculate order data

Hi,

I am tying to have a weekly summary of orders to be sent internally within our organisation.

Since Shopify limits the getOrderData to max 100 orders and we have definitely more than 100 orders a week the flow doesn’t work.

Is there a workaround for this?

My idea is to fetch order data for the past week and then send email of total number of orders, then separate how many orders with tag “X” etc

1 Like

Unfortunately, the Shopify API only allows 100 order fetches per request; however, you can work around this by utilizing pagination and the page_info cursor. You can loop over all of the orders from the previous week using pages. After that, you may generate an internal email report by breaking out the total number of orders in this or similar filters (such as “X”) and clicking “Send.” Scripts or automation platforms like Zapier or Make can be used to write the logic in a flow, whether it’s a custom app or a flow solution like Shopify Flow.

You could just store the data in a metafield and then once a week send that data out.

Something like:

  • Order created
  • Update shop metafield (increment the number stored)

In a second workflow

  • Every week
  • Send email (with shop metafield data)
  • Update shop metafield (clear it back to 0)
1 Like

I will try this one! Thanks :slightly_smiling_face: