Solved

Customizing product data feed

  • 25 May 2021
  • 5 replies
  • 1077 views

Badge +3

I’m looking for customise a product data feed to use either the 2nd or last product image. It doesn’t look like the ‘Product Block’ allows this kind of customisation so I was wondering if there was a way to use a data feed in a Table Block.

 

For example, if the feed was called ‘VIEW_PRODUCTS’, could I use this for a table’s data source? eg.
And if this is possible, how do I preview the data response so I know what data objects I can use?
 

 

icon

Best answer by Dov 26 May 2021, 15:15

View original

5 replies

Userlevel 7
Badge +61

Hello @TheSuburbs,

Thanks so much for sharing your question with the Klaviyo Community.

You are correct, we cannot customize product blocks to display anything other than the primary image.

Also, that is not quite the way that feeds work. We have an entire guide dedicated to adding a custom web feed to an email, including how to preview your web feed. If the external URL includes alternative images, this is where you would pull them from. Using a table block is the most popular option to display custom feeds because of its ability  to display images alongside text.

Alternatively, there is a previous post in the Community (linked below) containing a snippet of code you can use to display secondary images for Klaviyo flows triggered off of a Shopify event using a table block. For example, for your Abandoned Cart or Order Confirmation flow:

 

Thanks and have a great day.

Badge +3

Thanks for the help so far @dov.derin . I think the Klaviyo Product feed would be preferable over a web feed so we can show products relevant to the customer.

 

So the question would be how do we access that feed data in a table. That article you’ve referenced is related to the flow event data, but I’m not sure how to pull a product feed’s data into the table?

 

Also the feed preview seems to only be available on web feeds. The Klaviyo Product feed only has the option to edit (no preview) so if I was able to use the product feed in the table, I’m still not sure what data objects the feed contains:

 

 

Userlevel 7
Badge +61

Hi @TheSuburbs,

Thank you for your follow-up note.

Apologies if it wasn’t clear in the original post, however, Klaviyo won’t be able to pull in items from a product feed into a table block. The only way to populate data through a table block is to either use a web feed or use event-variables in the flow email. This was the rationale behind my original suggestions. Moreover, displaying a secondary image (your original goal) can only be achieved through one of these two methods (web feed or event-variables). For instructions on displaying a secondary image using event-variables, you’ll want to look at the thread I linked in my previous reply. It contains the code you need to achieve this.

I hope that helps!

Badge +1

Hello Team,

One of our client want to add custom feed from our API to klavio. Can you provide us sample JSON format in which we need to provide required feed. 

Thank You!!

Userlevel 7
Badge +58

Hi @varstreet.pravin,

Thanks for inquiring about working with custom feeds and API for Klaviyo. 

In order for the mapping step of the catalog setup to work, some required fields must be included for each item in the feed:

● Unique ID ($id): can be text, numeric, or alphanumeric, but must be unique

● Title ($title): the name of the item

● URL ($link): the website at which a person can find this item

● Image URL ($image_link): a URL at which the image for this item is hosted

● Description ($description): a text description of the item. Note: The Unique ID of an item in the feed must match the item ID included in the metric on which you want to base personalized recommendations. 

 In addition to the required fields above, we also recommend passing the following optional mappable fields:

● Price ($price): numeric item price, no currency symbol

● Categories (categories): comma-separated list/array of categories, tags, or collections associated with an item


To view other examples, I’d recommend viewing our Getting Started with API doc as well as the Guide to Adding a Custom Web Feed in an Email article. We also have a good amount of community members writing about different areas they’ve run into regarding custom feeds and API I would look into as you come across other problems!

Hope this helped!
Alex

Reply