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:
-
Export your orders as a CSV and filter in Excel or Google Sheets using wildcard filters.
-
Use a Shopify app that offers advanced order filtering and searching — some apps support wildcard or partial matches on discount codes.
-
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.