Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
How can I calculate the month-to-date order count in Shopify Flow and use this as a condition?
Context: we have apps with big fee hikes for monthly order count > 250. However, we can exclude orders from that count if we apply a specific tag to them. Therefore, whenever the month to date order count equals 250, we want to start tagging orders. Obviously, at the start of the month, the tagging should stop again.
Example workflow:
[trigger] order created
-> [condition] if month to date order count > 250
-> if true [action] add order tag
I'm not sure there is an easy way to do that currently, since Flow's "Get order data" action is limited to 100 at a time. You could instead create a shop metafield that you increment for each new order that month. The hard part is tracking the rollover from month to month. Another option would be to run "Get order data" daily to get the daily count and then set the metafield/tag based on that count.
Something like: