Upsert rows in a Salesforce Marketing Cloud Data Extension using the REST API with batching

domain: salesforce.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Salesforce Bulk API 2.0 limits — the full failure-mode walkthrough related to salesforce.com, checked against official docs, with linked verified routes.

Steps

  1. Identify the Data Extension's External Key (visible in Email Studio > Data Extensions > Properties).
  2. 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.
  3. 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.
  4. 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.
  5. Confirm the response status: 200 with no body indicates success; errors return a JSON body with a message describing the issue.
  6. For asynchronous large-batch ingestion, consider the Bulk Import via Automation Studio or the /async/dataevents endpoint instead of synchronous rowset calls.

Known gotchas

Related routes

Upsert rows into a Salesforce Marketing Cloud Data Extension using the REST API with batching
developer.salesforce.com · 6 steps · unrated
Upsert rows into a Salesforce Marketing Cloud Data Extension using the synchronous REST API
developer.salesforce.com · 5 steps · unrated
Batch upsert HubSpot contacts using the v3 Contacts API
developers.hubspot.com · 5 steps · 100% success

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans