How are large-scale territory assignment recalculations scheduled and optimized for massive enterprise account bases?
Answer
Basics: Enterprise Territory Management (ETM) assigns accounts to territories (for example "EMEA - Banking") using rules on account fields such as Industry, Billing Country or Annual Revenue. Territories form a hierarchy inside a Territory Model, and a model is in one of three states: Planning, Active or Archived. Only one model is active at a time. Opportunities inherit a territory from their account, so when a rule change moves an account, the pipeline moves with it.
How it works:
- Build or clone a model in Planning state, add Territory Types, territories and assignment rules (Setup > Territory Models).
- Run Rules in the Planning model and inspect which accounts land where, without affecting the live model.
- Activate the model. In the active model, rules run automatically on account create/edit when the "Evaluate this account against territory rules on save" behavior applies.
- For bulk recalculation (after changing rules, or after a data load) use Run Rules on a territory or on the whole model. It runs as a background job; it is not an Apex batch you write.
- Rules apply to accounts; opportunity territory is set by default logic or by an Apex filter.
Advanced / deep dive: There is no built-in cron for Run Rules, so teams that need scheduled re-evaluation touch accounts in a scheduled Batch Apex job with the territory-evaluation option on the DML (verify the exact mechanism in current docs), or simply run rules manually in a maintenance window. Heavy runs are the main cause of sharing recalculation load, so avoid running them at quarter-end. Design for fewer, broader rules, prefer indexed/standard fields, and keep territories per model within documented limits (verify current numbers). Manual assignments (via Assign Territories) are not removed by rules, which is how you protect named-account exceptions. Legacy Territory Management 1.0 is not available to new orgs; ETM is the only option.