How to mass-delete Territories?
|Knowledge Article Number||000025422|
|Description||Within Salesforce Territory Management, territories can easily be removed manually by doing Setup | Manage Territory | Hierarchy & then click on [Del] for a selected bottom-level territory. But what about deleting large numbers of territories at one time?
The Data Loader can help with mass territory deletion, but because Salesforce territories cannot be deleted if they have child territories, your deletion must be organized to delete bottom-level territories first, working up through the territory tree. But how can this be done?
Fist use Data Loader to export the Territory data from the Territory Object and prepare an Excel CSV file listing all the territories you want to remove from the TM Hierarchy.
Choose Show all objects to select Object=Territory. Then include fields: Id, Name, ParentTerritoryId.
IMPORTANT: Either use SOQL query in your Data Loader export or edit the CSV file later to EXCLUDE territories you don't want to delete.
Next, there are two options for removing the exported territories choose ONE: