1

On the tab Tracking->Send, there are an attribute called "Data Extensions". It indicates which DE is used for this send.

I can get it one by one on Marketing Cloud, but on SOAP API, the "List" object shows All Subscribers. I want to get the DE CustomerKey or name. How can I do so?

I can accept either SOAP API or REST API methods.

enter image description here

1 Answer 1

0

For a User Initiated Send (EmailSendDefinition object), you can retrieve the SendDefinitionList property, and if there are multiple lists/DEs associated with the send, it will show them to you... (More below).

If you want to see the DE associated with Triggered Sends, there's not currently a way to retrieve that via the API :( I had SFMC Data Support create a custom extract for my account (something like Populate TriggeredSend To DE Match), that runs daily and stores the correlation between Data Extension and Triggered Send Definition in a shared DE that can be accessed by any BU to get that info. Then you'd just retrieve the DE Name from the extract target DE for a given TSD's customerkey.

To retrieve the lists/DEs used in a User Initiated Send, you'd use this SOAP call (again, relevant property being SendDefinitionList):

<soapenv:Envelope xmlns:soapenv="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">
   <soapenv:Header>
      <wsse:Security soapenv:mustUnderstand="1">
         <wsse:UsernameToken>
            <wsse:Username>${#Project#username}</wsse:Username>
            <wsse:Password>${#Project#pw}</wsse:Password>
         </wsse:UsernameToken>
      </wsse:Security>
   </soapenv:Header>
   <soapenv:Body>
      <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <RetrieveRequest>
            <ClientIDs>
               <ClientID>${#Project#BU}</ClientID>
            </ClientIDs>
            <ObjectType>EmailSendDefinition</ObjectType>
            <Properties>Additional</Properties>
            <Properties>AutoBccEmail</Properties>
            <Properties>BccEmail</Properties>
            <Properties>CategoryID</Properties>
            <Properties>CCEmail</Properties>
            <Properties>CreatedDate</Properties>
            <Properties>CustomerKey</Properties>
            <Properties>DeduplicateByEmail</Properties>
            <Properties>DeliveryProfile.CustomerKey</Properties>

            <Properties>Description</Properties>
            <Properties>DynamicEmailSubject</Properties>
            <Properties>Email.ID</Properties>
            <Properties>EmailSubject</Properties>
            <Properties>ExclusionFilter</Properties>
            <Properties>IsMultipart</Properties>
            <Properties>IsSendLogging</Properties>
            <Properties>IsWrapped</Properties>
            <Properties>ModifiedDate</Properties>
            <Properties>Name</Properties>
            <Properties>ObjectID</Properties>
            <Properties>SendClassification.CustomerKey</Properties>
            <Properties>SendDefinitionList</Properties>
            <Properties>SenderProfile.CustomerKey</Properties>
            <Properties>SendLimit</Properties>
            <Properties>SendWindowClose</Properties>
            <Properties>SendWindowOpen</Properties>
            <Properties>SuppressTracking</Properties>
            <Properties>TestEmailAddr</Properties>
            <Filter xsi:type="SimpleFilterPart">
               <Property>Name</Property>
               <SimpleOperator>equals</SimpleOperator>
               <Value>My Test UISend</Value>
            </Filter>
         </RetrieveRequest>
      </RetrieveRequestMsg>
   </soapenv:Body>
</soapenv:Envelope>

The output should look something like this:

<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:13505862-fbdf-4457-ac1e-8f9bc173d140</wsa:MessageID>
      <wsa:RelatesTo>urn:uuid:8a332506-5dc9-4044-962e-927a39316dfe</wsa:RelatesTo>
      <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
      <wsse:Security>
         <wsu:Timestamp wsu:Id="Timestamp-d1c7c006-05aa-4f9f-bd9d-c5e6d0dc6831">
            <wsu:Created>2018-08-06T23:53:34Z</wsu:Created>
            <wsu:Expires>2018-08-06T23:58:34Z</wsu:Expires>
         </wsu:Timestamp>
      </wsse:Security>
   </soap:Header>
   <soap:Body>
      <RetrieveResponseMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <OverallStatus>OK</OverallStatus>
         <RequestID>e17a8f45-3f2f-4d88-b6f6-5145a1b547cc</RequestID>
         <Results xsi:type="EmailSendDefinition">
            <PartnerKey xsi:nil="true"/>
            <CreatedDate>2017-02-21T14:52:09.503</CreatedDate>
            <ModifiedDate>2017-02-21T15:12:49.33</ModifiedDate>
            <ObjectID><!--OBSCURED--></ObjectID>
            <CustomerKey><!--OBSCURED--></CustomerKey>
            <Name>SUPPRESSION_TEST_C6012</Name>
            <Description/>
            <CategoryID>40106</CategoryID>
            <SendClassification>
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <CustomerKey>Default Transactional</CustomerKey>
            </SendClassification>
            <SenderProfile>
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <CustomerKey>DynamicFromName</CustomerKey>
            </SenderProfile>
            <DeliveryProfile>
               <PartnerKey xsi:nil="true"/>
               <ObjectID xsi:nil="true"/>
               <CustomerKey>Default</CustomerKey>
            </DeliveryProfile>
            <SuppressTracking>true</SuppressTracking>
            <IsSendLogging>true</IsSendLogging>
            <SendDefinitionList>
               <PartnerKey xsi:nil="true"/>
               <ObjectID><!--OBSCURED--></ObjectID>
               <List>
                  <PartnerKey xsi:nil="true"/>
                  <ID><!--OBSCURED--></ID>
                  <ObjectID xsi:nil="true"/>
               </List>
               <SendDefinitionListType>SourceList</SendDefinitionListType>
               <CustomObjectID><!--OBSCURED--></CustomObjectID>
               <DataSourceTypeID>CustomObject</DataSourceTypeID>
               <IsTestObject>false</IsTestObject>
               <SalesForceObjectID/>
               <Name/>
            </SendDefinitionList>
            <SendDefinitionList>
               <PartnerKey xsi:nil="true"/>
               <ObjectID><!--OBSCURED--></ObjectID>
               <SendDefinitionListType>ExclusionList</SendDefinitionListType>
               <CustomObjectID><!--OBSCURED--></CustomObjectID>
               <DataSourceTypeID>CustomObject</DataSourceTypeID>
               <IsTestObject>false</IsTestObject>
               <SalesForceObjectID/>
               <Name/>
            </SendDefinitionList>
            <SendDefinitionList>
               <PartnerKey xsi:nil="true"/>
               <ObjectID><!--OBSCURED--></ObjectID>
               <SendDefinitionListType>ExclusionList</SendDefinitionListType>
               <CustomObjectID><!--OBSCURED--></CustomObjectID>
               <DataSourceTypeID>CustomObject</DataSourceTypeID>
               <IsTestObject>false</IsTestObject>
               <SalesForceObjectID/>
               <Name/>
            </SendDefinitionList>
            <Email>
               <PartnerKey xsi:nil="true"/>
               <ID><!--OBSCURED--></ID>
               <ObjectID xsi:nil="true"/>
            </Email>
            <BccEmail/>
            <AutoBccEmail/>
            <TestEmailAddr/>
            <EmailSubject>%%= v(@subjectline) =%%</EmailSubject>
            <DynamicEmailSubject>%%= v(@subjectline) =%%</DynamicEmailSubject>
            <IsMultipart>true</IsMultipart>
            <IsWrapped>true</IsWrapped>
            <DeduplicateByEmail>false</DeduplicateByEmail>
            <ExclusionFilter/>
            <Additional/>
            <CCEmail/>
         </Results>
      </RetrieveResponseMsg>
   </soap:Body>
</soap:Envelope>

Notice, there are multiple <SendDefinitionList> elements, and they have different SendDefinitionListTypes, depending on how they are used.

5
  • Thanks for your answer. I'll give a try within 2-3 days, will get back you later.
    – PY Yick
    Aug 7, 2018 at 3:50
  • You mean I need to open a case first, then ask the Salesforce side to activate this function?
    – PY Yick
    Aug 7, 2018 at 10:22
  • Ya, if you need a way to look up TSD to DE correlation, you have to get Salesforce Support to add it to your account. Aug 7, 2018 at 23:57
  • 1
    Thanks, I'll accept your answer once the goal achieved :)
    – PY Yick
    Aug 9, 2018 at 2:56
  • 1
    In the end, I opened a case to achieve this goal. It's similar to your answer so I mark it as accepted.
    – PY Yick
    Aug 15, 2018 at 4:55

You must log in to answer this question.

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