Skip to content

Salesforce - Delete Record

↩ Part of the Salesforce integration.

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.

FieldTypeRequiredDescription
credentials_idcredentialsYesSalesforce credential
sobjecttextYesAPI name of the object: Account, Contact, Lead…
record_idtextYesId of the record to delete

Both sobject and record_id accept dynamic variables.

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

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 }
{
"credentials_id": "salesforce_sandbox",
"sobject": "Lead",
"record_id": "{{data.leadId}}"
}
{
"credentials_id": "salesforce_prod",
"sobject": "Contact",
"record_id": "{{data.duplicateId}}"
}
{
"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_FAILED with the list of blocking records. This is not retried.
  • A 404 means 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 sobject or record_id resolve to an empty value, the node stops with a validation error before calling Salesforce.