Salesforce Marketing Cloud
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 you use the Upsert Custom Data Extension Rows method, you need to provide custom fields for both the request and response objects.
You can provide custom fields either manually or with JSON script.
If you have a sample of the JSON that you want to post, you can generate the fields:
Select the magnifying glass icon.
Paste in the sample JSON.
Select Generate.
You can also add the fields manually:
Select the plus icon.
Enter the Field Location, Display Name, Data Type and, optionally, a Description.
Select Create.
Note: You need to create fields for both the request and response fields.
Request object requirements
You need to include the property
keys
in your request object. Assign the propertykeys
an object containing the primary key that you use to upsert the data.You need to start your mappings with an array. The endpoint expects an array of objects, even if the array only contains one item.
For example, if you generate 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 you add the fields manually, for Field Location
:
Invalid - no parent array
keys.EmailAddress
Valid - property has parent array
[].keys.EmailAddress