How can I filter my Shopify orders based on the refund date?

Since it's possible for a Shopify order to have multiple refund transactions, this gets a bit more complicated as we'll need to parse a list of transactions and pull out the most recent refund transaction.

To make this easier, what we did with EZ Exporter is we provided a pre-set field that already applied this logic called Last Refund Date which we can then filter by just like a standard date/time field.

In the Filters section, you'd want to first set these primary filters:

  • Payment status: Partially Refunded or Refunded
  • Created: Any

Then in the Custom Filters, you can add a filter like this to filter the data further based on the last refund date:

  • Last Refund Date is greater than or equal to 2021-06-15

Here's a screenshot of what this looks like in the app:

Filter Shopify orders by refund date

If you need to filter relative to the current date, you can use the {{ current_date }} variable.  For example, to only include orders refunded the previous day, you would configure the Custom Filters like this:

Data must match: all conditions

  • Last Refund Date is greater than or equal to {{ current_date }} - 1
  • Last Refund Date is less than {{ current_date }}

The part where it says " - 1" subtracts 1 day from the current date.  Note that spaces matter here, so make sure there's a single space in between the characters when subtracting days.


Related Articles:


App: EZ Exporter

Tags: refunds, advanced features