I wonder if anyone know how to stop, publish changes and start a Trigger Send of MC via API.

I read the documentation about MC Rest API but i don't find anything, so I guess using a SOAP call could be done.

If anyone has done it before or has an example of an SOAP call to MC API, I really appreciate it!

I need this because I update a HTML Email Template that the trigger uses, and If you do not publishes the changes on the trigger send, then the trigger do not use the last template that was updated.




Yes, it is possible to update using SOAP. The TriggeredSendStatus controls the state so can be used to Pause(Inactive) and Start(Active). The RefreshContent property can be set to true in order to do a publish.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <wsse:Security soap:mustUnderstand="1">
         <wsse:UsernameToken wsu:Id="SecurityToken-962b99d2-0b2f-4f27-9c33-296a13973795">
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">ccc</wsse:Password>
      <UpdateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Objects xsi:type="TriggeredSendDefinition">
            <PartnerKey xsi:nil="true"/>
            <ObjectID xsi:nil="true"/>
| improve this answer | |
  • Thanks @Mac!, I will test that envelope. By the way, do yo have a link to some documentation showing an example about how to make a SOAP call to MC using Apex? I know how to use the REST API but I don't know much about the SOAP one. – Alvaro Sep 12 '18 at 15:56
  • I have only ever done REST calls from Apex so not sure about SOAP but I would assume it is possible. I would make sure when doing the POST to include the SOAPAction in the HTTP header. – Mac Sep 12 '18 at 16:05
  • Thanks fo the help, I was also looking at this post salesforce.stackexchange.com/questions/200593/… but when I make the SOAP request by Apex then the server responses with '<h1>596 Service Not Found</h1>'. I'm not sure if this endPoint is the right one: auth.exacttargetapis.com – Alvaro Sep 12 '18 at 18:33
  • List of SOAP endpoints can be found at: developer.salesforce.com/docs/… – Mac Sep 14 '18 at 14:25

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.