How to integrate with Salesforce Marketing Cloud to Push to a Data Extension (Advanced Method)

If you are setting up a Digioh integration by yourself, we first recommend reading about Digioh Integration Basics.

Using Digioh’s Salesforce Marketing Cloud integration, you can push data to a data extension in SFMC by following these instructions.

(If you are looking to trigger a journey as well, please use these instructions)

How to Push to a Data Extension

1) Create a Package by following these steps: Install Packages

2) When you “Add Component,” choose “API Integration,” then “Sever-to-Server.” More info.

3) Make sure the following scopes are assigned:

  • email_send
    email send scope sfmc
  • journeys_read
    journeys_read scope sfmc
  • ​list_and_subscribers_read and ​list_and_subscribers_write
    lists and subscribers read write
  • data_extensions_read and data_extensions_write
    data extension read write scope

4) After you create a Package, record this information:

  • API Endpoint URL (example: rest.marketingcloudapis.com/interactionv1/events)
  • Subdomain (example: mptq…)
  • Account ID (also referred to as MID. example: 100019327)
  • Client ID
  • Client Secret
  • the DE External Key for the Data Extension
  • What field on the Data Extension is marked as the “Primary Key”
  • Scopes (example: email_send_journeys_read, list_and_subscribers_read, etc).

5) Click the “Integrations” tab in your Digioh account and select “Salesforce Marketing Cloud” from the drop-down. Enter the information you collected in Step 3 and build out the payload based on your fields in the Data Extension. If you send us the field names inside the data extension (a screenshot will do), as well as the other info mentioned above, we can set up the integration for you.

Here is what the End Point Looks like if the only Primary Key is the Email Address:

https://{Subdomain}.rest.marketingcloudapis.com/hub/v1/dataevents/key:{DE External Key}/rows/{Primary Key Name}:[EMAIL]

Here is what the JSON Payload looks like if the fields are just Name, Phone, and Address:

{
"values":{
"Name":"[NAME]",
"Phone":"[PHONE]",
"Address":"[CUSTOM_1]"}
}

Example of another Payload for Single Primary Key Setup:

Format for the endpoint:
https://{Subdomain}.rest.marketingcloudapis.com/hub/v1/dataevents/key:{DE External Key}/rows/{Primary Key Name}:[CUSTOM_10]

Format for the payload:
{
"values":{
"LastLogin":"2013-05-23T14:32:00Z",
"IsActive":true,
"FirstName":"John",
"FollowerCount":2,
"LastName":"Smith"}
}

Here is a screenshot of the SFMC to Data Extension integration in the Digioh Platform:

sample fields and json payload for a salesforce integration

Multiple Primary Key Setup

Format for the endpoint:
https://{Subdomain}.rest.marketingcloudapis.com/hub/v1/dataevents/key:{DE External Key}/rowset

Format for the payload:

[
{
"keys":{
"Email": "someone@example.com",
"SubscriberId": "12345",
},
"values":{
"LastLogin": "2013-05-23T14:32:00Z",
"IsActive": true,
"FirstName": "John",
"FollowerCount": 2,
"LastName": "Smith"
}
}
]

This is what it looks like in the Integrations section:

sample configuration for salesforce marketing cloud integration in digioh