Browse Abandonment Flow for products over $n

  • 24 February 2023
  • 2 replies

Badge +1

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? 





Best answer by alex.hong 24 February 2023, 21:25

View original

2 replies

Userlevel 7
Badge +58

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:

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 }},


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: 

Badge +1

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