Skip to main content

I’m trying to create a browse abandonment workflow and put in some kind of filter / trigger for products only over a certain value (probably $100). 

However, it appears that the Price and CompareAtPrice fields are text values and not numbers, so I can’t use a greater than option. 

What’s the best way to do this? 

 

 

 

Hi @fgroast ,

Thanks for sharing.

You are correct that the price sent via Shopify to Klaviyo for this event does not allow you to choose the options of "greater than" or "less than" for that price. This is due to the fact that the price is sent to Klaviyo as string data instead of number data and thus, it requires a singular value (such as equals 25). Unfortunately, the $value for the event is not truly available as a filter either at this time. 

One option for resolving is to make an adjustment to how your store processes the price to Klaviyo and this will allow you to register the product Price as number data instead of a string data type. This allows you to then filter your flow based on the price and also utilize the options of greater than or less than. To make this adjustment, please follow the steps located here: https://help.shopify.com/en/themes/liquid/filters/money-filters

If you do not want to make this adjustment, perhaps to ensure that any other events that process prices are not adversely affected, you can instead make an adjustment to the Viewed Product snippet within your product.liquid file. You will want to navigate into the product.liquid file and locate the Klaviyo Viewed Product event. Within the Viewed Product snippet in this file, add on an additional row to your snippet of: Price2: {{ product.price|money_without_currency|json }},

?name=inline1917580597.png

Adding this additional line will send over another price for the object that you can set as number data type within the trigger filter and then utilize the greater than or less than filter as seen below: 
?name=inline-1050209899.png
 


Excellent info, Alex. Thanks for that. this is exactly what I need. I appreciate it. 


Reply