0

What is the best way to update SFMC (dataextension) by external system in automated fashion?

We would like to push customer data and order history on daily basis from ERP to SFMC.

1

If there is no default connection via data sources (Marketing Cloud Connect for example), you could set up an application/or script that interacts with the Marketing Cloud REST-API on a regular basis (a scheduled job / cron job).

An example request sent to the REST-API endpoint for upserting data could look like this (example taken from the documentation):

Request Headers:

Host: https://YOUR_SUBDOMAIN.rest.marketingcloudapis.com
PUT /data/v1/async/dataextensions/key:ExternalKey12345/rows
Content-Type: application/json
Authorization: Bearer YOUR_ACCESS_TOKEN

Request Body:

{
   "items": [{
      "FirstName":"Bobby",
      "LastName" : "Jones",
      "ZipCode": "23456"
   },
   {
      "FirstName":"Sam",
      "LastName" : "Sneed",
      "ZipCode": "23456"
   }]
}

Prerequisite for this call is creating an installed package in order to have API credentials and obtaining an access token, that is sent in the header of every subsequent request.

Helpful resources:

  • There are also SOAP options if the REST does not fit your needs exactly. SOAP, unfortunately is the more robust library for SFMC and offers more options for interaction. – Gortonington Mar 5 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.