1

When configuring a Data Extract Activity in Automation Studio there are two date options available :

  1. Rolling Date Range

    This option allows you to choose a 1 Day rolling range at it's most specific, but this "1 Day" does not include current-day data. It will always be data for the previous day

  2. Specific Range

    This option allows you to choose a specific date to export data from, and important to note, this includes current day data

This option is not dynamic though. We cannot create a repeatable process for current-day data using this option since obviously it's not sustainable to have someone go in to Automation Studio every single day and manually edit the date to equal the current day.

It doesn't need to be via a Data Extract (although this seems to have all the data we need in one place and would be nice), it doesn't necessarily need to be through automation studio even (I could set something up to hit the API but need some guidance/documentation on how).

The bottom line is current day data exists in Marketing Cloud, it just doesn't seem to be available to extract in a repeatable manner on an ongoing basis via standard Data Extract Activity options for some reason. Is there some kind of workaround. Anyone have any suggestions for how to approach this?

2
  • What type of data do you need? Like Opens, Clicks, Bounces, Sent, etc? Being more specific on the end goal will help us provide advice on best course of action. Apr 17, 2019 at 16:49
  • If I could get Sends, Bounces, Opens, Clicks, and Conversions I think I'd be all set. At a bare minimum I'd like to get sent data hourly.
    – Burt
    Apr 17, 2019 at 16:57

1 Answer 1

6

You can use the SOAP API to programmatically define and execute a data extract, analogous to creating the data extract activity in automation studio, but with the benefit of being able to set the parameters, including start and end date, on the fly. Here's the example SOAP envelope provided in the documentation:

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <Header>
       <fueloauth>YOUR_ACCESS_TOKEN</fueloauth>
   </Header>
   <Body>
      <ExtractRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <Requests>
            <ID>c7219016-a7f0-4c72-8657-1ec12c28a0db</ID>
            <Parameters>
               <Parameter>
                  <Name>StartDate</Name>
                  <Value>10/26/2012 12:00:00 AM</Value>
               </Parameter>
               <Parameter>
                  <Name>EndDate</Name>
                  <Value>10/29/2015 12:00:00 AM</Value>
               </Parameter>
               <Parameter>
                  <Name>OutputFileName</Name>
                  <Value>ExampleTracking.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>SendIDs</Name>
                  <Value>12283113,12283120</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>

If you're much more comfortable with REST APIs and up for some exploration, you can also CRUD and execute data extracts with the REST API. The following methods are available under the /automation/v1 path:

{
  "methods": {
    "DataExtract.Get": {
      "path": "dataextracts/{id}",
      "httpMethod": "get",
      "description": "Get Data Extract Definition based on Id"
    },
    "DataExtract.GetCollection": {
      "path": "dataextracts",
      "httpMethod": "get",
      "description": "Gets a paged and sorted collection of Data Extracts."
    },
    "DataExtract.Update": {
      "path": "dataextracts/{id}",
      "httpMethod": "patch",
      "description": "Update Data Extract"
    },
    "DataExtract.Create": {
      "path": "dataextracts",
      "httpMethod": "post",
      "description": "Create Data Extract"
    },
    "DataExtract.Delete": {
      "path": "dataextracts/{id}",
      "httpMethod": "delete",
      "description": "Delete Data Extract"
    },
    "DataExtract.Start": {
      "path": "dataextracts/{id}/actions/start",
      "httpMethod": "post",
      "description": "Start Data Extract"
    },
    "DataExtractType.Get": {
      "path": "dataextracttypes/{id}",
      "httpMethod": "get",
      "description": "Get Data Extract Type based on Id"
    },
    "DataExtractType.GetCollection": {
      "path": "dataextracttypes",
      "httpMethod": "get",
      "description": "Gets a collection of Data Extract Types."
    },
    "DataExtract.AutomationLog.GetCollection": {
      "path": "dataextracts/{id}/log",
      "httpMethod": "get",
      "description": "Gets a collection of log entries for data extracts."
    }
  }
}

You'll need to inspect the API calls made by the SFMC frontend to get the proper parameters.

2
  • 1
    As a shortcut for development, I suggest creating and testing a data extract activity in the Automation Studio GUI, and then retrieving its XML definition with the SOAP API or inspecting the HTTP request with devtools when saving. Easier than guessing which parameters do what and which are required. Apr 17, 2019 at 17:16
  • Awesome! Thank you so much!
    – Burt
    Apr 17, 2019 at 17:25

You must log in to answer this question.

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