Skip to main content
Solved

How does Klaviyo handle boolean fields that aren't set?

  • August 11, 2023
  • 7 replies
  • 408 views

KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8

Hey all,

If we have a boolean profile property and it’s not set, does that evaluate to false?

If I wanted to create a conditional split in my flow for anyone where the boolean field is false or not set, do I need to add both “is false” and “is not set” or will “is false” suffice?

In dev terms, is “is false” a strict check (“===”) or a loose falsy check (“==”)

Let me know.

Thank you.

 

Best answer by KeviSunshine

@stem this is exactly what I’ve been doing to be safe, and I was just curious if it was necessary :)

Based on this convo, I believe it is necessary and that Klaviyo treats boolean checks as strict checks.

 

7 replies

stem
Problem Solver III
Forum|alt.badge.img+6
  • Problem Solver III
  • 20 replies
  • August 11, 2023

I’ve not run into this issue with a boolean yet, but I definitely add the appropriate “is not set” check for various numeric fields (some of which are effectively being used as T/F bits)

 

 


Jessica eCommerce Badassery
Partner
Forum|alt.badge.img+20

@KeviSunshine 

Profile properties don’t exist on all profiles, only the ones that it gets added to. So unless you’re actively updating users with False on that property, it just won’t exist. 

 

If memory serves, there isn’t actually a NOT SET option for boolean fields, so you’ll have to do the opposite. Look for the TRUE value on the split and then send the rest down the NO path. 

 


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Author
  • Expert Problem Solver III
  • 160 replies
  • August 11, 2023

>If memory serves, there isn’t actually a NOT SET option for boolean fields,

That is correct.

So I will need to do something like @stem is showing: “IS FALSE” OR “IS NOT SET”?


Jessica eCommerce Badassery
Partner
Forum|alt.badge.img+20

@KeviSunshine  Unfortunately, what @stem  is showing only works on certain fields. It does not work on Boolean fields. When you go to add the boolean profile property, the only options you’ll have are True or False. You can’t say IS NOT SET. 

 

So Instead, you’ll want your conditional split to say Boolean Field is TRUE. 

Then the emails you intend to send to the False group would be added to the NO path of the conditional split. 


stem
Problem Solver III
Forum|alt.badge.img+6
  • Problem Solver III
  • 20 replies
  • August 11, 2023

I get around the lack of “is not set” for other data types by checking as if it were TEXT. You can see that in my example. My segments are riddled with this.  Seems to work for date fields as well. Check against the dates that exist and then pretend it’s a TEXT and check “is not set”

In my mind the TEXT:IS NOT SET is used in contexts where I’d use IS NULL as a distinct check from NOT EQUAL.  


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Author
  • Expert Problem Solver III
  • 160 replies
  • Answer
  • August 11, 2023

@stem this is exactly what I’ve been doing to be safe, and I was just curious if it was necessary :)

Based on this convo, I believe it is necessary and that Klaviyo treats boolean checks as strict checks.

 


Jessica eCommerce Badassery
Partner
Forum|alt.badge.img+20

@stem Awesome, good to know - thanks! 

 

 @KeviSunshine Looks like you have two options here. Either include OR is NOT SET (Telling the condition that it’s a text based field instead of a Boolean) OR look for the true value and send your emails down the NO path.