I'm sending emails using the Java API TransmissionWithRecipientArray object against a template. I'm facing some problems with the substitution data. I have test this data in the template editor but I don't know how to introduce that substitution data using TransmissionWithRecipientArray.
Here is a sample:
(...), "offers": [
{
"description": "dddddddddddddddddd.",
"discount": "ddddddd",
"image": "ddddddddddddddddddddd",
"image_announcer": "dddddddddddddddddddddddddddd",
"alt_title": "dddddddddddddddddddddd",
"tracking": "dhsdjkhsdjksdh",
"name": "sdhsdohdsiosd",
"id": "8480515",
"announcer_paid": "0",
"announcer_image": "test",
"announcer_alt_title": "wdiohdiowdhiowd"
},
{
"description": "dddddddddddddddddd.",
"discount": "ddddddd",
"image": "ddddddddddddddddddddd",
"image_announcer": "dddddddddddddddddddddddddddd",
"alt_title": "dddddddddddddddddddddd",
"tracking": "dhsdjkhsdjksdh",
"name": "sdhsdohdsiosd",
"id": "8480515",
"announcer_paid": "0",
"announcer_image": "test",
"announcer_alt_title": "wdiohdiowdhiowd"
}, (...)
In other words the question is: What should we introduce in the method setSubstitutionData() to get this input as substitution data? We have validated the substitution data using the template editor.
transmission.setSubstitutionData(allSubstitutionData.asJava)
Mandatory HTML:
{{offers[1].description}}