---
schema_version: "1"
id: d08d9db3ca09cc57c25639edfbe286d50aa1038aea6829f77113125735a0ec76
title: ObjectTerritory2AssignmentRule
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_objectterritory2assignmentrule.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_objectterritory2assignmentrule.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 78dc7a6d3f86dda497291124e596ead3a4961db74ab422d528e1204920f8538d
description: Represents a territory assignment rule that’s associated with an object, such as Account. ObjectTerritory2AssignmentRuleItem can be created or deleted if the BooleanFilter field on its corresponding ObjectTerritory2AssignmentRule is null. Available if Sales Territories has been enabled.
---
# ObjectTerritory2AssignmentRule

Represents a territory assignment rule that’s associated with an object, such as Account. ObjectTerritory2AssignmentRuleItem can be created or deleted if the BooleanFilter field on its corresponding ObjectTerritory2AssignmentRule is null. Available if Sales Territories has been enabled.

## Supported Calls

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

## Special Access Rules

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

## Fields

| Field Name | Details |
| --- | --- |
| BooleanFilter | 
Type

string

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

Represents advanced filter conditions that were specified for the rule in the online application. For example, “(1 AND 2) OR 3.”



 |
| 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 Unique Name.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

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.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

Only users with View DeveloperName OR View Setup and Configuration permission can view, group, sort, and filter this field.















 |
| IsActive | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

Indicates whether the rule is active (true) or inactive (false). Via the API, active rules run automatically when object records are created and edited. The exception is when the value of the IsExcludedFromRealign field on an object record is true, which prevents record assignment rules from evaluating that record.



 |
| Language | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort, Update

Description

The language of the label in the user interface.



 |
| MasterLabel | 

Type

string

Properties

Create, Filter, Group, Sort, Update

Description

Required. The user interface label for the territory type.



 |
| ObjectType | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort

Description

The object that the rule is defined for. For API version 31, Account only.



 |
| Territory2ModelId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID of the territory model.



 |