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