---
schema_version: "1"
id: 8b38fba3de4a1f2f5d9d37aa064397bd477eff07a251cfb7db12866d8cc3a608
title: Territory2Type
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_meta/meta_territory2type.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_territory2type.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e227d311b3c8c095b518d9a73ad7b9752b41fec9536c484dc079868cd2590e75
description: Represents the metadata for a category of territories in Sales Territories. Every Territory2 must have a Territory2Type. This type extends the Metadata metadata type and inherits its fullName field. Available if Sales Territories has been enabled.
---
# Territory2Type

Represents the metadata for a category of territories in Sales Territories. Every Territory2 must have a Territory2Type. This type extends the Metadata metadata type and inherits its fullName field. Available if Sales Territories has been enabled.

## File Suffix and Directory Location

Territory2Type components have the suffix territory2Type and are stored in the territory2Types folder.

## Version

Territory2Type components are available in API version 32.0 and later.

## Special Access Rules

The Manage Territories permission is required for the deploy() operation, but not retrieve(). The retrieve() operation retrieves all the Territory2Type components in the org.

## Fields

| Field Name | Field Type | Description |
| --- | --- | --- |
| description | string | A description of the territory type. |
| name | string | Required. The user interface label for the territory type. |
| priority | int | Required. Used for Filter-Based Opportunity Territory Assignment (Pilot in Spring ’15 / Metadata API version 33). Lets you specify a priority for a territory type. For opportunity assignments, the filter examines all territories assigned to the account that the opportunity is assigned to. The account-assigned territory whose territory type priority is highest is then assigned to the opportunity. The priority field value on each territory type must be unique. Further, if there are multiple territories with the same territory type, and therefore the same priority, assigned to the account, no territory is not assigned to the opportunity. |

## Declarative Metadata Sample Definition

The following example shows the definition of a Territory2Type component.

<?xml version="1.0" encoding="UTF-8"?>
<Territory2Type xmlns="http://soap.sforce.com/2006/04/metadata">
    <name\>Geo</name\>
    <description\>Geographic allocation</description\>
</Territory2Type\>

## Usage

Sales Territories components don’t support packaging or change sets and aren’t supported in [CRUD calls](https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_crud_based_calls_intro.htm "Use CRUD-based calls to work with metadata components in a manner similar to how synchronous API calls in the enterprise WSDL act upon objects.").

## Wildcard Support in the Manifest File

This metadata type supports the wildcard character \* (asterisk) in the package.xml manifest file. For information about using the manifest file, see [Deploying and Retrieving Metadata with the Zip File](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/file_based_zip_file.htm).