0

I need to expose certain SFMC data to a third party app that doesn't have a ready-made Salesforce integration. I'm considering using REST API to expose the data and this action should be triggered whenever the third party app triggers that API.

Here is the general process of what should happen

  1. Third party invokes the API once every 24 hours
  2. API call is made to to SFMC and 1 particular Data Extension (or few rows) is exposed, ready to be consumed
  3. External App consumes data

I'm struggling to understand how to implement the above? and is it the best approach for third party export?

Any help is much appreciated :) Many Thanks, Sachi

1
  • Process wise, it looks right. SFMC already has Api's to expose data. You can utilise that. I am not sure if data extension query can be done via rest api or not. I know soap api allows that.
    – manjit5190
    Jul 13, 2020 at 11:42

2 Answers 2

0

This is doable. But there is a problem with REST routes, the Data extension has no documented REST routes that you can use for retrieve purpose.That means if you use it you are on your own.| With SOAP here is how its done: https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/retrieving_data_from_a_data_extension.htm

0

I would personally recommend if its a once daily process to have SFMC drop a CSV file to an FTP for ingestion of your service. It is usually an easier and less process heavy option.

That aside, you can check out my article here for some samples on how to integrate a 3rd party system to SFMC via REST API.

As your use case seems to be an external system reaching out to SFMC instead of SFMC pushing out, I will give some example calls outside the SSJS used in my article:

Gather an auth token:

POST /v2/token
Host: {{subDomain}}.auth.marketingcloudapis.com
Content-Type: application/json

{
    "grant_type": "client_credentials",
    "client_id": "{{clientID}}",
    "client_secret": "{{clientSecret}}",
    "account_id": "{{mid}}"
}

As to gathering info from a Data Extension, if you are comfortable with undocumented endpoints, there is one in REST that can be used to get this info. Inside my article about Data Extension Inventories I mention it.

Get DE row info:

GET /data/v1/customobjectdata/key/{{deKey}}/rowset
Host: {{subdomain}}.rest.marketingcloudapis.com
Authorization: Bearer {{authToken}}
Content-Type: application/json

You must log in to answer this question.

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