0

I have an external database containing contacts and transactions. How do I query that database from SFMC to update data extensions for e.g. contacts or transaction data extensions? I don't need to sync back the data to the external database. Is there a built in way to do this?

I understand that often, you would export from that external db into a csv and import it from there. Is there a way to directly access the db?

Thanks!

4

The only way to directly access the external DB is via an API call. The drawback would be that any calls of significant size would be a heavy resource draw and could potentially time out or require multiple calls and a large amount of time - depending on the API abilities of your 3rd party system.

By far, exporting to a CSV or similar file and then doing an import via FTP is the most efficient way.

My recommendation would be to continue to do the bulk upload daily and then use the API call to do 'real time' updates on the sections you need.

Samples of API calls to push data to SFMC.

REST API to Data Extension (note: there is an async version, but this requires you to get this enabled by SFMC support)

Adding data to a DE via SOAP API

Adding a Subscriber to SFMC

Now you could also use a Script Activity to do a REST or SOAP API call to your external DB via SFMC SSJS, but as each system requires different authentication and requirements, I cannot post any samples here.

A good resource for SFMC API call templates would be the POSTman SFMC library of API calls. This will give you a good starting point on many API calls.

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.