Solution Recipe 19: Simplified Custom Product Blocks
Solution Recipes are tutorials to achieve specific objectives in Klaviyo. They can also help you master Klaviyo, learn new third-party technologies, and come up with creative ideas. They are written mainly for developers & technically-advanced users.
Note: We do our best to make sure any code and API references are accurate and current when this is published, but you might need to update code and it’s always a best practice to leverage our latest API versions. If you have questions, feel free to hop over to our Developer Community.
How to build custom product blocks using the drag and drop editor sourcing product data from Klaviyo product recommendations engine, and as a bonus, Google Sheets.
Klaviyo products blocks provide the ability to quickly add products to an email. However, they can be limiting in many use cases as the standard block is not extensible. This solution provides email marketers with the ability to build custom blocks utilising all product metadata, including brand, sale price, descriptions, any additional product images and localisation data.
Easy to moderate
Introduction
Klaviyo offers an out of the box Product Block available within the Klaviyo email editor. While this offers a fantastic way to add product data to an email, it is limited to the following product fields only:
- Name
- Price
- Main Image
- Link
Additionally, the product block is limited to styling edits only, layout changes are not possible.
Many retailers would like to extend this product block functionality to make use of additional product metadata that maybe passed in to the product catalog. Commonly, these include:
- Sale price
- Brand
- Description
- Additional product images
- Product translations
This solution will show how you can build custom product blocks utilising Klaviyo’s AI driven product recommendation feeds. As a bonus, this guide will also show how you can hook up your product block with a Google Sheet to provide a source for manually created product feeds.
Challenge
Traditionally, customisation of the products would require a custom product block where advanced CSS and HTML knowledge is required. This option is still available for marketers who wish to retain full control of the HTML/CSS (see guide here)
This article will show how email marketers can build the custom product block using the drag and drop elements available, with no HTML or CSS knowledge required.
Ingredients
- Product Catalog
- Product Feeds configured
BONUS Requirements:
- Napkin.io Account
- Google Sheets
Instructions
1. Create a product feed.
Product feeds take in data from your product catalog and customer behavior (e.g., the products they’ve viewed or purchased in the past) and use this information to provide custom product recommendations for your subscribers. How to use product feeds and recommendations
To create a feed, simply:
- In Klaviyo, select Content in the left hand menu.
- In the dropdown, click Products.
- In the upper right, click Manage Product Feeds, then click Create Product Feed.
- Set up the conditions & rules for your product feed.
- Make a note of the product feed name your used.
Full instructions can be found here: Configure a product feed.
2. Build your custom product block
We will need to now add a section that repeats for every product in the recommended product feed. This section will perform a catalog lookup