What are the considerations when deleting an approval process?

Why delete an approval process carefully?

Approval processes in Salesforce control record submission, locking, notification, and automated actions. Deleting one without proper planning can break automation, leave pending requests in limbo, or cause integration failures. Below are the key considerations and a recommended safe deletion checklist.

Key considerations

1. Deactivate before deleting

Salesforce requires that an approval process be inactive before it can be deleted. Always switch the approval process to Inactive first — this prevents new submissions while you clean up and prevents accidental approval requests.

2. Handle pending approval requests

Pending approval requests must be resolved before deletion. Identify any open requests and either recall, approve, or reject them. Leaving pending requests will block deletion and may leave records locked.


-- Example SOQL to find pending approval instances
SELECT Id, ProcessDefinitionId, TargetObjectId, Status
FROM ProcessInstance
WHERE Status = 'Pending'
LIMIT 200

3. Record locking and data access

Approval processes often lock records while a request is pending. Ensure records are unlocked (by approving/rejecting or recalling) so users regain edit access. Check for any records that remain locked after deactivation.

4. Related automation and actions

Approval processes can contain submission actions, step actions, final approval/rejection actions (email alerts, tasks, field updates, outbound messages, Apex, etc.). Deleting the approval process removes those metadata definitions — confirm that no other automation depends on the fields or side effects produced by those actions.

5. Integrations and external references

External systems, middleware, or custom code may reference the approval process by name or DeveloperName (metadata). Update integration logic, API clients, or middleware to avoid calling a deleted process, and notify integration owners.

6. Deployment and metadata management

Deleting an approval process in production should be done via a controlled deployment. Use destructiveChanges.xml (Metadata API) for programmatic deletions or include removal in change sets with caution. Ensure source control accurately reflects the deletion.

7. Audit, history, and reporting

Completed approvals are recorded in objects such as ProcessInstance and ProcessInstanceStep. Deleting the approval process removes the metadata but the historical records remain. Validate your org’s audit requirements and export approval history reports if needed before deletion.

8. Managed packages and locked components

If the approval process is part of a managed package or installed component, deletion may be restricted. Coordinate with the package owner or update the package instead.

9. Permission and ownership

Verify who has the ability to change or delete approval processes (typically administrators). Ensure approver queues, users, and public groups used in the process are still valid or updated.

10. Communication and change management

Notify stakeholders, approvers, and support teams about the planned deletion. Clearly explain the timeline, expected behavior changes, and rollback plan.

Safe deletion checklist

Follow these steps to reduce risk when removing an approval process:

  1. Document the approval process (steps, actions, entry criteria).
  2. Back up metadata (retrieve via Metadata API / retrieve in source control).
  3. Deactivate the approval process.
  4. Identify and resolve pending approval requests (SOQL on ProcessInstance).
  5. Confirm no live automations or integrations depend on it.
  6. Run tests in a sandbox and validate behavior.
  7. Deploy deletion to production using destructiveChanges.xml or a controlled UI delete during a maintenance window.
  8. Monitor logs, record access, and approval history after deletion.

Useful queries and examples

Find the approval process definition (metadata):


-- find process definitions (Tooling API / Developer Console)
SELECT Id, DeveloperName, TableEnumOrId
FROM ProcessDefinition
WHERE DeveloperName = 'My_Approval_Process'
LIMIT 10

Find pending instances for review:


SELECT Id, ProcessDefinitionId, TargetObjectId, Status
FROM ProcessInstance
WHERE Status = 'Pending' AND ProcessDefinitionId = 'YOUR_PROCESS_DEFINITION_ID'

Summary

Deleting an approval process affects record locking, notifications, integrations, and other automations. Always deactivate first, resolve pending approvals, back up metadata, validate in a sandbox, and use a controlled deployment path. Proper planning and communication will prevent disruption and maintain compliance.