Territory2Type

Represents the metadata for a category of territories in Sales Territories. Every Territory2 must have a Territory2Type. Available if Sales Territories has been enabled.

This type extends Metadata and inherits its fields.

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

Introduced in API version 32.0.

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

  • Type: string
  • Required: No
  • Description: A description of the territory type.
  • Type: string
  • Required: Yes
  • Description: Required. The user interface label for the territory type.
  • Type: int
  • Required: Yes
  • Description: 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.

The following example shows the definition of a Territory2Type component.

Sales Territories components don’t support packaging or change sets and aren’t supported in CRUD calls.

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.