Why does this OR condition evaluate to false in Flow?

Hello folks, new here, and pretty new to Shopify.

I am at a loss as to why this condition in flow is evaluating to false?

Should the second condition not be true, making the whole condition true, or am I setting the second condition incorrectly for it to see the tags as empty?

1 Like

Hey Amzia,

Heddy from Gameball: Loyalty Program & VIP here!

Looking at the screenshot, it seems the “OR” condition might be evaluating to false because of how the conditions are structured. In Shopify Flow, if any one of the conditions isn’t formatted correctly or doesn’t match the exact field data you’re targeting, the entire “OR” condition could fail. Make sure each condition is independent, checking the exact data field values and formatting. Double-check that the fields you’re comparing are valid for the “OR” logic to apply correctly.

At least one of handles the null state in a weird way. Change it to use None of:

https://help.shopify.com/en/manual/shopify-flow/reference/conditions#does-not-include

Hi Amzia,

This happens when there are no tags on the customer. The list of customer tags is empty and so it is not true that “at least one of customer / tags” meets the conditions specified. Another approach would be to use “None of customer / tags” instead and update the conditions to be “includes”, change the “OR” to “AND”, and “not empty and exists”:

Make sure to update the “then” and “otherwise” branches based on the updated condition.

Thanks!

Ryan

1 Like

How I think about this type of condition:

  • If the list is null, the condition operators for each of the fields in the list have nothing to operate on, so they aren’t evaluated at all.
  • Instead the list operator is used (none of, at least one of, or all of). In the case of “at least one of”, if it gets a null then it’s false.

So using “None of” is the best approach if you are trying to check that a tag doesn’t exist. If the list if empty, it will return true. If the list has your tag, it will return false. Be careful not to use a double-negative.

FYI, this is documented here: https://help.shopify.com/en/manual/shopify-flow/reference/conditions#none-example

Thanks all, good advice.

The simplest solution for what I was trying to do seems to be this:

It’s accomplishing what I want to do. Cheers