Month to date order count in Shopify Flow

Topic summary

A merchant needs to track monthly order counts in Shopify Flow to automatically tag orders once 250 orders are reached, helping avoid app fee increases.

Initial Challenge:

  • Flow’s “Get order data” action is limited to 100 orders at a time
  • No built-in month-to-date order counting functionality

Proposed Solutions:

  1. Shop Metafield Approach: Create a metafield that increments with each new order and resets monthly. Challenge: tracking month-to-month rollover.

  2. Daily Count Method: Run “Get order data” daily to retrieve counts and update metafields/tags accordingly.

  3. Third-Party Solution (Flow Companion app):

    • Use “Execute GraphQL request” action with ordersCount query
    • Filter orders by date range (first day of month to current date)
    • Parse response using “Run code” action to extract count
    • Includes code snippets for GraphQL query and JavaScript parsing

Status: The original issue is resolved (no longer needed), though the merchant has moved on to a different Flow challenge involving metafield calculations.

Summarized with AI on October 26. AI used: claude-sonnet-4-5-20250929.

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:

  • Every day
  • Get order data
  • Count(order data)
  • If count > 1
    • Update metafield with count
1 Like

Thanks @paul_n , will give that one a try!

Hi,

Thanks! Looks very interesting. This specific workflow is not needed anymore, but perhaps your tool can help with the following case?

Calculate sum of metafield for all line items using Shopify Flow - Shopify / Shopify Plus - Shopify Community

Best,

Monne

1 Like