0

I'm trying to perform a Tracking Extract via the SOAP API and all seems fine from the API response. However, I'm not sure where I should find the file (in this case shorttimespan.zip). Should it be in the SFMC Safehouse? I tried to do a File Transfer activity from the Safehouse for 'shorttimespan.zip' but get the following error: Error: File 'shorttimespan.zip' not found

Soap envelope:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Header>
       <fueloauth>{{dne_etAccessToken}}</fueloauth>
   </Header>
   <Body>
      <ExtractRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Requests>
            <ID>c7219016-a7f0-4c72-8657-1ec12c28a0db</ID>
            <Parameters>
               <Parameter>
                  <Name>StartDate</Name>
                  <Value>15/08/2020 12:00:00 AM</Value>
               </Parameter>
               <Parameter>
                  <Name>EndDate</Name>
                  <Value>18/08/2020 12:00:00 AM</Value>
               </Parameter>
               <Parameter>
                  <Name>OutputFileName</Name>
                  <Value>shorttimespan.zip</Value>
               </Parameter>
               <Parameter>
                  <Name>AccountIDs</Name>
                  <Value/>
               </Parameter>
               <Parameter>
                  <Name>Attributes</Name>
                  <Value/>
               </Parameter>
               <Parameter>
                  <Name>CharacterEncoding</Name>
                  <Value>Default</Value>
               </Parameter>
               <Parameter>
                  <Name>ColumnDelimiter</Name>
                  <Value>Default</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractAttributes</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractBounces</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractClickImpressions</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractClicks</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractConversions</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>extractListMembershipChanges</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>extractLists</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractNotSent</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractOpens</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSendImpressions</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSendJobImpressions</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSendJobs</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSent</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>extractStatusChanges</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSubscribers</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSurveyResponses</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractUnsubs</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>Format</Name>
                  <Value>csv</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeAllListMembers</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeAllSubscribers</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeInferredOpens</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeMilliseconds</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeTestSends</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUnsubReason</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>QuoteText</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>TextQualifier</Name>
                  <Value/>
               </Parameter>
               <Parameter>
                  <Name>Timezone</Name>
                  <Value>1</Value>
               </Parameter>
               <Parameter>
                  <Name>UnicodeOutput</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>UseIDs</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>UseLocalTZinQuery</Name>
                  <Value>false</Value>
               </Parameter>
            </Parameters>
         </Requests>
      </ExtractRequestMsg>
   </Body>
</Envelope>

Response:

<?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>CreateResponse</wsa:Action>
        <wsa:MessageID>urn:uuid:5f6c8e5c-b354-4a0b-ac86-271b4a14dbd6</wsa:MessageID>
        <wsa:RelatesTo>urn:uuid:74130984-4350-4ebb-b3cc-e2c9b8253cf4</wsa:RelatesTo>
        <wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
        <wsse:Security>
            <wsu:Timestamp wsu:Id="Timestamp-b6e3a4ad-84fa-445d-8923-88694645fa6c">
                <wsu:Created>2020-08-18T13:37:16Z</wsu:Created>
                <wsu:Expires>2020-08-18T13:42:16Z</wsu:Expires>
            </wsu:Timestamp>
        </wsse:Security>
    </soap:Header>
    <soap:Body>
        <CreateResponse xmlns="http://exacttarget.com/wsdl/partnerAPI">
            <RequestID>2ceff29e-caa5-4ca8-a10f-29a03a3b1683</RequestID>
            <OverallStatus>OK</OverallStatus>
        </CreateResponse>
    </soap:Body>
</soap:Envelope>

Can somebody point me to where I can find the export?

2 Answers 2

2

Tracking Data Extracts initiated via SOAP API will be extracted to the default Export SFTP folder for your business unit.

I haven't found a way to specify an alternate location with this object. If you do the same process without the API, it's two steps -- Data Extract (to the Safehouse) and a File Transfer (from the Safehouse to a File Location).

I believe you can set a notification email address, so you can know when it finishes.

4
  • Thanks a lot for your answer, that explains a lot. Any idea what the parameter name would be for the notification email address? Commented Aug 18, 2020 at 15:22
  • NotificationEmail is the attribute. Here's a full SOAP envelope: gist.github.com/wvpv/5a216af83369bad09939cd881f9176a4 Commented Aug 18, 2020 at 15:37
  • Thanks a lot, but unfortunately I didn't get it working yet. I don't receive the notification mail nor do I see the file on the respective SFTP folder. How long is a data extract for the timespan of a month (with the parameters from your gist) supposed to take? Also, earlier today, I submitted the same request for a timespan of 5 years, could it be that this one is still processing and the other requests are queued? Commented Aug 18, 2020 at 19:04
  • I'd test with a range of 7 days or less. A 5-year range will never be allowed to complete. since it's a potentially monstrous data-set. Commented Aug 18, 2020 at 19:35
0

Turns out there was info missing in the header. The request should be as following:

<?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">
   <s:Header>
      <a:Action s:mustUnderstand="1">Retrieve</a:Action>
      <a:To s:mustUnderstand="1">https://{{et_subdomain}}.soap.marketingcloudapis.com/Service.asmx</a:To>
      <fueloauth xmlns="http://exacttarget.com">{{dne_etAccessToken}}</fueloauth>
   </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>
            <ID>c7219016-a7f0-4c72-8657-1ec12c28a0db</ID>
            <Parameters>
               <Parameter>
                  <Name>OutputFileName</Name>
                  <Value>extractname.zip</Value>
               </Parameter>
               <Parameter>
                  <Name>Format</Name>
                  <Value>tab</Value>
               </Parameter>
               <Parameter>
                  <Name>QuoteText</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ColumnDelimiter</Name>
                  <Value>[tab]</Value>
               </Parameter>
               <Parameter>
                  <Name>UnicodeOutput</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>NotificationEmail</Name>
                  <Value>[email protected]</Value>
               </Parameter>
               <Parameter>
                  <Name>StartDate</Name>
                  <Value>8/19/1999 12:00:00 AM</Value>
               </Parameter>
               <Parameter>
                  <Name>EndDate</Name>
                  <Value>8/19/2020 12:00:00 AM</Value>
               </Parameter>
               <Parameter>
                  <Name>Timezone</Name>
                  <Value>79</Value>
               </Parameter>
               <Parameter>
                  <Name>UseLocalTZinQuerypublic</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeMilliseconds</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSubscribers</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeAllSubscribers</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractAttributes</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>extractStatusChanges</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSendJobs</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSendJobImpressions</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSent</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractNotSent</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSendData</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSendImpressions</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeTestSends</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractOpens</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUniqueOpens</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeInferredOpens</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeGEO</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUserAgentInformation</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractClicks</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractClickImpressions</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUniqueClicks</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUniqueForURLClicks</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractBounces</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractUnsubs</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeUnsubReason</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSpamComplaints</Name>
                  <Value>true</Value>
               </Parameter>
               <Parameter>
                  <Name>extractListMembershipChanges</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>extractLists</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeAllListMembers</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractMultipleDataExtensionListData</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractConversions</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>ExtractSurveyResponses</Name>
                  <Value>false</Value>
               </Parameter>
               <Parameter>
                  <Name>CharacterEncoding</Name>
                  <Value>ASCII</Value>
               </Parameter>
               <Parameter>
                  <Name>IncludeCampaignID</Name>
                  <Value>false</Value>
               </Parameter>
            </Parameters>
         </Requests>
      </ExtractRequestMsg>
   </s:Body>
</s:Envelope>

You must log in to answer this question.

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