---
schema_version: "1"
id: b080d665c9961508b91569f684214f21e5b721ffe152d49c21e7e5ecd318dca6
title: Assign Units to Territories Based on Metrics
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/territory_planning_design_units_assign_to_territories.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.territory_planning_design_units_assign_to_territories.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a015da0586d0d43244aa37e2adb7c583702f95910c844705ff65bb6987fffdde
description: Maximize your company’s unique products and services when you incorporate attributes into unit formulas in Territory Planning. Analyze territories using metrics that, for example, combine and weight fields so you can prioritize sales of one product over another. Then use those numbers to inform your sales plan and assign accounts to territories.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# Assign Units to Territories Based on Metrics

Maximize your company’s unique products and services when you incorporate attributes into unit formulas in Territory Planning. Analyze territories using metrics that, for example, combine and weight fields so you can prioritize sales of one product over another. Then use those numbers to inform your sales plan and assign accounts to territories.

### 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="d26918e77">User Permissions Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d26918e77 ">To modify alignments:</td>

            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d26918e77 ">
              <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. Open an alignment and set the focus.
2. In Settings, select **Attributes** | **Calculated Attributes**.
    
    ![Creating calculated attributes](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/territory_planning_design_units_calculated_attributes.png)
3. Click **New** next to the unit level.
4. Name your attribute.
5. Use the Attributes and Functions tabs to start building your formula. To add an aggregated attribute, select a value in Summarize Attribute. The value represents the aggregate for that attribute in the alignment. For example, selecting MIN for annual revenue references the minimum value for annual revenue in the alignment.
    
    ![Configure calculated attributes.](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/territory_planning_design_units_calculated_attributes_formula.png)
    
    This example combines and weights annual revenue from primary care locations and hospitals. A medical equipment company has high revenue from successful hospital sales. The company wants reps to spend more time at primary care locations. So, to prioritize primary care sales over hospital sales, the formula weights primary care sales higher. Then, when you take the total of the calculated attributes by territory, territories with higher primary care sales rank better.
6. Click **Add to Attribute Formula**.
7. Save the formula.
8. Add columns for the calculated attribute to the legend.
9. Optimize the alignment based on the calculated attribute.
    
    ![Result of calculated attribute](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/territory_planning_design_units_calculated_attributes_result.png)