Newer Version Available

This content describes an older version of this product. View Latest

Territory2Settings

Represents the metadata for the default settings for Territory Management 2.0 users to access and modify records associated with sales territories. The standard record access settings apply to accounts and opportunities. If your Salesforce org uses Private default internal access for contacts or cases, you can also set access for those records. This type extends the Metadata metadata type and inherits its fullName field. Available only if Territory Management 2.0 has been enabled for your org.

File Suffix and Directory Location

Territory2Settings components have the suffix settings and are stored in the Settings folder.

Version

Territory2Settings components are available in API version 32.0 and later.

Special Access Rules

The Territory2Model object has a State field in the SOAP API. States include Planning, Active, Archived, and a number of other states, such as Cloning, that indicate that a process is underway. Users who do not have the “Manage Territories” permission can access only territories that belong to the model in Active state. The “Manage Territories” permission is required for deploy() calls for all territory management entities, in addition to the “Modify All Data” permission required by Metadata API. Using retrieve() without the “Manage Territories” permission will return only entities that belong to a Territory2Model in Active state. We recommend against retrieving without the “Manage Territories” permission because the call will retrieve only partial data.

Fields

Field Name Field Type Description
defaultAccountAccessLevel string The default level of access users will have to account records in territories: view and edit accounts assigned to territories or view, edit, transfer, and delete accounts assigned to territories.
defaultCaseAccessLevel string The default level of access users will have to case records in territories: view and edit accounts assigned to territories or view, edit, transfer, and delete accounts assigned to territories.
defaultContactAccessLevel string The default level of access users will have to contact records in territories: view and edit accounts assigned to territories or view, edit, transfer, and delete accounts assigned to territories.
defaultOpportunityAccessLevel string The default level of access users will have to opportunity records in territories: view and edit accounts assigned to territories or view, edit, transfer, and delete accounts assigned to territories.

Declarative Metadata Sample Definition

The following example shows the definition of a Territory2Settings component.

1<?xml version="1.0" encoding="UTF-8"?>
2<Territory2Settings xmlns="http://soap.sforce.com/2006/04/metadata">
3    <defaultAccountAccessLevel>Owner</defaultAccountAccessLevel>
4    <defaultOpportunityAccessLevel>Read</defaultOpportunityAccessLevel>
5    <defaultCaseAccessLevel>None</defaultCaseAccessLevel>
6    <defaultContactAccessLevel>Edit</defaultContactAccessLevel>
7</Territory2Settings>

Usage

Territory Management 2.0 components don’t support packaging or change sets and aren’t supported in CRUD calls.

Wildcard Support in the Manifest File

The wildcard character * (asterisk) in the package.xml manifest file doesn’t apply to metadata types for feature settings. The wildcard applies only when retrieving all settings, not for an individual setting. For details, see Settings. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.