0

Is it possible via API to pull the form of an already sent email & the list of people it was sent to?

I've been working with fuelSDK. I'm able to list out the sends but the recipient list is eluding me. Basically I need to export 3 years worth of emails + recipients for a compliance issue which is going to take forever if I have to pull each send list by hand.

Here's what I'm currently trying:

        $rr = new ExactTarget_RetrieveRequest();
    $rr->ObjectType = "ListSend"; 
    $rr->Properties =  array();
        $rr->Properties[] = "ID";
        $rr->Properties[] = "NumberSent";
        $rr->Properties[] = "List";


    $sfp= new ExactTarget_SimpleFilterPart();
    $sfp->Value =  array("5");
    $sfp->SimpleOperator = ExactTarget_SimpleOperators::greaterThan;
    $sfp->Property="NumberSent";

    $rr->Filter = new SoapVar($sfp, SOAP_ENC_OBJECT, 'SimpleFilterPart', "http://exacttarget.com/wsdl/partnerAPI");
    $rr->Options = NULL;
    $rrm = new ExactTarget_RetrieveRequestMsg();
    $rrm->RetrieveRequest = $rr;
    $results = $client->Retrieve($rrm); 

This is the result:

object(stdClass)#7 (2) {
  ["OverallStatus"]=>
  string(85) "Error: The Request Property(s) List do not match with the fields of ListSend retrieve"
  ["RequestID"]=>
  string(36) "361bdc2d-dd49-4723-9e42-3161117970d1"
}

Despite the fact that [https://help.exacttarget.com/en/technical_library/web_service_guide/objects/listsend/][1]

[1]: https://help.exacttarget.com/en/technical_library/web_service_guide/objects/listsend/ says that "List" is in fact a property of the ListSend object.

My ideal return would basically be the "PreviewURL" and the array of recipients.

1

For 3 years worth of data, I'd suggest creating a Tracking Extract of Sent data. You might have to do multiple extracts with smaller date ranges, if you've got a large subscriber base.

You can do that via API also, which doesn't create a visible Tracking Extract in the account. Here's a sample SOAP envelope so you can see the structure of the call:

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
   <s:Header>
      <a:Action s:mustUnderstand="1">Extract</a:Action>
      <a:MessageID>urn:uuid:ecb300c9-4131-44f2-834c-9e50dc4b1d86</a:MessageID>
      <a:ReplyTo>
         <a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
      </a:ReplyTo>
      <a:To s:mustUnderstand="1">https://webservice.exacttarget.com/Service.asmx</a:To>
      <o:Security xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" s:mustUnderstand="1">
         <u:Timestamp u:Id="_0">
            <u:Created>2015-07-14T13:47:07.429Z</u:Created>
            <u:Expires>2015-07-14T13:52:07.429Z</u:Expires>
         </u:Timestamp>
         <o:UsernameToken u:Id="uuid-bd7b0034-a8d7-43c3-8dfc-b2e84ae2e39a-3">
            <o:Username>
               <!-- Removed-->
            </o:Username>
            <o:Password>
               <!-- Removed-->
            </o:Password>
         </o:UsernameToken>
      </o:Security>
   </s:Header>
   <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <ExtractRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Requests>
            <Client>
               <ClientID>CLIENT MID GOES HERE</ClientID>
            </Client>
            <ID>GUID</ID>
            <Parameters>
               <Parameter>
                  <Name>Format</Name>
                  <Value>tab</Value>
               </Parameter>
               <Parameter>
                  <Name>QuoteText</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ColumnDelimiter</Name>
                  <Value>[tab]</Value>
               </Parameter>
               <Parameter>
                  <Name>OutputFileName</Name>
                  <Value>NAME_OF_TRACKING_EXTRACT.zip</Value>
               </Parameter>
               <Parameter>
                  <Name>NotificationEmail</Name>
                  <Value>aspriggs@degdigital.com</Value>
               </Parameter>
               <Parameter>
                  <Name>StartDate</Name>
                  <Value>7/12/2015 12:00:00 AM</Value>
               </Parameter>
               <Parameter>
                  <Name>EndDate</Name>
                  <Value>7/14/2015 8:47:07 AM</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeTestSends</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeMilliseconds</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSpamComplaints</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractBounces</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractClicks</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUniqueClicks</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUniqueForURLClicks</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractConversions</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractOpens</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSendJobs</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSent</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSurveyResponses</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUniqueOpens</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractUnsubs</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUnsubReason</Name>
                  <Value>true</Value>
               </Parameter>
            </Parameters>
         </Requests>
      </ExtractRequestMsg>
   </s:Body>
</s:Envelope>
  • Do activities like a Tracking Extract require a specific license? – bcarlock Jul 14 '15 at 17:54
  • 1
    I don't think it's a paid feature. You may just have to have SFMC Support enable it via special business rule. – Adam Spriggs Jul 14 '15 at 18:26
  • Hi @adam-spriggs, Maybe you can help me out just a little more. For background, I'm using PHP. Same problem- I'm trying to do "ExactTarget_RetrieveRequest" on a "ListSend" via API. According to [help.exacttarget.com/en-US/technical_library/web_service_guide/… list is one of the properties of this object, but when I try to use it I get: 'string(85) "Error: The Request Property(s) List do not match with the fields of ListSend retrieve"' I'll paste the code I'm currently trying to use in my original post. – bcarlock Jul 21 '15 at 21:05
  • 1
    Don't do a RetrieveRequest. You'll only get a 2500 rows at a time doing it that way. Do a Tracking Extract and dump out a file. – Adam Spriggs Jul 21 '15 at 21:17
  • A tracking extract on the Send object? I'm having the same difficulty calling the list using that setup- the Retrieve is just the latest attempt. Basically, I can call everything about the send I want, but can't refer to the list of recipients. – bcarlock Jul 21 '15 at 21:20

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.