Salesforce Marketing Cloud comes with two distinct API's:
Each of these API's have different endpoints or methods to access and control your Salesforce Marketing Cloud instance from external.
REST API:
The REST API uses JSON request and response bodies and resource endpoints to support multi-channel use. All new Marketing Cloud technologies implement REST API. REST calls are synchronous, with timeout values of 120 for non-tracking operations and 300 seconds for tracking and data retrieve operations. The maximum payload of any call is four megabytes.
The REST API uses standard HTTP methods such as GET
, POST
, PUT
, PATCH
and so on. A full list of available REST API routes and methods can be found here.
SOAP API:
The SOAP API uses SOAP envelopes to pass information between you and Marketing Cloud. We recommend a limit of no more than 2k per minute for SOAP calls. Support may request your SOAP envelope to troubleshoot issues.
The SOAP API allows you to execute methods such as create
, delete
, execute
, perform
and many more. Each methods needs an object such as Automation
or DataExtension
. A full list of supported objects and its method can be found here.
To make it easier for any developer, Salesforce has introduced a free open source starter kit / SDK. This SDK is called the Fuel SDK.
The Marketing Cloud platform SDKs provide a cross-functional framework
around the SOAP and REST APIs. This framework allows developers to
integrate APIs using native language code libraries. The platform SDKs
use both the SOAP and REST APIs to provide agnostic protocol
interfaces and automated token management.
This starter kit should get you rolling quite quickly as you do not have to start from scratch.
As with any API, you are opening your Salesforce Marketing Cloud Instance
to the public. This obviously needs to be done with caution and Salesforce has enabled several options to make this access more secure.
This open communication layer can be set and secured within the settings you have mentioned:
my name > settings > installed packages
Each package can have a different type of component depending on your use case. There is enough information outlined in the official Salesforce API documentation already, please have a look if further reading is required.
Each package can also have different access level depending on your use case.
Keep in mind, allowing the least possible access for your use case is always preferable.
I hope this high level overview of the Salesforce Marketing Cloud API
clarify certain things a bit more.
Coming to your original question and use case:
How to export data to be used for reporting purposes
You could use the API to get data from DataExtension such the DataViews directly but I would not recommend this.
Depending on your sending volume, this export can be quite large and execution time can be critical.
Instead of trying to access the raw data via API, I would recommend this approach:
- Run an
Automation
in Automation Studio
.
- The first activity is a
SQL
activity to copy the internal DataViews into a DataExtension
- Use a
DataExtract
activity with the type Data Extension Extract
to export the DataExtension to the SafeHouse
- Use a
FileTransfer
activity to transfer the file from the SafeHouse
to your sFTP of choice. For example at BigQuery
which nicely aligns with Salesforce acquired product Tableau
. Obviously you can also export this to a s3 bucket
in AWS
and use QuickSight
by processing the data with Lambda
From there the possibilities are endless.
There are other DataExtract
types which may suit your use case better and which can skip the SQL
part itself.
Keep in mind regardless of what extract you do, you want the data to be as granular as possible and build up aggregated reports on top within the tool of your choice.