Happening now | Office Hours: Customizing Your Theme With Moeed | Ask your questions now!

Shopify flow to calculate order data

Shopify flow to calculate order data

PK2023
Explorer
56 1 11

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

Replies 2 (2)

SealSubs-Roan
Astronaut
938 70 90

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.

Roan
Please let me know if it works by marking it as a solution!
Seal Subscriptions App, a subscription app for Shopify, with glowing user testimonials and a free plan.

paul_n
Shopify Staff
1814 199 430

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)
Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.