How to get daily revenue total using Flow?

dccheng
Tourist
7 0 2

Hi,

I'm trying to use Flow to schedule and push daily revenue to the same Google sheet as a new row. 

 

Only way I see this working is using Get order data and Sum up the Return Data list and then push the total to the google sheet.  Only problem is that Get order data has a maximum of 100 orders.  

 

Is there a more direct way to get a daily revenue number from the previous day on a schedule?

Would appreciate any advice.

Thanks,

David

Reply 1 (1)

paul_n
Shopify Staff
1012 133 243

That might be the best approach right now but obviously the 100 limit can be a problem. We are looking to increase that limit but it's not close yet.

 

You could probably solve this now by using a Shop metafield to store the values of the order that day. Something like:

 

  1. Order created
  2. Update shop metafield with order value + current value

Then have a second workflow that runs once a day:

  1. Scheduled time trigger
  2. Send data to Google Sheets
  3. Update metafield value back to 0.

This could miss orders created in the moment the workflow was running but that would be pretty rare unless you have very high volume

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.