Trigger email message
Use this interface to trigger email messages to existing members of a profile list.
REQUEST NOTES:
- You can send Responsys Email campaigns that already exist to up to 200 members of a profile list.
- Do not use system column names for the optional data, such as EMAIL_ADDRESS_. This may cause incorrect data to be processed, possibly resulting in skipped records and incorrect data being recorded in the Event table.
- You can also use the Trigger Email Message interface to trigger a proof launch. If you use Trigger Email Message for proof testing, any recipients you include must belong to the profile list associated with the campaign, even if the campaign has a proof/seed list attached. If you try to invoke Trigger Email Message for a recipient not from the proof/seed list, the system returns a RECIPIENT NOT FOUND error. Note that when the content is changed for the campaign, then a triggered launch will pick up the updated content within 10 minutes. Alternatively, you can use a scheduled launch to see the changes without the delay, and you can also use a scheduled launch if you want to proof test with your proof/seed list. For more details, see Schedule an Email or Push Campaign Launch.
- To pass extended/accented characters in optionalData payload, they must be escaped as Unicode characters. For example, the euro symbol € is escaped as \u20AC, the yen symbol ¥ is escaped as \u00A5, an ü is escaped as \u00FC, an é is escaped as \u00E9, and the like. Otherwise, you may receive an INVALID_REQUEST_CONTENT error.
- You can trigger a message for MD5 and SHA256 email hashes. Include emailMD5Hash and emailSHA256Hash as properties for the recipient to do so.
Service URL:
/rest/api/v1.3/campaigns/{campaignName}/email
Required Path Parameter:
campaignName
Request Method:
POST
Request Header:
Authorization=<AUTH_TOKEN>
Content-Type=application/json
Sample Request Body:
{
"recipientData" : [{
"recipient" : {
"customerId" : "1",
"emailAddress" : "foo.bar@oracle.com",
"listName" : {
"folderName" : "WS_REST_SAMPLE",
"objectName" : "wsrest"
},
"recipientId" : null,
"mobileNumber" : null,
"emailFormat" : "HTML_FORMAT"
},
"optionalData" : [{
"name" : "CUSTOM1",
"value" : "c1a_value_new"
}, {
"name" : "CUSTOM2",
"value" : "c2a_value_new"
}
]
}, {
"recipient" : {
"customerId" : "2",
"emailAddress" : null,
"listName" : {
"folderName" : "WS_REST_SAMPLE",
"objectName" : "wsrest"
},
"emailMD5Hash":"24bf8afff5b7205117bad27358cff79",
"emailSHA256Hash":"56f90d1f6a99f605043fdc5ec1384e1213a718e8259e7676e8e7ffb",
"recipientId" : null,
"mobileNumber" : null,
"emailFormat" : "TEXT_FORMAT"
},
"optionalData" : [{
"name" : "CUSTOM1",
"value" : "c1b_value_new"
}, {
"name" : "CUSTOM2",
"value" : "c2b_value_new"
}
]
}
]
}
Sample Response:
The response returns a status for each record sent in the request. In this example, email was sent successfully to the recipient whose RIID is 72067. For the second record, the trigger email action was not successful, because the recipient’s deliverability status was undeliverable.
[{
"errorMessage" : null,
"success" : true,
"recipientId" : 72067
}, {
"errorMessage" :” RECIPIENT_STATUS_UNDELIVERABLE: Recipient deliverability status is undeliverable ”,
"success" : false,
"recipientId" : -1
}
]