Salesforce - Update Record
↩ Part of the Salesforce integration.
Description
Section titled “Description”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.
Configuration
Section titled “Configuration”| Field | Type | Required | Description |
|---|---|---|---|
credentials_id | credentials | Yes | Salesforce credential |
sobject | text | Yes | API name of the object: Account, Contact, Lead… |
record_id | text | Yes | Id of the record to update |
fields | json | Yes | Fields to update, e.g. {"Phone":"555"} |
All the parameters accept dynamic variables; the fields string is resolved as text before being parsed as JSON.
Credentials
Section titled “Credentials”This module requires a Salesforce credential:
| Field | Description |
|---|---|
login_url | https://login.salesforce.com or https://test.salesforce.com for a sandbox |
client_id / client_secret | Consumer Key and Secret of the Connected App |
username | Salesforce user |
password | Password plus the security token, concatenated |
Output
Section titled “Output”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.
Usage Example
Section titled “Usage Example”Move an opportunity forward
Section titled “Move an opportunity forward”{ "credentials_id": "salesforce_prod", "sobject": "Opportunity", "record_id": "{{data.opportunityId}}", "fields": { "StageName": "Closed Won", "Amount": 15000 }}Update a contact’s phone
Section titled “Update a contact’s phone”{ "credentials_id": "salesforce_prod", "sobject": "Contact", "record_id": "{{data.contactId}}", "fields": { "Phone": "{{data.phone}}", "MailingCity": "{{data.city}}" }}Close a case
Section titled “Close a case”{ "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
Idinsidefields— the id travels in the URL, and sending it in the body returns a400. - 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 return400 INVALID_FIELD_FOR_INSERT_UPDATE. - Validation rules, required fields and triggers all fire here. Their message comes back in the
error.messageof the node, and these errors are not retried. - If
fieldsis not a JSON object, orrecord_idis empty, the node stops before calling Salesforce.
Related Nodes
Section titled “Related Nodes”- Salesforce: Get record — read the current values before deciding what to change.
- Salesforce: Upsert record — update when the record exists, create it when it does not.
- Salesforce: SOQL query — get the ids of the records to update.