---
schema_version: "1"
id: 961291495c9bb3f2429fb82d4895c8d3b4f4244d817d1a6501d043cc3be5826d
title: AccountTerritoryAssignmentRule
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_accountterritoryassignmentrule.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_accountterritoryassignmentrule.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: fc2049be3c943fdbaa6c3363411799e7f607542407d824915f5b17e657c17c50
description: An account assignment rule that assigns accounts to territories based on account fields. Available if Sales Territories has been enabled.
---
# AccountTerritoryAssignmentRule

An account assignment rule that assigns accounts to territories based on account fields. Available if Sales Territories has been enabled.

## Supported Calls

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

## Special Access Rules

Users with the View Setup and Configuration permission can access this object. Users with the Manage Territories permission can edit this object.

## Fields

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

string

Properties

Create, Filter, Nillable, Update

Description

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



 |
| IsActive | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Update

Description

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



 |
| IsInherited | 

Type

boolean

Properties

Create, Defaulted on create, Filter, Update

Description

Indicates whether the rule is an inherited rule (true) or a local rule (false). An inherited rule also acts upon territories below it in the territory hierarchy. A local rule is created at the immediate territory and only impacts the immediate territory.



 |
| Name | 

Type

string

Properties

Create, Filter, Update

Description

A name for the rule. Limit is 80 characters.



 |
| TerritoryId | 

Type

reference

Properties

Create, Filter, Update

Description

ID of the territory where accounts that satisfy this rule are assigned.



 |

## Usage

A territory will not have any accounts (with the exception of manually assigned accounts) unless at least one account assignment rule is active for the territory.

#### See Also

- [AccountTerritoryAssignmentRuleItem](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_accountterritoryassignmentruleitem.htm "A row of selection criteria for an AccountTerritoryAssignmentRule object. Available if Sales Territories has been enabled.")
- [Territory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_territory.htm "Represents a flexible collection of accounts and users where the users have at least read access to the accounts, regardless of who owns the accounts. Available if Sales Territories has been enabled. This object is available in API versions 7.0 to 52.0. Use Territory2 instead of Territory in API version 52.0 and later.")
- [UserTerritory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userterritory.htm "Represents a User who has been assigned to a Territory.")