Salesforce - Delete Record
↩ Part of the Salesforce integration.
Description
Section titled “Description”Deletes a record by its id (DELETE /sobjects/{sobject}/{id}).
Salesforce answers 204 No Content, so the node builds the confirmation object itself. The record goes to the org’s Recycle Bin, where it can be restored for 15 days, the same as a deletion made from the UI.
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 delete |
Both sobject and record_id accept dynamic variables.
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”data is the confirmation built by the node:
{ "id": "00Q5g00000AbCdEFGH", "deleted": true}Along with it, _meta:
{ "moduleVersion": "1.0.0", "success": true, "id": "00Q5g00000AbCdEFGH", "totalMs": 260 }Usage Example
Section titled “Usage Example”Delete a test lead
Section titled “Delete a test lead”{ "credentials_id": "salesforce_sandbox", "sobject": "Lead", "record_id": "{{data.leadId}}"}Delete a duplicated contact
Section titled “Delete a duplicated contact”{ "credentials_id": "salesforce_prod", "sobject": "Contact", "record_id": "{{data.duplicateId}}"}Delete a record of a custom object
Section titled “Delete a record of a custom object”{ "credentials_id": "salesforce_prod", "sobject": "Subscription__c", "record_id": "{{data.subscriptionId}}"}- The record lands in the Recycle Bin and can be restored for 15 days. It is not an immediate permanent erase.
- Deletion cascades: deleting an Account also deletes its Contacts, Opportunities and Cases. Confirm the scope before running this on production data.
- If another record references it and the relationship blocks the delete, Salesforce returns
400 DELETE_FAILEDwith the list of blocking records. This is not retried. - A
404means the record no longer exists — running the same flow twice hits it. Guard the branch with a SOQL query if that is a problem. - If
sobjectorrecord_idresolve to an empty value, the node stops with a validation error before calling Salesforce.
Related Nodes
Section titled “Related Nodes”- Salesforce: Get record — snapshot the record before deleting it.
- Salesforce: SOQL query — get the ids of the records to delete.
- Salesforce: Update record — flag the record as inactive instead of deleting it.