Re: How to create an Order filter view for multiple tags?

Solved

How to create an Order filter view for multiple tags?

tchan122
Excursionist
16 0 7

When viewing a list of orders on Shopify Admin, there are filter views that you can create based on a certain filters. How can I write the tag value so that I can include orders that are tagged with "1st purchase" and ''Reactivation purchase"?

tchan122_0-1712547966417.png

 

Accepted Solution (1)
Sonya_2025
Shopify Partner
255 33 48

This is an accepted solution.

try this, it should work.

 

tag:'1st purchase' OR tag:'Reactivation purchase'

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME

View solution in original post

Replies 17 (17)

Sonya_2025
Shopify Partner
255 33 48

Hey, It is possible. please refer to this

I have a try using the way to query, it works.

Sonya_2025_0-1712565130258.png

 

 

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
tchan122
Excursionist
16 0 7

I can't get the same results. I've tried using OR, with quotes, brackets etc but no dice.

tchan122_0-1712565592368.png

tchan122_5-1712565731174.png

 

tchan122_6-1712565876352.png

 

 

 

 

Sonya_2025
Shopify Partner
255 33 48

You have input the keyword in a wrong place. Please try to input the keyword (1st purchase and Reactivation purchase ) in the search box.

the place I marked it out like below.

Sonya_2025_1-1712566591508.png

 

 

 

 

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
tchan122
Excursionist
16 0 7

Unfortunately, this doesn't work either.

tchan122_0-1712567610180.png

 

Sonya_2025
Shopify Partner
255 33 48

This is an accepted solution.

try this, it should work.

 

tag:'1st purchase' OR tag:'Reactivation purchase'

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
tchan122
Excursionist
16 0 7

Awesome, it works now.
Thanks for reply!

SebFrenchy
Excursionist
18 2 3

Hi @Sonya_2025 Do you think it is possible to use this method also for orders THAT DO NOT HAVE CERTAIN TAGS?

Your method works by sorting orders with certain tags, but we tried to sort orders that do not contain certain tags without_tag:'1st purchase' or notag:'1st purchase' But it does not work. Do you have any idea about this please? 🙏

tchan122
Excursionist
16 0 7

Hi @SebFrenchy , the way to do this is to have AND and '-' sign.

It would look something like this.

 

tag:'Tag you wan' AND -tag:'Tag you don't want'

 

Sonya_2025
Shopify Partner
255 33 48

Hey @SebFrenchy 

Yes, it is possible to achieve your needs.

you can try below query string to filter not include tag1 and also not include tag2.

 

-tag:'1st purchase' AND -tag:'1st purchase'

 

Hope this helps

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
SebFrenchy
Excursionist
18 2 3

It works perfectly! Thank you very much for the help. 😊

BM136
Excursionist
39 0 7

Hi Sonya_2025

 

This is exactly what I need and worked fine, but can't this search be saved?

Sonya_2025
Shopify Partner
255 33 48

I think the search can be saved. There is a 'Save as' button behind the search box

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME
BM136
Excursionist
39 0 7

Hi,

 

When I click save, any search criteria provided in the search bar removed. and the search saved only with conditions provided by filters list.

cpost
Shopify Partner
2 0 0

This does not work for me. All 'accepted' solutions in this thread are not functioning.

Sonya_2025
Shopify Partner
255 33 48

Hi @cpost 

It is case sensitive and also remove all unnecessary spaces. Hope this helps.

Please let me know if it works by giving it a Like or marking it as a solution!
Feel free to reach out. EMAIL ME  
Motivate me by  PAY ME

tjbiddle
Shopify Partner
4 0 1

Wanted to comment on this thread as the accepted solution and all other comments are just plain incorrect.

 

The original post asks how to save a filter (not just query) that includes multiple tags in combination (ie: ALL, not ANY; AND not OR)

 

Shopify seems to, at least currently (October 2024) not handle this very cleanly; but it is possible.

 

Write in your query: `tag:"firsttag","second tag", "third (tag)", "fourth:tag (and) (or)", "fifth-tag"`

 

Click save.

 

Of note - you'll see that these example tags are particularly complex with the parentheses, dashes, spaces, and colons. I recommend wrapping all your tags in quotes just to make sure it's processed correctly as otherwise the search query may not handle it well.

 

At this point; I would recommend to go ahead and find an order with all the tags you want to include as an example (Or add to them to make sure). And then I would recommend completely closing the tab and re-opening the orders page to make sure nothing is persisting and you can ensure it's working.

 

Go ahead and open the filter, and it should be working.

 

Now, the reason I say this is handled strangely by Shopify is because it does not enter all these into the "Tag" filter - it appears to instead save the search query, so if you go to edit it - it will look like:

 

tjbiddle_0-1730173715606.png

 

But - It works, so no complaints. Hope this helps everyone.

 

Also, of note; for anyone looking to exclude a tag - the correct process is to either preface it with `NOT` or `-` (eg: `NOT tag:"example"`, or `-tag:"example"`)

tjbiddle
Shopify Partner
4 0 1

Further building on this, if you're looking to exclude multiple tags, it will look similar to my above screenshot just with a - in front of each tag. Note though, that when doing this, in either case, "tag:" is not prefacing the tag. 

 

eg: ,"second tag, "third (tag)", "fourth:tag (and) (or)", "fifth-tag"

 

To exclude, eg: , -"some-tag", -"some-other-tag"