When using the C# library and SOAP to retrieve an automation, the AutomationTasks property will always be null even though the SOAP envelop of the response actually contains the AutomationTasks Node.

Here is the code used to make the SOAP call:

RetrieveRequest rr = new RetrieveRequest(); rr.ObjectType = "Automation";

rr.Filter = new SimpleFilterPart()
    Property = "Name",
    SimpleOperator = SimpleOperators.equals,
    Value = new string[] { "automation name" } };

rr.Properties = new string[] { "*" };

status = soapclient.Retrieve(rr, out requestID, out results);

The SOAP envelop of the response will contain something like this:

        <PartnerKey xsi:nil="true"/>
        <ObjectID xsi:nil="true"/>
                <PartnerKey xsi:nil="true"/>
                <Name>The name of my query</Name>
                    <PartnerKey xsi:nil="true"/>
                    <ObjectID xsi:nil="true"/>

There seems to be a problem with the deserialization process.

Moreover, from the data contained in the response, I do not know how could one deduce the type of the activity (query, email, etc.).

Also, I could only obtain the AutomationTasks node when using an "*" in the RetrieveRequest.Properties field. I could not make it work by explicitly requesting the AutomationTasks field.


After a few tests, I discovered that only the Tasks of the automations I created using the API were in the SOAP envelop. In other words, if an automation was created using the marketing cloud application, the AutomationTasks node was empty.

Your Answer

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

Browse other questions tagged or ask your own question.