Skip to main content
Solved

Image array in Event Data

  • May 1, 2024
  • 2 replies
  • 75 views

Forum|alt.badge.img+5
  • Problem Solver III
  • 39 replies

Hey All,

wondering if I can send multiple image URLS on the. view product event, and if so would it be an array?

 

Cheers

 

Chris 

Best answer by saulblum

You could create a custom Viewed Product script snippet and send in an array in the JSON body, and then, say, iterate through that array in an email template, or access only certain indices of it.

2 replies

Forum|alt.badge.img+7
  • Klaviyo Employee
  • 182 replies
  • Answer
  • May 1, 2024

You could create a custom Viewed Product script snippet and send in an array in the JSON body, and then, say, iterate through that array in an email template, or access only certain indices of it.


Forum|alt.badge.img+5
  • Author
  • Problem Solver III
  • 39 replies
  • May 1, 2024

Hey Saulblum, 

 

Thanks for your response. 

I think its worth doing. I see no reason why I cant send an array and then just reference [0] on the main image, if I don’t set a featured_image in the payload. 

 

Looks like arrays are supported in the payload natively.