---
schema_version: "1"
id: 35bef810c9ab33b71698c8bbf51e2646f7f2df431077e0a6edb2ff38d6f44211
title: Territory2Model
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_territory2model.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_territory2model.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: d4116523fccec3bf77c67f0865a495a723191efcacc9e830d1502bad10b12441
description: Represents a territory model. Available if Sales Territories has been enabled.
---
# Territory2Model

Represents a territory model. Available if Sales Territories has been enabled.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), update(), upsert()

## Special Access Rules

Standard and partner users can access this object. If a territory model is in Active state, any standard or partner user can view that model, including its territories and assignment rules. For territories in an active model, any standard or partner user can view assigned records and assigned users subject to your Salesforce sharing settings. Users cannot view territory models in other states (such as Planning or Archived).

## Fields

| Field Name | Details |
| --- | --- |
| ActivatedDate | 
Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date when the territory model was activated.



 |
| DeactivatedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date when the territory model was archived.



 |
| Description | 

Type

textarea

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The description of the territory model.



 |
| DeveloperName | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

Required. The unique name of the object in the API. This name can contain only underscores and alphanumeric characters and must be unique in your organization. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. The field label in the user interface is Territory Model Name.

When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance slows down while Salesforce generates one for each record.





 |
| LastOppTerrAssignEndDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

Read-only. The date when the opportunity territory assignment filter was last run. Used for Filter-Based Opportunity Territory Assignment (Pilot in Spring ’15 / API version 33).



 |
| LastRunRulesEndDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date when the last rules run was completed.



 |
| Name | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

The territory model name. The field label in the user interface is Label.



 |
| State | 

Type

picklist

Properties

Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The state of the territory model. Values are: Planning, Activating, Activation Failed, Active, Archiving, Archiving Failed, Archived, Deleting, and Deletion Failed.



 |

## Associated Objects

This object has the following associated objects. Unless noted, they are available in the same API version as this object.

[Territory2ModelChangeEvent](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_change_event.htm "A ChangeEvent object is available for each object that supports Change Data Capture. You can subscribe to a stream of change events using Change Data Capture to receive data tied to record changes in Salesforce. Changes include record creation, updates to an existing record, deletion of a record, and undeletion of a record. A change event isn’t a Salesforce object—it doesn’t support CRUD operations or queries. It’s included in the object reference so you can discover which Salesforce objects support change events.") (API version 62.0)

Change events are available for the object.

[Territory2ModelFeed](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_feed.htm "StandardObjectNameFeed is the model for all feed objects associated with standard objects. These objects represent the posts and feed-tracked changes of a standard object.")

Feed tracking is available for the object.

[Territory2ModelHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm "StandardObjectNameHistory is the model for all history objects associated with standard objects. These objects represent the history of changes to the values in the fields of a standard object.")

History is available for tracked fields of the object.