Trying to get customers who's last order is more than 3 months ago

Topic summary

Goal: Automate tagging customers as “churned” (no purchase in last 90 days) using Shopify Flow’s Get customer data query.

Findings:

  • Using order_date with >= or > returns customers whose last order is after the date (works as expected).
  • Using order_date with <= or < returns unexpected results (includes very recent orders). Exact-date matching returns too many customers.
  • Confirmation from others via API/GraphiQL: “less than” comparisons don’t behave as expected.

Root cause (latest update):

  • order_date is direction-dependent: > or >= evaluates against the customer’s last order; < or <= evaluates against the customer’s first order. This causes the mismatch when trying to find “last order before X”.

Workarounds suggested:

  • Use Customers Segments (e.g., “haven’t ordered recently”) to build the list, then tag/export; Flow–Segments automation integration is being worked on.
  • Alternative Flow design: tag on each order, then remove the tag after 90 days if no new order.
  • Consider third‑party/app or external database if needed.

Status:

  • Not currently solvable purely in Flow via order_date <; defect has been passed to the API team. Thread considered resolved pending platform updates.
Summarized with AI on January 1. AI used: gpt-5.

Wouldn’t it make more sense to tag the customer as they order, then remove the tag after 3 months if they don’t order? That feels more like Flows style