Portal Community

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

Configuration

Connection

FieldTypeRequiredDescription
InstanceUrlstringrequiredSalesforce org URL.
AccessTokenstringrequiredValid OAuth2 access token.

Operation Fields

FieldTypeRequiredDescription
AccountIdstringrequired18-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 CodeCondition
CFG_MISSING_INSTANCEInstanceUrl is missing.
CFG_MISSING_TOKENAccessToken is missing.
VAL_MISSING_FIELDAccountId is missing.
UNEXPECTED_ERRORUnexpected exception during execution.

Output

Success Port

FieldTypeDescription
statusstringAlways deleted.
resourcestringAlways account.
operationstringAlways delete.

Error Port

FieldTypeDescription
errorCodestringMachine-readable error code.
messagestringHuman-readable error description.

Sample Output

{ "status": "deleted", "resource": "account", "operation": "delete" }

Expression Reference

ExpressionDescription
{{nodes.DeleteAccount.status}}Deletion result status.
{{nodes.DeleteAccount.errorCode}}Error code from error port.

Node Policies & GuardRails

PolicyDetail
Cascade deletionDeleting an Account soft-deletes related Contacts and Opportunities. Review child records before deleting.
Recycle BinDeleted accounts remain in Recycle Bin for 15 days. Can be restored within that window.
Prefer archivingFor non-GDPR scenarios, update account type to an inactive value rather than deleting.
Permission requiredAuthenticated user must have Delete permission on Account and related objects.
Error port wiringAlways 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}}" }