Deleting multiple Process builders version using Workbench

Apex Dec 03, 2019

We can achieve bulk deletion of Process Builder in fact all other Metadata Types like Apex classes, Visualforce Pages can be deleted in the same way by creating  destructiveChanges.xml and adding corresponding Metadata Types / Members in that file

In this post we are aiming to delete multiple process builders and this is how destructiveChanges.xml look like

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>process_builder-1</members>
        <members>process_builder-2</members>
        <members>process_builder-3</members>
        <members>process_builder-4</members>
        <name>Flow</name>
    </types>Ï
</Package>
destructiveChanges.xml

Along with above file we need package.xml which doesn't have any information other than version as shown below

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">    
  <version>45.0</version>
</Package>
package.xml

Now we need to zip above two files viz package.xml, destructiveChanges.xml then we need to upload using workbench as follows

Login into Workbench using Sandbox or production then navigate to migration -> Deploy, your screen should resemble following screenshot

Upload above .zip file using choose file after that click Next Button then click Deploy button to delete from Sandbox/Production

NOTE: In the above file you can add ApexClasses, ApexPages, ApexTrigger etc., so that all unwanted items can be delete in one go for e.g.,

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>ApexClassOne</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>VisualforcePage1</members>
        <name>ApexPage</name>
    </types>
    <version>46.0</version>
</Package>
destructiveChanges.xml

Phanindra Mangipudi

Salesforce, Lightning Web Componets, Node.Js, Angular 2+, Bootstrap