Skip to main content

I am creating a browse abandonment flow and I noticed that the wording for Gift cards and our bonus items, such as ten cent stickers, doesn’t read well when telling the person they should hurry before the stock is low. I could reword it, but I want to learn so in the future I can apply this knowledge. 

 

I had this text written{{ first_name|title|default:'Hey' }}, we noticed you were checking out this item--it's going fast, so grab it while we still have stock.}

 

Is there code I can apply so it says something different if they're looking at a gift card vs a physical item?

 

I tried {{ first_name|title|default:'Hey' }}, we noticed you were checking out this {{ event.Name }}{% if event.Name == 'Gift Card' %}--it's the perfect gift for any occasion{% else %}--it's going fast, so grab it while we still have stock{% endif %}. 

 

This did not work. It only showed (Name), we noticed you were checking out this --it's going fast, so grab it while we still have stock. Even with gift cards.

@emailchelsea123  Pretty sure you need to add event | lookup to your condition.

 

I usually use conditional blocks vs. if/else statements, so I’m sure someone with more experience will chime in here, but check out this documentation - it should clear it up for you. 

 

https://help.klaviyo.com/hc/en-us/articles/4408802648731#if-else-blocks13


@Jessica eCommerce Badassery are you saying like this

{{ first_name|title|default: 'Hey' }}, we noticed you were checking out this {{ event|lookup: 'ItemName' }}{% if event|lookup:: 'ItemName' == 'Gift Card' %}–it’s the perfect gift for any occasion{% else %}–it’s going fast, so grab it while we still have stock{% endif %}.

 

Can you see where I went wrong? It’s not working.


@emailchelsea123 Do you look at the documentation I linked you to? It has the proper syntax written out for you.  If should be part of the if statement. 

 

 


Reply