Advanced Query Help

Topic summary

A user sought to tag customers as “Abandoned” if they haven’t ordered in 120 days, working around Shopify Flow’s 90-day wait limit.

Initial Problem:

  • Created a scheduled daily Flow to query customers with no orders in 120+ days and without the “Abandoned” tag
  • The query returned no results despite qualifying customers existing
  • Three screenshots showed the Flow configuration and query setup

Solutions Provided:

  • tim_1 suggested using the “Customer joined a segment” trigger with a custom segment definition (included screenshot)
  • Original poster continued testing and successfully resolved the issue with modified query code

Resolution:

  • The user shared working code/configuration in a final screenshot for others facing similar challenges
  • Both the segment-based approach and the refined query method were validated as viable workarounds
Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Hello,

Since there is a 90 day limitation on the wait function in Flow, I’m trying to find a work around to tag customers as “Abandoned” if they haven’t placed an order in 120 days.

My idea is to create a scheduled flow that runs daily and pulls customer data for customers with no order in the last 120 days and are not already tagged “Abandoned”. However, when I test this its not pulling any data. Which it should, because we definitely have customers who haven’t ordered in the last 120 days and no customers were manually tagged Abandoned.

See below screenshots:

TIA!

Consider trigger “Customer joined a segment” and create a segment

Thanks for the suggestion!

I kept playing with it and got it to work. Below is the working coding in case anyone else is having similar issues.

@tim_1 offered a great workaround as well

1 Like