The Territory Planning Unit Assignment (TPUA) object in Salesforce holds all the individual units (Salesforce records) and boundary containers for Territory Planning Datasets and Alignments. Storage is handled differently between Datasets created using live and copied data.
For each Dataset that is created using copied data, a TPUA record is created for each unit it contains. So if 25,000 Accounts were added to the Dataset from a SOQL query or a Report, 25,000 TPUA records would be created. No TPUA records are created for Datasets created with live data.
For each Alignment created in Territory Planning, a TPUA record is created for each unit that exists in the Alignment and for each container that is added to the Alignment; however, when using live data, a TPUA is only created after assigning a record to an area. For example, if you created an Alignment with 25,000 Accounts and selected United States Postal Codes as the container set (which has 32,584 postal codes), then the total number of created TPUA records would be 57,584 (25,000 + 32,584).
Let's bring these concepts together and look at the overall impact to an org when using either option.
Live
Dataset = 0 records
Alignment = 25,000 TPUA records for accounts + 32,583 TPUA records for boundaries = 57,584 records
Total = 57,584 records
Copied
Dataset = 25,000 TPUA records for accounts
Alignment = 25,000 TPUA records for accounts + 32,583 TPUA records for boundaries = 57,584 records
Total = 82,584 records
The TPUA object in Salesforce can accumulate a large amount of data over time due to the continuous insertion of records for every Dataset and Alignment. This can potentially slow down the system's performance and make data management more challenging. To ensure Data storage is managed effectively, it's indeed important to regularly archive and delete old and unused Datasets and Alignments from Territory Planning UI. Once these have been deleted, the admin can run the Permanently Delete job from the Maps configuration page. Running the 'Permanently Delete' job will help in removing all the records related to the deleted datasets and alignments from the related objects, including TPUA. You can run the below SOQL queries to check how many Datasets and Alignments are in the deleted Status-
SELECT ID FROM maps__TPDataSet__c WHERE maps__Status__c = 'Deleted'
SELECT ID FROM maps__TPAlignment__c WHERE maps__Status__c = 'Deleted'
Here are the steps to run the Permanently Delete job:
Notes:
001176945

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.