0

By skimming through the Marketing Cloud doc related to the REST API (https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/messageDefinitionSends.htm) exposed to send a transactional email it seems not possible to pass custom data to populate the related email template.

On the other hand the SOAP API seems to expose this functionality (https://developer.salesforce.com/docs/atlas.en-us.mc-programmatic-content.meta/mc-programmatic-content/passContent.htm)

Is the REST API really limited to more basic functionalities?

1 Answer 1

0

You can populate custom data to related email template via REST API. Difference is that it will populate Profile Attribute not a Data Extension Field. Profile Attributes are tied to subsriber via one-to-one relationship so this can be troublesome if you plan to send multiple triggered emails to the same subscriber in short amount of time. Best way I found to personalise REST API Triggered Email is to:

  1. Create a Profile Attribute to store triggered email personalisation in a JSON string format.
  2. Make a REST API call and pass that JSON string in To.ContactAttributes.SubscriberAttributes
  3. Use SSJS function ParseJSON() to get that data and personalise the message.

However this is a lot of work that can be simply skiped by using SOAP. I'd suggest you stick to SOAP if possible, if not use above workaround.

1
  • Ok perfect, thanks a lot, I'll try to stick to the SOAP API :) Jun 22, 2018 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .