Skip to main content
Solved

Pulling out the name of the most expensive item in a sales order

  • July 2, 2021
  • 1 reply
  • 129 views

Forum|alt.badge.img+2

How can I pull the name of the most expensive product out using code?

Here's what I'm trying to achieve…

I want to create an email to gather reviews for the most expensive item in a sales order.

Say, John ordered three items:

  1. Item A: $200

  2. Item B: $500

  3. Item C: $100

I want John to review Item B (the most expensive product) by replying to the email.

The Ideal Outcome:

Hey John, would you be willing to give me a testimonial for {{ most expensive item in an order }}?

------------------------

Please let me know if this is possible. Thanks for your help!

Best answer by julie.accardo

Hi @ezreal,

 

Thanks for reaching out to the Klaviyo Community!

 

At this time we are unable to filter the products displayed based on the most expensive item in the order. You do have a few other custom display options:

  • Because items in an order are stored as lists, you do have the option to only display the first, second, etc item in an order. 
  • You could have a play around with django tags to apply if/else logic so that these emails only display items over a certain value. 

Both of the recommendations above would require custom work on the dynamic table blocks. If you need help configuring this, feel free to review our agency partners directory

 

Have a great weekend!

Julie

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

julie.accardo
Klaviyo Employee
Forum|alt.badge.img+36
  • Klaviyo Employee
  • 185 replies
  • Answer
  • July 3, 2021

Hi @ezreal,

 

Thanks for reaching out to the Klaviyo Community!

 

At this time we are unable to filter the products displayed based on the most expensive item in the order. You do have a few other custom display options:

  • Because items in an order are stored as lists, you do have the option to only display the first, second, etc item in an order. 
  • You could have a play around with django tags to apply if/else logic so that these emails only display items over a certain value. 

Both of the recommendations above would require custom work on the dynamic table blocks. If you need help configuring this, feel free to review our agency partners directory

 

Have a great weekend!

Julie