How do Territory Assignment Rules automate complex enterprise account segmentation?
Answer
Basics: A territory is a segment of accounts (by geography, industry, size) that a set of reps owns, independent of the role hierarchy. Assignment rules remove manual assignment: define "Billing Country = Germany AND Industry = Manufacturing" on a territory and any account meeting it is assigned. The same account can sit in several territories (for example a geographic and a named-account territory).
How it works:
- Setup > Territory Settings: enable Enterprise Territory Management; set default access levels.
- Create a Territory Model (Planning state), Territory Types, and the hierarchy.
- Per territory, add Assignment Rules (field, operator, value; rules can inherit from the parent) and assign users.
- Run rules (Run Rules button) and review; then set the model to Active.
- After activation rules can run on create/edit if "Evaluate this account against territory rules on save" is selected in the Account page layout/ settings, and in the API via Database.DMLOptions.assignmentRuleHeader.useDefaultRule.
Advanced / deep dive: Models go Planning > Active > Archived; only one model is active, so you can build next year's structure in Planning and cut over later. Rules apply to Accounts only; opportunities are assigned to a territory either by Salesforce's default (inherit from the account when only one territory matches) or by a custom Apex class implementing TerritoryMgmt.OpportunityTerritoryAssignmentFilter (can choose one territory when several match). Manual assignments are preserved and can be excluded from rule runs. Account access is granted to the territory users through the territory's access settings, and Customizable Forecasts can roll up by territory. Underlying objects: Territory2Model, Territory2, UserTerritory2Association, ObjectTerritory2Association (with AssociationCause = 'Territory2AssignmentRule' vs 'Territory2Manual'). Original Territory Management (legacy) is unsupported/retired, and the legacy model is not the same as ETM. Territory limits depend on edition; verify in the current limits doc. Large rule sets over millions of accounts run asynchronously and can take hours.