[SalesForce] Automation Studio error: Automation cannot be Performed. Automation has been marked as deleted

I have an issue where I can no longer start an Automation using the Fuel SOAP API. This used to work but has stopped working and I'm wondering if it's working for anyone else.

I've created a new Automation with a Fire Event Activity and I can run the Automation successfully using the 'Run Once' button, but when I try to fire the event by bashing a cURL request:

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

And request.xml file contains the following request envelope (note that CustomerKey is the value of my Automation External Key):

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header>
     <fueloauth xmlns="http://exacttarget.com">insertAccessTokenHere</fueloauth>
   </soapenv:Header>
   <soapenv:Body>
      <PerformRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Action>start</Action>
         <Definitions>
            <Definition xsi:type="Automation">
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <CustomerKey>b2d4e590-3512-f8e4-5891-f8c767dfe043</CustomerKey>
            </Definition>
         </Definitions>
      </PerformRequestMsg>
   </soapenv:Body>
</soapenv:Envelope>

Then I receive the response:

<?xml version="1.0" encoding="utf-8"?>
<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">
    <soap:Header>
        <wsa:Action>PerformResponse</wsa:Action>
        <wsa:MessageID>urn:uuid:41be323c-98a3-4d5c-bb2f-6e97f7f538fe</wsa:MessageID>
        <wsa:RelatesTo>urn:uuid:c17517da-161a-47c8-a1d1-7d345c35dcf3</wsa:RelatesTo>
        <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
        <wsse:Security>
            <wsu:Timestamp wsu:Id="Timestamp-2a0d2e14-5027-4f9e-bdca-48540f9df0c1">
                <wsu:Created>2015-04-28T19:05:52Z</wsu:Created>
                <wsu:Expires>2015-04-28T19:10:52Z</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>
    </soap:Header>
    <soap:Body>
        <PerformResponseMsg
            xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <Results>
                <Result>
                    <StatusCode>Error</StatusCode>
                    <StatusMessage>Automation cannot be Performed. Automation has been marked as deleted.</StatusMessage>
                    <ErrorCode>355004</ErrorCode>
                </Result>
            </Results>
            <OverallStatus>Error</OverallStatus>
            <OverallStatusMessage />
            <RequestID>222c8883-7171-4acb-8454-7fd759696009</RequestID>
        </PerformResponseMsg>
    </soap:Body>
</soap:Envelope>

I'm not sure why this is occurring. I've tried with existing Automations and creating new Automations and get the same result each time. My SOAP endpoint is correct and I've even tried using legacy authentication, but I still get the same error. Can anyone reproduce this issue?

Best Answer

I generally see ObjectID used when performing/starting an Automation and not "CustomerKey". Can you confirm you've successfully used customer key in the past wtihout any issues?

To get the Object ID, the Automation object needs to be retrieved. The ProgramID property is specificed in the retrieve, but the ObjectID property is actually returned. Example of retrieving this info below:

<soap:Body> 
<RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"> 
<RetrieveRequest> 
<ObjectType>Automation</ObjectType> 
<Properties>ProgramID</Properties> 
<Properties>Name</Properties> 
<Filter xsi:type="SimpleFilterPart"> 
<Property>Name</Property> 
<SimpleOperator>equals</SimpleOperator> 
<Value>JeremyAutomation</Value> 
</Filter> 
</RetrieveRequest> 
</RetrieveRequestMsg> 
</soap:Body> 

SOAP Envelope for using the ObjectID would look similar to:

<soap:Body> 
<PerformRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"> 
<Action>start</Action> 
<Definitions> 
<Definition xsi:type="Automation"> 
<ObjectID>abc123-8874-4479-909b-abc123</ObjectID> 
</Definition> 
</Definitions> 
</PerformRequestMsg> 
</soap:Body> 
Related Topic