Solved

Custom back in stock missing product image

  • 26 April 2023
  • 4 replies
  • 95 views

Badge +1

I’m implementing a custom back in stock flow via API and the flow seems to work properly. However I don’t get an image from the catalog when creating the email. When previewing the email I have these variables connected to the event 

The item is obviously found in the catalog, I don’t send the name in the API call. When checking the catalog this product have an image. The price is for some reason set to null in the feed so that is not an error :). 

Anyone with an idea on what can be the issue? 

icon

Best answer by retention 26 April 2023, 20:23

View original

4 replies

Userlevel 7
Badge +57

Hi @daniellindstrom, welcome to the community.

If your implementation doesn’t pass in the image URL, you can try doing a catalog lookup in your Template with the ProductID value. 

Give this a try:

{% catalog event.ProductID %}

{{ catalog_item.featured_image.full.src }}

{% endcatalog %}

More information on referencing Catalog values is explained here:

Try that and let us know if it works.

Userlevel 7
Badge +44

@daniellindstrom what @retention said!  

But for completeness, I would also work with your developer to make sure that you're sending the right information to Klaviyo. Reason being, in some cases you might want to have the image of the specific product (color, size or something else) sent to Klaviyo which might not match the one in the catalog.

Regards,

Omar Lovert // Polaris Growth // Klaviyo Master Platinum Partner

We help with e-commerce growth through CRO, Klaviyo and CVO

Badge +1

Hi @daniellindstrom, welcome to the community.

If your implementation doesn’t pass in the image URL, you can try doing a catalog lookup in your Template with the ProductID value. 

Give this a try:

{% catalog event.ProductID %}

{{ catalog_item.featured_image.full.src }}

{% endcatalog %}

More information on referencing Catalog values is explained here:

Try that and let us know if it works.

This one worked great! Thanks! But will it be possible to pass more data with the out of stock backend api? At least it is not documented but I haven’t tried it :D 

Userlevel 7
Badge +36

Hi @daniellindstrom!

 

Per our Help Center article, this is the data that is available to reference inside of a {% catalog %} block:
 

 

If the item has any metadata (which will depend on how your store is setup), you can use the variable syntax to reference it: {{ catalog_item.metadata.color }}. In this case, the variable will pull in the "color" value associated with the item stored in the item's metadata.

 

I hope this helps!

- Brian

Reply