Skip to main content

Salesforce Marketing Cloud

Insert vs Upsert for Salesforce Marketing Cloud Form Data

A practical framework for choosing insert or upsert behavior when form responses are delivered to a Salesforce Marketing Cloud Data Extension.

8 min read

By Published Last updated

Insert and upsert are not interchangeable implementation details. They encode what a submission means, how identity is resolved, and what should happen when the same person returns. The safer choice starts with the campaign’s data contract—not with whichever operation is easiest to call.

Start with the meaning of a row

Before choosing a write operation, define what one row in the destination Data Extension represents. It might be a person, a single campaign response, a preference state, an event registration, or an attempt. Each model creates a different expectation for repeated submissions.

If a row represents a unique response event, inserting a new record for each completed submission preserves history. If a row represents the current state of a known customer, updating the row associated with that identity may better match the business requirement.

  • Person-state model: one current row per stable audience identifier.
  • Event model: one immutable row per response or campaign interaction.
  • Hybrid model: current state in one Data Extension and an append-only event history in another.

When insert is the clearer choice

Use insert when every accepted submission should create a distinct record. This is common for applications, competition entries, surveys where response history matters, or event logs that should not be overwritten by a later interaction.

The design still needs a uniqueness strategy. A response identifier can distinguish submissions even when the same subscriber participates more than once. Without that decision, a primary-key collision can turn a valid repeat response into a delivery failure.

  • Preserve every response as a separate event.
  • Generate or carry a unique response identifier.
  • Decide whether duplicates are valid business events before rejecting them.

When upsert better matches the journey

Use upsert when a submission is intended to create or refresh the current record for a known key. Preference centers and profile-enrichment flows often fit this model because the destination represents the latest known state rather than a history of every click.

Upsert is only as reliable as its matching key. Email can change, be shared, or arrive in inconsistent casing. A stable subscriber or customer identifier is usually a stronger identity contract when the surrounding Marketing Cloud implementation can provide one securely.

  • Identify the field or compound key that represents the same customer state.
  • Separate fields the respondent may change from trusted identifiers used for matching.
  • Define whether an unmatched key should create a row or fail for review.

Treat partial progress separately from final delivery

Autosaved progress and completed responses have different meanings. Writing every partial interaction directly into the final activation Data Extension can create records that look campaign-ready even though the respondent never submitted.

A clearer model keeps draft state in the response system, marks completion explicitly, and delivers to the activation destination only according to the campaign contract. If partial intent is valuable, route it deliberately with a status and timestamp that downstream teams understand.

A review checklist before launch

The correct operation is the one that behaves predictably across first submissions, repeat submissions, stale links, changed identifiers, and delivery retries. Review those cases with both the campaign owner and the person responsible for the Data Extension.

  • What does one row represent?
  • Which key proves that two submissions belong to the same state?
  • Should a repeat response create history or replace current values?
  • What happens when the key is missing, invalid, or already present?
  • Can an unsuccessful delivery be retried without creating an unintended duplicate?
  • How can operations distinguish a draft, a completed response, and a delivered record?