0

How to create automation folder through soap api.i used below code for creating automation folder but i am getting error. how to achieve this requirement could you please give clear info about folder creation.

     <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Header>
    <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
      <UsernameToken>
                <Username>testuser@sfmc.com</Username>
           <Password>Test@93</Password>
      </UsernameToken>
    </Security>
  </Header>
<Body>
    <CreateRequest xmlns="http://exacttarget.com/wsdl/partnerAPI">
       <Options/>
            <ns2:Objects
                xmlns:ns2="http://exacttarget.com/wsdl/partnerAPI"
                xsi:type="ns2:DataFolder">
                <ns2:ModifiedDate
                 xsi:nil="true"/>
                <ns2:ObjectID
                 xsi:nil="true"/>
                <ns2:CustomerKey>AppData_Feb21</ns2:CustomerKey>
                <ns2:ParentFolder>
                    <ns2:ModifiedDate
                     xsi:nil="true"/>
                    <ns2:ID>52646</ns2:ID>
                    <ns2:ObjectID
                     xsi:nil="true"/>
                </ns2:ParentFolder>
                <ns2:Name>AppData_Feb21</ns2:Name>
                <ns2:Description>AppData_Feb21</ns2:Description>
                <ns2:ContentType>automations</ns2:ContentType>
                <ns2:IsActive>true</ns2:IsActive>
                <ns2:IsEditable>true</ns2:IsEditable>
                <ns2:AllowChildren>true</ns2:AllowChildren>
            </ns2:Objects>
    </CreateRequest>
</Body>
</Envelope>

**Response With an error:**

<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>CreateResponse</wsa:Action>
      <wsa:MessageID>urn:uuid:ba71fe6f-a5c4-423b-b32b-de56ece46cc7</wsa:MessageID>
      <wsa:RelatesTo>urn:uuid:590f9e6d-5071-4b5a-aca9-b1f1cc18aec9</wsa:RelatesTo>
      <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
      <wsse:Security>
         <wsu:Timestamp wsu:Id="Timestamp-9b74e8b8-4368-4ae4-80c1-eb128c5f064e">
            <wsu:Created>2018-02-21T09:08:29Z</wsu:Created>
            <wsu:Expires>2018-02-21T09:13:29Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <CreateResponse xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Results>
            <StatusCode>Error</StatusCode>
            <StatusMessage>"automations" is not a valid Folder ContentType.</StatusMessage>
            <OrdinalID>0</OrdinalID>
            <ErrorCode>396005</ErrorCode>
            <NewID>0</NewID>
         </Results>
         <RequestID>211f93c6-455f-400a-a5de-d64a9f7cf575</RequestID>
         <OverallStatus>Error</OverallStatus>
      </CreateResponse>
   </soap:Body>
</soap:Envelope>
  • Before iam asking same quetion but i am not gave to clear data about before quetion it's my mistake. now please check and how to achieve this requirement. – UserSFMC Feb 21 '18 at 9:20
  • Could you please help me for this question. – UserSFMC Mar 1 '18 at 6:38
1

ContentType "automations" seem not to be a valid content type. Although it is listed in the official SOAP API documentation. But ContentType "automations" is missing in the Marketing SDK documentation.

1

This is a known bug. The documentation even leads you to believe that this is possible. I opened a help ticket for this reason and it IS elevated to the highest possible priority. I get an ongoing weekly update. I was told that SFMC never implemented this for Automation Studio so at this time it is not possible. You can retrieve the folder info using that ContentType but you cannot create one. I have been pushing for SF to fix this bug.

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.