[SalesForce] How to use ExactTarget SOAP API to only retrieve real Data Extensions

We would like to retrieve the list of available Data Extensions in ExactTarget. I'm currently using this SOAP reuqest envelope:

  <?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>
        <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-32259181" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
              <wsse:Username>user</wsse:Username>
              <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
           </wsse:UsernameToken>
        </wsse:Security>
     </soapenv:Header>
     <soapenv:Body>
        <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
           <RetrieveRequest>
              <ObjectType>DataExtension</ObjectType>
              <Properties>CustomerKey</Properties>
              <Properties>Name</Properties>
              <Properties>CategoryID</Properties>
           </RetrieveRequest>
        </RetrieveRequestMsg>
     </soapenv:Body>
  </soapenv:Envelope>

This works fine, however I note that it also returns results of "things" that aren't data extensions, even though I specify DataExtension as ObjectType. Refer to example response below.

From what I can figure out, the response also includes:

  1. data views (which I know about)
  2. Target Lists from Mobile Connect (denoted below with CategoryID : 1104)
  3. and some other internal(?) Data Extension names like Shopping Cart Items with CategoryID : 14820 and 14831 which I assume are created from the "out of the box" Attribute Groups in Contact Builder.

The question is, how can I filter this list to only return actual Data Extensions? That is Data Extensions that we have created in Email > Subscribers > Data Extensions?

Perhaps if I know what specific category IDs to search for, I can do this?

<?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>RetrieveResponse</wsa:Action>
        <wsa:MessageID>urn:uuid:2f1f6afb-6b43-4a08-b5d5-b34884c9804b</wsa:MessageID>
        <wsa:RelatesTo>urn:uuid:c643d8cd-1239-4f26-bf82-e15699ae49b2</wsa:RelatesTo>
        <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
        <wsse:Security>
            <wsu:Timestamp wsu:Id="Timestamp-7398199b-4adc-45e8-b98a-2330b95f7186">
                <wsu:Created>2014-10-06T05:07:16Z</wsu:Created>
                <wsu:Expires>2014-10-06T05:12:16Z</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>
    </soap:Header>
    <soap:Body>
        <RetrieveResponseMsg
            xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <OverallStatus>OK</OverallStatus>
            <RequestID>f20cac26-feca-43f1-9f0c-5d846d0be19f</RequestID>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>79F64C3F-CF3F-4928-A90B-0C86327E75C1</CustomerKey>
                <Name>_MobileAddress</Name>
                <CategoryID>1104</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>0CDF18E9-A4F8-4F4E-B8D3-44F296F51C8E</CustomerKey>
                <Name>SMSCampaignA</Name>
                <CategoryID>1104</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>3F802E0E-CFE4-44B1-8158-53BA1BD430FB</CustomerKey>
                <Name>SMSCampaignB</Name>
                <CategoryID>1104</CategoryID>
            </Results>
           <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>134AC210-F379-4561-A28F-932CA0F6FAF1</CustomerKey>
                <Name>Locations</Name>
                <CategoryID>14816</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>466688C0-42C6-4109-B0D9-AF6F7D5F1372</CustomerKey>
                <Name>Airports</Name>
                <CategoryID>14816</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>FE065BCD-7F80-4968-9977-7D33C0079AD7</CustomerKey>
                <Name>Hotels</Name>
                <CategoryID>14816</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>7BC041D2-CC0A-4822-9C4F-E2487A852948</CustomerKey>
                <Name>Weather</Name>
                <CategoryID>14816</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>51A58862-3A9C-498E-A44A-F8AC1700F805</CustomerKey>
                <Name>Flight History</Name>
                <CategoryID>14816</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>98FDDF28-7151-473B-B484-0556001DFF59</CustomerKey>
                <Name>Hotel History</Name>
                <CategoryID>14816</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>11132505-E4A6-400E-A5E1-460042FAA19C</CustomerKey>
                <Name>Booking Demographics</Name>
                <CategoryID>14816</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>64071C5A-7209-43D7-8BD1-B52204B761EA</CustomerKey>
                <Name>Flight History Airport</Name>
                <CategoryID>14816</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>BD927A29-8E9F-4D36-AD30-6ED84055FEE1</CustomerKey>
                <Name>Product Views</Name>
                <CategoryID>14820</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>D765DCC0-59EF-47B6-ABF8-52788260E2C0</CustomerKey>
                <Name>Shopping Cart Products</Name>
                <CategoryID>14820</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>5D741812-7504-4F03-867A-0617A30561AB</CustomerKey>
                <Name>Shopping Cart</Name>
                <CategoryID>14820</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>3BB6BC7B-AFAF-4209-A921-08C64EA8E4B2</CustomerKey>
                <Name>Shopping Cart Items</Name>
                <CategoryID>14820</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>435D458D-4E6E-4AFF-967A-4343AA6E8EC4</CustomerKey>
                <Name>Retail Orders</Name>
                <CategoryID>14831</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>2505ADBE-2FA1-4E54-B911-AC4D105DE86D</CustomerKey>
                <Name>Retail Order Lines</Name>
                <CategoryID>14831</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>F46FB885-0022-470C-908A-162BEA822F0E</CustomerKey>
                <Name>Retail Products</Name>
                <CategoryID>14831</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>1A671979-6756-4165-9E38-DFAD89AFC265</CustomerKey>
                <Name>Returns</Name>
                <CategoryID>14831</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>684D8EFD-F1BC-45DD-8B3E-97C4289F9369</CustomerKey>
                <Name>Return Lines</Name>
                <CategoryID>14831</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>891B3724-D24C-4446-90A4-C9696675C04E</CustomerKey>
                <Name>Payments</Name>
                <CategoryID>14831</CategoryID>
            </Results>
            <Results xsi:type="DataExtension">
                <PartnerKey xsi:nil="true" />
                <ObjectID xsi:nil="true" />
                <CustomerKey>85F067D0-BD6E-469C-A9D3-9737EC32CADD</CustomerKey>
                <Name>Credits</Name>
                <CategoryID>14831</CategoryID>
            </Results>
        </RetrieveResponseMsg>
    </soap:Body>
</soap:Envelope>

Best Answer

I've been asking around, and unfortunately, there does not appear to be a direct way to do what you want to do. If you have a certain naming convention on your DE, you could use that, but there is no internal system flag that marks something as "system created" or what have you.

Good luck!

Related Topic