Updating and Pushing Salesforce Records with the MuleSoft Salesforce Connector

Article Written By:
Varalatchumi Veerasamy
Created On:

July 13, 2026

Updating and pushing Salesforce records with the MuleSoft Salesforce Connector

To update or push Salesforce records with the MuleSoft Salesforce Connector, use one of three write operations: Create to insert new records, Update to change existing ones by their record ID, and Upsert to insert-or-update by an external ID. For pushing data from another system, Upsert with an external ID is the safest choice because it never creates duplicates. Each operation takes an array of records mapped with DataWeave and returns a per-record success or error result.

This guide shows how to update and push records step by step, when to use each operation, how to handle bulk writes, and how to fix the errors that show up most — the write side of any MuleSoft and Salesforce integration.

What "Pushing" Records to Salesforce Means

Pushing records means writing data from an external system into Salesforce through the MuleSoft Salesforce Connector - creating new records or updating existing ones so Salesforce stays current with the source. It's the write half of an integration; the read half is querying data out.

In a typical flow, a Mule application receives data - an order from an ERP, a lead from a form, a status from an ops platform - maps it to Salesforce fields, and calls a write operation. The connector handles the API call, and the response tells you which records succeeded and which failed.

Before it writes anything, the connector authenticates to Salesforce - OAuth 2.0 (JWT bearer for production) or Basic auth for testing. For the exact inputs each write operation expects, keep the connector's operations reference and documentation open as you build.

Create, Update, or Upsert: MuleSoft Salesforce Connector Write Operations

Choosing the right operation prevents duplicates and failed writes. Here's the quick decision guide.

OperationWhat it needsUse whenCreateField values (no ID)The record is brand new to SalesforceUpdateThe Salesforce record IDYou already know the record existsUpsertAn external ID fieldPushing from another system without duplicates

The rule of thumb: if the data comes from an external system and you can't be sure whether the record already exists, use Upsert with an external ID. It's the one operation that safely handles both new and existing records in a single call.

How to Update Salesforce Records

Update changes existing records, matched by their Salesforce ID. Here's the flow.

  • Get the record IDs. Query Salesforce first, or carry the IDs from a prior step, so each record you send has its Id.
  • Map the payload with DataWeave. Build an array of objects where each has an Id plus the fields to change, using Salesforce API field names.
  • Add the Update operation. Point it at the object (for example, Account) and pass the mapped array as the records.
  • Check the result. The connector returns a result per record - confirm each success is true and log any errors.

Update fails if an ID is missing or wrong, so validate that every record carries a valid Id before the call.

How to Push Records with Upsert

Upsert is the workhorse for pushing data in from another system. It uses an external ID field - a custom field on the Salesforce object marked "External ID" that holds the unique key from the source system.

  • Create an external ID field on the Salesforce object (for example, Source_Record_Id__c) and mark it as an External ID.
  • Map the payload so each record includes that external ID plus the fields to write.
  • Add the Upsert operation, choose the object, and select the external ID field as the match key.
  • Salesforce decides: if a record with that external ID exists, it updates; if not, it creates. No duplicates, no pre-check query needed.

This is why Upsert is the default for pushing records — one call keeps Salesforce in sync with the source, whether the record is new or not.

Pushing Records in Bulk

The standard operations work record by record, which is fine for small volumes but burns API calls fast. For hundreds of thousands of records, switch to the connector's Bulk operations, which use the Salesforce Bulk API to process data asynchronously in batches.

  • Use Create Job / Upsert (bulk) operations for large loads and data migrations.
  • Batch your records so each job stays within Salesforce batch limits.
  • Poll the job or handle the completion event, then read the results to catch failed rows.

The trade-off is timing: bulk is asynchronous, so results come back after the job finishes rather than instantly. For live, single-record pushes, stay with the standard operations. Bulk behavior can shift between connector releases, so pin your connector version (the Mule 4 line) and check the release notes before upgrading.

Common Errors When Updating and Pushing Records

Write operations fail for a predictable set of reasons. Here's how to clear the common ones.

ErrorRoot causeFixMALFORMED_IDMissing or invalid record ID on UpdateEnsure every record carries a valid 15- or 18-character IDDUPLICATE_VALUEDuplicate rule or a repeated unique fieldUse Upsert on an external ID; dedupe before writingREQUIRED_FIELD_MISSINGA required Salesforce field wasn't sentAdd the field in the DataWeave mappingINVALID_FIELD / picklist errorWrong API name, type, or picklist valueMatch API field names and align picklist valuesField-level security errorIntegration user can't edit the fieldGrant field access on the integration user's profile

Because the connector returns results per record, a batch can partly succeed - always inspect each result rather than assuming the whole call worked. For platform detail, the Salesforce Developer blog and Salesforce Admins resources cover write errors and limits, and Apex Hours and Salesforce Ben have MuleSoft examples.

Best Practices for a Salesforce MuleSoft Integration

A few habits keep your writes clean, idempotent, and inside Salesforce limits:

  • Default to Upsert with an external ID. It makes pushes idempotent - running the same flow twice won't create duplicates.
  • Handle partial failures. Read the per-record results, route failures to an error log or retry queue, and don't let one bad row stop the batch.
  • Batch and use Bulk for volume. Group records and switch to Bulk operations well before you approach API limits.
  • Match field API names and types. Map deliberately in DataWeave so a text value never lands in a number or picklist field.
  • Use a scoped integration user. Give it edit access only to the objects and fields it writes, and nothing more.

These are the same standards we hold on every Salesforce integration with MuleSoft, because a write that fails quietly is worse than one that fails loudly.

Frequently Asked Questions

1. How do you update Salesforce records with MuleSoft?

Use the connector's Update operation. Supply each record's Salesforce ID plus the fields to change, mapped with DataWeave, then call Update on the target object. Check the per-record result to confirm each write succeeded.

2. What is the difference between Update and Upsert in the MuleSoft Salesforce Connector?

Update changes existing records matched by Salesforce ID and fails if the record doesn't exist. Upsert matches on an external ID and creates the record if it's missing or updates it if it exists - which is safer for pushing data from another system.

3. How do you avoid duplicates when pushing records to Salesforce?

Use Upsert with an external ID field that holds the unique key from your source system. Salesforce matches on that field and updates the existing record instead of creating a new one, so repeated pushes stay idempotent.

4. How do you push large volumes of records with the MuleSoft Salesforce Connector?

Use the Bulk operations, which run on the Salesforce Bulk API and process records asynchronously in batches. Batch within Salesforce limits, then read the job results to catch any failed rows.

5. Why is my MuleSoft Salesforce write only partly succeeding?

Salesforce write operations return a result per record, so a batch can partially succeed. Inspect each result, log the failures with their error messages, and retry or correct those rows rather than assuming the whole call worked.

6. Is this the same as the MuleSoft SFDC connector?

Yes - "SFDC" is shorthand for Salesforce, so the MuleSoft SFDC connector is the same Anypoint Connector used here to update and push records. The Create, Update, and Upsert operations work the same regardless of which name you see.

7. How does the connector authenticate before writing?

Through the Salesforce connection you configure once - OAuth 2.0 (JWT bearer for production) or Basic authentication with a username, password, and security token for testing. That connection is reused across every write operation in your flows.

Push Salesforce Data Reliably With Minuscule Technologies

Updating and pushing Salesforce records with the MuleSoft Salesforce Connector comes down to picking the right operation - Create, Update, or Upsert - mapping fields cleanly, handling partial failures, and using Bulk for volume. Get those right and data flows into Salesforce accurately, every run, without duplicates.

That's what we do at Minuscule Technologies. As a trusted Salesforce engineering partner with 160+ specialists and 75+ projects delivered since 2014, we design and build Salesforce integrations and MuleSoft-based data flows for enterprises - including Nasdaq-listed firms - that need clean, reliable writes into Salesforce from every system they run. From a single push flow to an API-led integration program, we build it and manage it long term.

Need Salesforce records to update themselves from the rest of your stack? Talk to Minuscule Technologies and let's build the flow.

Contact Us for Free Consultation
Thank you! We will get back in touch with you within 48 hours.
Oops! Something went wrong while submitting the form.

Recent Blogs

Ready to Architect Your Salesforce Success?

You've seen what's possible. Now, let's make it happen for your business. Whether you need an end-to-end Salesforce solution, a complex integration, or ongoing managed services, our team is ready to deliver.

Schedule a Free Strategic Call