I would like to substitute some variables in my email template using SFMC's REST API.
For example, in my email:
%%[Substitute_var1]%%
When I call it through REST, how it's possible to substitute this variable?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityI would like to substitute some variables in my email template using SFMC's REST API.
For example, in my email:
%%[Substitute_var1]%%
When I call it through REST, how it's possible to substitute this variable?
The REST call to send a triggered message does not provide the ability to update a data extension. It does allow you to update "send time attributes' for a subscriber, and those are passed in as the to:
section of the payload:
"To":{
"Address":"example1@example.com",
"SubscriberKey":"example1@example.com",
"ContactAttributes":{
"SubscriberAttributes":{
"Region":"West", //passed in at send time
"City":"Indianapolis", //passed in at send time
"Substitute_var1":"Value" //passed in at send time
}
}
}
These attributes for the subscriber will need to be created prior to sending.