Automate assignments of new and updated accounts to territories using rules that you create and run. The rules identify characteristics that you use to define that territory, and tell Sales Territories to assign accounts with those characteristics to that territory. Salesforce assigns accounts to territories according to your rules when you create or update an account, but only if your territory model is in Active state.
Required Editions
| Available in: Salesforce Classic for some features and Lightning Experience for all features |
| Available in: Performance and Developer Editions and in Enterprise and Unlimited Editions with Sales |
| User Permissions Needed | |
|---|---|
| To view the assignment rules: | View Setup and Configuration |
| To create or edit assignment rules: |
View All Records on Accounts AND Manage Territories AND View Setup and Configuration OR Customize Application |
- From the territory model hierarchy, open the territory where you want to create a rule.
- On the detail page, in the Assignment Rules Defined in this Territory related list, click New.
-
On the rule edit page, enter a name for the new rule and define selection
criteria.
If your org has enabled state and country picklists, territory assignment rules using states as a criteria must use contains matching instead of equals matching.
Keep in mind that ZIP/postal codes are alphanumeric fields, not number fields, so in a comparison, 9 is “higher” than 80000, for example.
- If you also want the rule to apply to the current territory’s descendants, select Apply to child territories.
-
If you want the rule to run when a user creates or updates an account, select the
Active checkbox.
For account updates, territory rules run only when these conditions are true.
- If you update the account in Salesforce, select Evaluate this account against territory rules on save and assign the rule to a territory in the active territory model.
- If you update the account via API, specify AssignmentRuleHeader.
For account inserts, select Run territory assignment rules during account inserts in Territory Settings.
- Click Save to save the rule and return to the territory detail page.
If you mark the California territory rule as inheritable, you don’t have to specify the state in the criteria for child territories. Instead, you can use more specific criteria, such as ZIP code or industry.