---
schema_version: "1"
id: 1a494eb1f5b954b7c78f36ce4e508a29c5934c30c180c22c0d87b1b0c053a7f4
title: Adjust Account Assignments in Sales Territories
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/territory_planning_maintain_etm_models.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.territory_planning_maintain_etm_models.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ad9aab95d41083f5f0e07505c535decfa7710934dd46d6069bbb3e67a6a9c8dd
description: Create datasets that include assigned accounts in a territory model from Sales Territories. Using those datasets, create and optimize alignments in Territory Planning, then publish them as your fine-tuned territories in Salesforce.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Adjust Account Assignments in Sales Territories

Create datasets that include assigned accounts in a territory model from Sales Territories. Using those datasets, create and optimize alignments in Territory Planning, then publish them as your fine-tuned territories in Salesforce.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Professional</strong>, <strong>Enterprise</strong>, <strong>Performance</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions with <a href="https://help.salesforce.com/s/articleView?id=sales.territory_planning_api_access.htm&amp;type=5&amp;language=en_US" target="_blank">Web Services API enabled</a></td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d71543e77">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d71543e77 ">To create datasets in Territory Planning:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d71543e77 ">
              <p>Sales Planning Ops Analyst permission set</p>
              <p>AND</p>
              <p>Query for Datapipelines User for Sales Planning permission set</p>
              <p>AND</p>
              <p style="margin-bottom:0;">SF Maps Territory Planning for Sales Planning permission set</p>
            </td>

          </tr>
        </tbody>
      </table>

1. Click **Datasets**, then click **Create**. Enter a name for the dataset and click **Next**.
    
    ![Option to create a dataset from the Active Datasets list](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/salesforce_maps_territory_planning_data_set_create_1.png)
2. Click **Build Territory Model Query**.
    
    ![Select build territory model query button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/salesforce_maps_territory_planning_data_set_create_etm_1.png)
3. Give your query a name, then select a branch from a Salesforce territory model.
    
    ![Territory model query from Sales Territories](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/salesforce_maps_territory_planning_data_set_create_etm_2.png)
4. Select the fields that you want to include, then select a territory. As you select fields and territories, Territory Planning populates the SOQL query field.
    
    ![Fields and territories for territory model query](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/salesforce_maps_territory_planning_data_set_create_etm_3.png)
5. Test your query, then save your work.
    
    ![Test and save territory model SOQL query](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/salesforce_maps_territory_planning_data_set_create_etm_4.png)
6. Your query is now available to include in the dataset. Click **Next**.
    
    ![Territory model query is available to include in dataset](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/salesforce_maps_territory_planning_data_set_create_etm_5.png)
7. If you don’t see the options you need for unit assignment, latitude, or longitude, turn on **Import Object Fields**, then select a unit assignment field such as Owner ID.
    
    ![Select object fields for create a dataset](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/salesforce_maps_territory_planning_data_set_create_etm_6.png)
8. To supplement your data with attributes from external sources in CSV files, click **Import from CSV**, then add the CSV files that you want.
    
    ![Supplement dataset with external CSV files](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-sales-sales_performance_management-264-0-0-production-enus/b1f2feb4-26b8-444f-97f7-be2349869d93/sales_performance_management/images/salesforce_maps_territory_planning_data_set_create_etm_7.png)
9. Click **Finish**.