1

I would like to retrieve the ProgramID/ObjectID of an automation in a Business Unit, but the "ClientIDs.ID" or "Client.ID" doesn't seem to work.

<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>
        <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <UsernameToken>
                <Username>###</Username>
                <Password>###</Password>
            </UsernameToken>
        </Security>
   </soapenv:Header>
   <soapenv:Body>
    <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI"> 
        <RetrieveRequest>
            <ClientIDs>
                <ID>123456</ID>
            </ClientIDs>
        <ObjectType>Automation</ObjectType> 
        <Properties>ProgramID</Properties> 
        <Properties>Name</Properties>
        <Properties>Status</Properties>
        <Properties>IsActive</Properties>
        <Properties>AutomationType</Properties>
        <Properties>ScheduledTime</Properties>
            <Filter xsi:type="SimpleFilterPart"> 
                <Property>Name</Property> 
                <SimpleOperator>equals</SimpleOperator> 
                <Value>MyAutomation</Value> 
            </Filter>
        <QueryAllAccounts>true</QueryAllAccounts>
        </RetrieveRequest>  
    </RetrieveRequestMsg> 
   </soapenv:Body>
</soapenv:Envelope>

I get the response: "No Rows were found".

Would anyone be able to help spot my mistake?

3
  • Automation object doesn’t have ProgramID properties. Could you recheck your code
    – Palash Rai
    Sep 16, 2015 at 3:32
  • Hi Palash, this is a bug in the API, because calling the ProgramID is the only way to retrieve the ObjectID value, which is used to perform the automation. Trying to retrieve the ObjectID results in an error: <Value>Invalid column name 'ObjectID'.</Value>. More info can be found here: salesforce.stackexchange.com/questions/73634/… Sep 16, 2015 at 7:19
  • Were you able to make this API work ? I am facing exactly same issue
    – Maneesh
    Jun 16, 2017 at 0:20

2 Answers 2

0

Do you mean you are trying to retrieve the ObjectID, not ProgramID?

I've documented the steps to retrieve the ObjectID (and start an Automation) on this page.

4
  • Hi Eliot, yes trying to retrieve the ObjectID via the ProgramID as per your page (thanks btw!). I'm having trouble retrieving from a specific Business Unit, you wouldn't by any chance know how? Sep 17, 2015 at 12:32
  • Try adding <ClientIDs><ID>InsertMID</ID></ClientIDs> within the <RetrieveRequest> element (for example, directly after that opening element), where InsertMID is the 7 digit MID associated with the Business Unit. Sep 18, 2015 at 7:10
  • Hi @EliotHarper, I am facing exact same issue. When trying to retrieve ObjectId of Automation from Child BU, it throws 'No rows were found'. <ClientID> tag also doesn't help. Do you have any other suggestion
    – Maneesh
    Jun 16, 2017 at 0:21
  • Are you using username/password Auth or OAuth credentials? Jun 16, 2017 at 0:29
0

The below call gets you the ObjectID of an Automation Program from a child BU. Just replace your BU MID and Program Name in the call below (along with username and password)

<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>
      <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
         <wsse:UsernameToken wsu:Id="UsernameToken-24440876" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsse:Username>xxxx</wsse:Username>
            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">yyyy</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <RetrieveRequest>
         <ClientIDs>
         <ID>12345</ID>
      </ClientIDs>
            <ObjectType>Program</ObjectType>
            <Properties>ObjectID</Properties>
            <Properties>Name</Properties>
            <Filter xsi:type="SimpleFilterPart">
               <Property>Name</Property>
               <SimpleOperator>equals</SimpleOperator>
               <Value>ABCDE</Value>
            </Filter>
         </RetrieveRequest>
      </RetrieveRequestMsg>
   </soapenv:Body>
</soapenv:Envelope>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .