Skip to content

Salesforce - Update Record

↩ Part of the Salesforce integration.

Updates an existing record (PATCH /sobjects/{sobject}/{id}).

The call is a partial update: only the fields you send are written, the rest keep their value. Salesforce answers 204 No Content, so the node builds the confirmation object itself.

FieldTypeRequiredDescription
credentials_idcredentialsYesSalesforce credential
sobjecttextYesAPI name of the object: Account, Contact, Lead…
record_idtextYesId of the record to update
fieldsjsonYesFields to update, e.g. {"Phone":"555"}

All the parameters accept dynamic variables; the fields string is resolved as text before being parsed as JSON.

This module requires a Salesforce credential:

FieldDescription
login_urlhttps://login.salesforce.com or https://test.salesforce.com for a sandbox
client_id / client_secretConsumer Key and Secret of the Connected App
usernameSalesforce user
passwordPassword plus the security token, concatenated

Salesforce returns no body, so data is the confirmation built by the node:

{
"id": "0065g00000AbCdEFGH",
"updated": true
}

Along with it, _meta:

{ "moduleVersion": "1.0.0", "success": true, "id": "0065g00000AbCdEFGH", "totalMs": 290 }

If you need the values as they ended up stored, read the record afterwards with Get record.

{
"credentials_id": "salesforce_prod",
"sobject": "Opportunity",
"record_id": "{{data.opportunityId}}",
"fields": { "StageName": "Closed Won", "Amount": 15000 }
}
{
"credentials_id": "salesforce_prod",
"sobject": "Contact",
"record_id": "{{data.contactId}}",
"fields": { "Phone": "{{data.phone}}", "MailingCity": "{{data.city}}" }
}
{
"credentials_id": "salesforce_prod",
"sobject": "Case",
"record_id": "{{data.caseId}}",
"fields": { "Status": "Closed", "Description": "Resolved automatically by the flow." }
}
  • Only the fields you send are written; the others are untouched.
  • Do not include Id inside fields — the id travels in the URL, and sending it in the body returns a 400.
  • To clear a field, send null. Sending an empty string works for text fields but not for lookups or dates.
  • Formula, roll-up and system fields (CreatedDate, LastModifiedDate) are read-only and return 400 INVALID_FIELD_FOR_INSERT_UPDATE.
  • Validation rules, required fields and triggers all fire here. Their message comes back in the error.message of the node, and these errors are not retried.
  • If fields is not a JSON object, or record_id is empty, the node stops before calling Salesforce.