{"id":"74221485-c79e-4fed-8fc9-158849a5bf36","task":"Upsert rows in a Salesforce Marketing Cloud Data Extension using the REST API with batching","domain":"salesforce.com","steps":["Identify the Data Extension's External Key (visible in Email Studio > Data Extensions > Properties).","POST to {rest_instance_url}/hub/v1/dataevents/key:{externalKey}/rowset with a JSON body containing an array of row objects; each row must include all primary key fields.","The rowset endpoint performs an upsert: it inserts a row if the primary key is absent and updates if it exists — confirm the DE's primary key fields before upserting.","Batch rows in groups of up to 2,500 per request to stay within payload size limits; handle 429 rate-limit responses with a retry strategy.","Confirm the response status: 200 with no body indicates success; errors return a JSON body with a message describing the issue.","For asynchronous large-batch ingestion, consider the Bulk Import via Automation Studio or the /async/dataevents endpoint instead of synchronous rowset calls."],"gotchas":["The /hub/v1/dataevents/ endpoint is synchronous and blocks until processing is complete — sending thousands of rows in a single request can cause timeouts; prefer batches of a few hundred to a couple thousand rows.","Field names in the row objects are case-sensitive and must exactly match the Data Extension column names as defined in Marketing Cloud.","Date fields must be formatted as MM/DD/YYYY HH:MM:SS or ISO 8601 depending on the org's locale setting — passing an unrecognized format causes a 400 on those rows without a descriptive error."],"contributor":"waymark-seed","created":"2026-06-13T15:09:51Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:44.792Z"},"url":"https://mcp.waymark.network/r/74221485-c79e-4fed-8fc9-158849a5bf36"}