account/delete
Delete a Salesforce Account record. Related Contacts and Opportunities are also soft-deleted.
Cascade Warning: Deleting an Account also soft-deletes all related Contacts and Opportunities linked to that account. All deleted records move to the Salesforce Recycle Bin and remain recoverable for 15 days. Use with extreme caution in production.
When to Use
- Remove duplicate accounts after a merge operation to keep the org clean.
- Delete test accounts created during QA or staging testing.
- Process GDPR right-to-erasure requests that require full account removal.
Configuration
Connection
| Field | Type | Required | Description |
InstanceUrl | string | required | Salesforce org URL. |
AccessToken | string | required | Valid OAuth2 access token. |
Operation Fields
| Field | Type | Required | Description |
AccountId | string | required | 18-character Salesforce Account ID of the record to delete. |
Sample Configuration
{
"Resource": "account",
"Operation": "delete",
"InstanceUrl": "https://myorg.my.salesforce.com",
"AccessToken": "{{credentials.salesforce.accessToken}}",
"AccountId": "{{nodes.FindDuplicateAccount.Id}}"
}
Validation Errors
| Error Code | Condition |
CFG_MISSING_INSTANCE | InstanceUrl is missing. |
CFG_MISSING_TOKEN | AccessToken is missing. |
VAL_MISSING_FIELD | AccountId is missing. |
UNEXPECTED_ERROR | Unexpected exception during execution. |
Output
Success Port
| Field | Type | Description |
status | string | Always deleted. |
resource | string | Always account. |
operation | string | Always delete. |
Error Port
| Field | Type | Description |
errorCode | string | Machine-readable error code. |
message | string | Human-readable error description. |
Sample Output
{ "status": "deleted", "resource": "account", "operation": "delete" }
Expression Reference
| Expression | Description |
{{nodes.DeleteAccount.status}} | Deletion result status. |
{{nodes.DeleteAccount.errorCode}} | Error code from error port. |
Node Policies & GuardRails
| Policy | Detail |
| Cascade deletion | Deleting an Account soft-deletes related Contacts and Opportunities. Review child records before deleting. |
| Recycle Bin | Deleted accounts remain in Recycle Bin for 15 days. Can be restored within that window. |
| Prefer archiving | For non-GDPR scenarios, update account type to an inactive value rather than deleting. |
| Permission required | Authenticated user must have Delete permission on Account and related objects. |
| Error port wiring | Always wire the error port. Locked records and permission restrictions cause failure. |
Examples
Delete Duplicate After Account Merge
{ "AccountId": "{{nodes.IdentifyDuplicate.duplicateAccountId}}" }
QA Cleanup — Delete Test Accounts
// GetAll: Query = "Name LIKE 'TEST_%'"
// Loop: account/delete each
{ "AccountId": "{{loop.current.Id}}" }
GDPR Erasure
// SOQL: SELECT Id FROM Account WHERE Website = '{{trigger.domain}}'
// Delete account after identity verification step:
{ "AccountId": "{{nodes.FindAccount.records[0].Id}}" }