If I want Salesforce events (such as status change on a custom object) to send Exact Target emails, looks like ExactTarget Triggered Emails are the way to go. As I understand it, ExactTarget Triggered Emails are triggered by a call to the ET API.

However searching around it seems that its not very easy to call the ET SOAP API from Apex. Apparently the recommend approach is to build an in-the-middle web service in .NET or something, and then go:

Apex -> in-the-middle web service -> Exact Target API

Is that still the case or does the new ExactTarget REST API make it possible to call ET directly from Apex code? In which case, is there an example somewhere?


In order to use SOAP services - that is the current workaround. To perform triggered sends, there is a REST route for that. Create the triggered send definition in the exacttarget account first, then use the following:


    "From": {
        "Address": "code@exacttarget.com",
        "Name": "Code@"
    "To": {
        "Address": "example@example.com",
        "SubscriberKey": "example@example.com",
        "ContactAttributes": {
            "SubscriberAttributes": {
                "Region": "West",
                "City": "Indianapolis",
                "State": "IN"
| improve this answer | |
  • Thanks. And then I could call that from Apex by adding the root url to Remote Site Settings and then using Apex code to build a string of the JSON and sending it with an HttpRequest? – codeulike Feb 5 '14 at 12:31
  • Yes. You will need to add x-headers as well to authenticate. That most likely should be a separate questions though. – Kelly J Andrews Feb 5 '14 at 12:35
  • Kelly is correct, but according to the ET documentation the triggered send via the ET REST API is only available for e-mails with a transactional classification. – SF1Dev Jul 21 '14 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.