I’m trying to follow the example in this documentation when sending a transactional email
We are calling it like this using the Typescript SDK
await client.marketing.transactional.singleSendApi.sendEmail({
emailId,
message: { to: "hello@company.com" },
customProperties: {
exampleArray: [
{ firstKey: "someValue", secondKey: "anotherValue" },
{ firstKey: "value1", secondKey: "value2" },
],
},
})
I’ve attached a screenshot of the results I get. I expected to see a bulleted list as in the example but I don’t. Does anyone know why?
The last line is the result of adding the following to the programmable module
{{custom.exampleArray}}
Hey @ESmithNous , thank you for sharing your code snippet and context!
It looks like you’re on the right track with custom properties, but the issue might be with how the exampleArray is being rendered in the email template. To display it as a bulleted list, you might need to iterate over the array within the template itself.
Try using something like this in your programmable module to loop through exampleArray:
{% for item in custom.exampleArray %} - {{ item.firstKey }}: {{ item.secondKey }} {% endfor %}
This should help display each item as a list. Let us know if this resolves it. To our top experts @DEsteva and @Anton any other recommendation for @ESmithNous matter?
Thank you,
Pam