Shopify Flow Condition Is Evaluating To True When False

Solved

Shopify Flow Condition Is Evaluating To True When False

AlewinePottery
Excursionist
13 0 4

I've been working on a flow to automate tagging for collections and am having a frustrating problem where one of the conditions is evaluating to true when it's clearly not. Support won't offer any help. The issue goes like this: I'm creating a flow for our merch, so I've selected that when inventory changes, see if the title includes "Hat", and if so, add a "merch" tag. We have a different product that has a color, "That's My Jam" and it's being tagged merch because "That's" contains "Hat". I don't know how to search for a specific phrase, so I've worked on a solution. I've set up another condition to check that the title does NOT include "That's"...but it's still evaluating as true. I'm not sure what I'm doing wrong. I've tried breaking up the conditions, thinking that maybe I'm not intended to have them in a list. I've also tried swapping the trigger to when a new product is added. All result in the same issue. The first condition shows as true: That's includes hat. Then for some reason, the second condition also shows true: That's My Jam does NOT include That's...which it obviously does.

Accepted Solutions (2)

Bob_
Explorer
69 13 12

This is an accepted solution.

Try adding a space after hat for the search condition, Not sure it'll work with flow but works with other software, if it's looking for "hat " then "that's" shouldn't trigger it as the hat in that is followed by a '

 

Won't work for titles ending in hat so another condition looking for " hat" for those may work.

.

View solution in original post

paul_n
Shopify Staff
1339 151 310

This is an accepted solution.

One of your conditions is likely messed up (likely the second). For us to help you need to post screenshots of what is in those conditions. 

 

That said, as you've found, string matching is tricky. Might it make sense to use product categories, types, or tags instead? 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.

View solution in original post

Replies 4 (4)

Bob_
Explorer
69 13 12

This is an accepted solution.

Try adding a space after hat for the search condition, Not sure it'll work with flow but works with other software, if it's looking for "hat " then "that's" shouldn't trigger it as the hat in that is followed by a '

 

Won't work for titles ending in hat so another condition looking for " hat" for those may work.

.
AlewinePottery
Excursionist
13 0 4

Still going to try to see what I was doing wrong (or other, better ways to accomplish the goal), but this worked for now. Thank you!

paul_n
Shopify Staff
1339 151 310

This is an accepted solution.

One of your conditions is likely messed up (likely the second). For us to help you need to post screenshots of what is in those conditions. 

 

That said, as you've found, string matching is tricky. Might it make sense to use product categories, types, or tags instead? 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
AlewinePottery
Excursionist
13 0 4

I'm going to try using product categories instead of titles. I think that'll work better.