Skip to main content
Solved

How do I use our in-house developed product recommendation?

  • October 10, 2022
  • 1 reply
  • 153 views

Forum|alt.badge.img+2

Hi,

 

We’re trying to develop a product recommendation algorithm by ourselves, and we would love to show the output in our emails. Does anybody know how we should do it using the Klaviyo API? In particular, we would love to have a widget in the email where the product is personalized for every email recipient, and the way it is personalized (e.g., which product/image to show) is decided by our in-house algorithm.

 

Thanks!

Best answer by David To

Hello @jhaochenz,

Welcome to the Klaviyo Community!

If you wanted to use your own product recommendation engine as opposed to our native one, you’ll want to use a combination of custom profile property tags and the catalog lookup tag. Through this combination, you can leverage our API to tag profiles/contacts with the product ID of the product recommendation that can then be pulled into an email template using the catalog lookup tag function. This would be similar to the instructions found in the Lookup an Item ID as a Custom Property subsection of the Overview of the Catalog Lookup Tag Help Center article.

When using our API to tag profiles, you can either tag a different profile property for each product such as “Product Recommendation 1 = 1234”, “Product Recommendation 2 = 5678”, etc; or you can just tag all of them in an array which you can iterate through via a table block. If you were sending each recommendation separately, you can use our new V3 Update Profiles API endpoint. Or, if you wanted to send the recommendations as an array, you could do this using the standard V2 Identify API endpoint.

After tagging is complete, all you’re left to do is pull those product recommendations in using the lookup function.

I hope this helps!

David

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

1 reply

David To
Klaviyo Employee
Forum|alt.badge.img+60
  • Klaviyo Employee
  • 2456 replies
  • Answer
  • October 11, 2022

Hello @jhaochenz,

Welcome to the Klaviyo Community!

If you wanted to use your own product recommendation engine as opposed to our native one, you’ll want to use a combination of custom profile property tags and the catalog lookup tag. Through this combination, you can leverage our API to tag profiles/contacts with the product ID of the product recommendation that can then be pulled into an email template using the catalog lookup tag function. This would be similar to the instructions found in the Lookup an Item ID as a Custom Property subsection of the Overview of the Catalog Lookup Tag Help Center article.

When using our API to tag profiles, you can either tag a different profile property for each product such as “Product Recommendation 1 = 1234”, “Product Recommendation 2 = 5678”, etc; or you can just tag all of them in an array which you can iterate through via a table block. If you were sending each recommendation separately, you can use our new V3 Update Profiles API endpoint. Or, if you wanted to send the recommendations as an array, you could do this using the standard V2 Identify API endpoint.

After tagging is complete, all you’re left to do is pull those product recommendations in using the lookup function.

I hope this helps!

David