How can I filter orders by discount and include a wildcard?

Topic summary

A user seeks to filter Shopify orders by discount codes containing specific characters (e.g., “JULY” to match “JULY4TH” or “HOTJULYNIGHTS”). Standard wildcard syntax (*) does not work in Shopify’s native order filters.

Current Status: The issue remains unresolved within Shopify’s built-in admin interface.

Proposed Workarounds:

  • Export orders to CSV and apply wildcard filters in Excel/Google Sheets
  • Use third-party Shopify apps with advanced filtering capabilities that support partial/wildcard matching
  • Develop a custom solution using Shopify’s API to programmatically filter orders

Key Limitation: Shopify’s admin panel does not natively support wildcard or partial matching for discount code filters—only exact matches are possible through the standard interface.

One respondent referenced an existing community thread on filtering archived orders by discount code for additional context.

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

I need to filter orders by discount codes that contain a certain set of characters within the discount code. For example: Find all orders where the discount code contains “JULY”. It would include things like JULY4TH and HOTJULYNIGHTS. Basically, any order with a discount code that had those 4 letters in it somewhere.

I’ve tried using the standard * as a wildcard but not having any luck. I’m hoping it’s just a syntax thing that I am missing and not that Shopify only allows exact matches.

Thanks

1 Like

Based on your Question, this Discussion has already been made on the Shopify community. Can you please take your sometime to read this. I believe you will get your answer from here.

https://community.shopify.com/c/shopify-discussions/how-can-i-filter-archived-orders-by-discount-code-used/m-p/1603572

If this not helpful then get back to me. I would like to give you a solution.

Shopify’s built-in order filters are kinda limited and don’t support wildcards for discount codes directly. If you want to filter orders by discount code with a wildcard (like all codes starting with “SUMMER”), there’s no simple way in the admin.

What you can do:

  1. Export your orders as a CSV and filter in Excel or Google Sheets using wildcard filters.

  2. Use a Shopify app that offers advanced order filtering and searching — some apps support wildcard or partial matches on discount codes.

  3. Or build a custom app/script via Shopify API to fetch and filter orders exactly how you want.

So basically, Shopify admin doesn’t do wildcard filtering out of the box, but export + spreadsheet or apps can get you there.