Authentication
Please refer to this document for a guide to authenticating Salesforce connectors.
Upsert Custom Data Extension Rows
The Salesforce Marketing Cloud connector gives you have the ability to Upsert (create or update) a batch of data extension rows.
When using the method ‘Upsert Custom Data Extension Rows’, custom fields must be provided for both the request and response objects.
You can do this is one of two ways:
If you have a sample of the JSON that will be posted you can:
-
Click the magnifying glass icon
-
Paste in the sample JSON
-
Click ‘Generate’
Or you can add the fields manually:
-
Click the plus icon
-
Enter the Field Location, Display Name, Data Type and (optionally) a Description
-
Click ‘Create’
Your custom fields will be created. This process should be carried out for both the request and response fields.
Important
-
Your request object must include the property ‘keys’. This is assigned an object containing the primary key you will be using to upsert the data
-
Your mappings must start with an array. This endpoint expects an array of objects, even if that array only contains one item
For example, if generating fields from sample JSON:
Invalid - no keys property
{
"values: {
"FirstName": "John",
"LastName": "Doe"
}
}
Invalid - no parent array
{
"keys": {
"EmailAddress": "test@test.com"
},
"values: {
"FirstName": "John",
"LastName": "Doe"
}
}
Valid - keys property and parent array
[
{
"keys": {
"EmailAddress": "test@test.com"
},
"values: {
"FirstName": "John",
"LastName": "Doe"
}
}
]
If adding fields manually, for Field Location:
Invalid - no parent array
keys.EmailAddress
Valid - property has parent array
Edit me[].keys.EmailAddress