I have struggling to get the SOAP API work to start the Automation Program. Below is the call I am using. It is returning OK status but the program doesn't start.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"        
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-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-4c1eed3b-75ee-4d19-8712-731028aaad77">
        <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxx</wsse:Password>
  <PerformRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI ">
 <Definition xmlns:p0="http://exacttarget.com/wsdl/partnerAPI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="p0:Automation">

This SOAP request is 100% correct.

I'm guessing that you are not using Perform as the SOAP Action verb in your header. You can include this in the header, e.g.:

curl -XPOST -H "Content-type: text/xml; charset=utf-8" -H "SOAPAction: Perform" -d @request.xml https://webservice.s?.exacttarget.com/Service.asmx

Alternatively, you can omit the Action from the header and include in your SOAP envelope. Refer to example below.

Important: In the SOAP request below, replace .s?. with your instance name. e.g. .s7.

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <a:Action s:mustUnderstand="1">Perform</a:Action>
      <a:To s:mustUnderstand="1">https://webservice.s?.exacttarget.com/Service.asmx</a:To>
      <o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <PerformRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
                <Definition xsi:type="Automation">
| improve this answer | |
  • Hi @Eliot, I am using Action as Perform in Header. Also I tried using your envelope (after making all the necessary edits) but it gives me "Bad Request". Also, in my original envelope, when I put any random ObjectID, it still gives me OK message. I think its just not hitting SFMC. Did my envelope work for you? – Maneesh Sep 9 '16 at 10:57
  • Sorry about the Bad Request, I've updated my code and you should be fine now. Regarding the 'OK' message, did the response envelope include <StatusMessage>Performed Activity</StatusMessage>? If not, the Activity would not have run. Check that you can start the automation (using Run Once) as the same user that you are authenticating with, could be a permissions issue. – Eliot Harper Sep 10 '16 at 4:33
  • Tried that but erroring again with the messae "Automation cannot be Performed. Automation has been marked as deleted." I am able to run from the UI. Except the User/Pwd/Instance, anything else I should be replacing in the call? – Maneesh Sep 12 '16 at 2:19
  • My guess is that you are using the Automation CustomerKey, not ObjectID. You will need to retrieve the ObjectID for the Automation first. I've documented the procedure here. – Eliot Harper Sep 12 '16 at 2:49

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.