1

I need to pull various data from Salesforce Marketing Cloud (ExactTarget) including subscriber information, last open, last click, success rate (opens/total eligible campaigns), first bounce date, and first unsubscribed date.

As these metrics will require retrieving all data from at least 4 objects (likely more than 4), I need to find a way to get all the needed data while staying within my 50,000 allotted API requests.

All data will be loaded historically upon first execution. Daily executions will commence, getting only new or updated data.

Is there anyway of accomplishing this? Preferably with their REST API.

I'm opting for the raw REST API (over the FuelSDKs) via Python due to the inactivity of the opensource community.

1 Answer 1

2

You can certainly retrieve this information using the Marketing Cloud Fuel API, but at this time, you can only POST and PUT into Data Extensions using the REST API (refer to the Data Events methods), so you will have to use the SOAP API for now.

Here's a typical SOAP request envelope to retrieve data from a Data Extension:

<?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>
      <fueloauth xmlns="http://exacttarget.com">InsertOAuthAccessTokenHere</fueloauth>
   </soapenv:Header>
   <soapenv:Body>
      <RetrieveRequestMsg xmlns="http://exacttarget.com/wsdl/partnerAPI">
         <RetrieveRequest>
            <ObjectType>DataExtensionObject[InsertDataExtensionExternalKeyHere]</ObjectType>
            <Properties>firstname</Properties>
            <Properties>lastname</Properties>
            <Properties>email</Properties>
            <Filter xsi:type="SimpleFilterPart">
                <Property>memberno</Property>
                <SimpleOperator>equals</SimpleOperator>
                <Value>123456</Value>
            </Filter>
         </RetrieveRequest>
      </RetrieveRequestMsg>
   </soapenv:Body>
</soapenv:Envelope>

Regarding tracking data (click, open, etc), you will need to create a Query Activity that uses a Data View, then you can create an Automation to run the Query Activity at a regular schedule.

Regarding your "50,000 allotted API requests", this is a soft-cap — you can make more requests than 50,000. There are no physical restrictions in place, although Marketing Cloud could implement them if the number of requests are too excessive.

2
  • Thanks! I'm very interested in this Query Activity. It appears that I can get all the data I need through the _Subscribers, _Open, _Click, _Bounce, _Unsubscribe, and _Sent tables/views. However, I'm having trouble understanding the process of these Query Activities. Must I create a data extension which reside on my SF account and then separately export it? If it would be preferred for me to write a new question, I will gladly do that instead.
    – dlstadther
    Commented Nov 9, 2015 at 14:22
  • The procedural steps for creating a Query Activity are documented here. As the documentation explains, you will need to create a target Data Extension first. Once you have created the Query Activity, you can create a scheduled Automation in Automation Studio to run the Query at a required interval (for example, every hour). Commented Nov 9, 2015 at 21:29

You must log in to answer this question.

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