Skip to main content
Solved

Show / Hide Logic with Event Properties - Using Tags or Brand

  • 12 July 2024
  • 2 replies
  • 58 views

Hi there, 

I’m attempting to create various Show / Hide logic blocks within my Abandonment Flows. Usually I don’t have a problem but as I’ve attempted more complex logic, I can’t get the syntax or the blocks working correctly. For context. we’re using a Shopify Integration.

I would like to Show a block when the event (in this instance, Abandoned Cart) has free shipping available only. As we tag these products in Shopify (and Klaviyo can see these tags) I assumed that I could do this by using the following: event|lookup:'Tag' == 'SHIPPING - £0' 

The syntax is correct (so far as Klaviyo doesn’t seem to see an error), but the block doesn’t show in the preview despite the logic being true. The tags are correct too, down to the capitalisation and the spacing.

Likewise, I attempted to use Brand instead of Tags, because I wondered if Klaviyo only looked at the first few tags rather than the full list and tried: event|lookup:'Brand' == 'Prada'
but the same is true as above, the syntax is correct but nothing shows in the preview. 

Thanks in advance!

2 replies

Userlevel 7
Badge +60

Hi there @tombeau

 

Thanks for sharing your question with the Community! 

 

I know some of our Champions have great experience with utilizing Shopify tags - @DavidV @bluesnapper any thoughts here?

 

Thanks for participating in the Community!

-Taylor 

Userlevel 7
Badge +41

Hi @tombeau and thanks for the shoutout @Taylor Tarpley 

A Shopify product tag is stored as an array (list data type) as it can contain more than one value, so the display logic needs to be ‘in’ i.e it is contained in the tag.

For a Shopify abandoned checkout, that product tag is in the event property  
{{ event.extra.line_items.0.product.tags }}.

So the display logic condition to show the block only when that product tag has SHIPPING - £0, use the following logic: "SHIPPING - £0" in event.extra.line_items.0.product.tags

That works for me for my tags; let me know if that works for you, too.

Regards

Andy

Reply