Solved

Image array in Event Data


Userlevel 1
Badge +3

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 

icon

Best answer by saulblum 1 May 2024, 13:45

View original

2 replies

Userlevel 5
Badge +7

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.

Userlevel 1
Badge +3

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. 

 

Reply