Enterprise territory management

The last way to share records is by aligning your company's sales territories hierarchy. This kind of sharing model is applied to account sharing and related opportunities.

At the time of writing, there are currently two different kinds of territory management:

  • Original territory management
  • Enterprise territory management

For the scope of the Salesforce Advanced Administrator certification, we'll describe the latter since original territory management will be retired in June 2020 (this announcement can be found at https://help.salesforce.com/articleView?id=000273181&language=en_US&type=1).

Remember that this sharing option can only be activated if your organization doesn't use the old Customizable Forecast for opportunities that will be retired in June 2020 as well (this announcement can be found at https://help.salesforce.com/articleView?id=000273188&language=en_US&type=1).

Let's dig deeper into the main concepts of territory management (TM).

The first element of TM is the territory type, which defines the kind of territories you can create. A territory type can refer to geographic zones (for example, EMEA territories) or to account segmentation (for example, utility companies). The label and description of a type should be self-explanatory so that you can avoid misunderstandings when creating territories. They won't be displayed in the hierarchy but will work pretty much like a territory guideline.

With territory type priority, you can define the priority of each territory type according to your sales strategy; for example, you can define a high priority with a value of 001 and a lower priority x with a value of 010. We suggest that you define priorities that take into account possible future changes in territory type creation (don't start by setting 001 and 002 for your only two territory types if you may have a new territory type in the next year with an intermediate value). When you create a new territory, you'll be able to choose its territory type and see its priority.

The territory object is the core of TM since it represents a group of accounts and the Salesforce users who may access those accounts. They can have parent and child territories in order to replicate your sales strategy. They are composed of users, manually assigned accounts, a forecast manager, and the rules to automatically assign accounts to this territory (pretty much like sharing rules). Depending on the territory configurations, an account can be assigned to multiple territories.

The territory model is a complete model for your organization. By using this model, you can create relationships between territories to find the best one that fits your sales strategy. You can have up to four concurrent models and only one active at a time.

The territory model is pictured in the territory hierarchy and shows the relation between territories, as shown in the following screenshot:

This page is useful if you wish to edit the hierarchy and run all the assignment rules and opportunity filters (this feature requires some custom Apex coding that's out of this scope; please refer to https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_TerritoryMgmt_OpportunityTerritory2AssignmentFilter.htm for more details).

The last concept is territory model state. A model can have the following statuses:

  • Planning: Previews the model before activating it.
  • Active: There can be only one model in the active state.
  • Archived: Only an active model can be archived. After a model becomes archived, each reference to the territory (for example, the territory field on the opportunity field) becomes blank.
  • Activation failed: Something bad happened when activating (see notification email for more details).
  • Archiving failed: Something bad happened in terms of the archive's state.

To enable TM, go to Setup | Feature Settings | Territories | Territory Setting and click Enable Enterprise Territory Management:

Territory Model's default access settings

In here, you can set up default access to accounts and opportunities for each territory. In addition, you can enable contacts and case access, but only if the OWD for them is set to Private.

From the Opportunity Territory Assignment section, you can enable a more detailed filter when setting up territory management for Opportunities. The default OppTerrAssignDefaultLogicFilter Apex class can be found in the documentation (see https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_interface_TerritoryMgmt_OpportunityTerritory2AssignmentFilter.htm) and is out of scope for this book (ask a developer to help you with the setup).

Each territory has its own default values that are inherited by the parent territories above it, as shown in the following screenshot:

A territory contains assigned accounts and users.

Remember that you can create up to 1,000 territories per model for Developer Edition and Enterprise Edition organizations, while for Unlimited and Performance organizations, you can ask Salesforce support to let you have up to 99,999 territories (more than 20,000 will need a deeper inspection for approval).

The first way you can assign an account to a territory is by using rules that, based on the account's characteristics, can decide whether an account belongs to a given territory or not. These rules apply on account creation and are updated if the Territory Model is in an active state:

To create a new rule, go to the territory settings page, scroll down to the Assignment Rules Assigned to This section, and click the New button:

A rule consists of field conditions (for example, Country equals Italy, and Country equals Spain) that define the account fields to which assignment is based on, the possibility to assign the same rule to the child territories, and the active flag to enable this rule.

Can we assign to child territories? The answer is yes. First, define a generic rule that matches the different territories (for example, Country equals Italy, Country equals Spain, and Country equals Greece, which identifies southern Europe countries) that is used in the Southern Europe territory and then create a territory-specific rule in each child country for internal regions (for example, for Italy, we can have Region equals Sardinia, Region equals Sicily, and Region equals Tuscany). Finally, create specific grand-children territories depending on the postal code values you received.

Remember not to use the same rule on a child if you are already using it on a parent territory. Moreover, if your organization is using country and states picklists, use the contains operator and not the equals operator.

A territory can have up to 15 assigned rules.

You can exclude an account from the territory rules calculation by setting up the Exclude from territory assignment rules flag when updating the record (it is hidden by default on the page layout and its field-level security should be set to visible):

If you change a rule, you need to reassign the accounts that are part of the hierarchy manually by clicking the Run Assignment Rules button at the model level or the Run Rules link at the territory level:

From the territory setting page, you can even add an account manually. This is useful when sharing rules are not enough to identify an account:

To see all the accounts related to a given territory (if you're using rules or manual assignment), click on the View Accounts button on the territory page.

Opportunities can be assigned to territories using an Apex filter (as shown earlier), but you can do this manually as well by using the Territory field and checking the Exclude from the territory assignment filter logic checkbox (they should be placed on the opportunity layout if needed):

Why is this necessary? Accounts can span multiple territories, and so there is a need to clarify where opportunities have been assigned.

Users can be associated with territories if we use the Manage Users button in the Assigned Users section of the territory setup page. Using the UI, you can assign up to 1,950 users to the territory. If you have a wider audience per territory, you should use APIs (for example, Data Loader; see the UserTerritory2Association object's details at https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_userterritory2association.htm).

You can even define territory roles for users that have been assigned to a given territory. Let's go through this now:

  1. To define roles, you need to switch to Salesforce Classic (at the time of writing, that is, in Spring 2019), click on Setup | Customize | User Territory Associations | Fields, and look for the Role in Territory field:

  1. Define your roles (here is an example):

  1. Then, go back (in Classic or Lightning Experience) to the territory page and go to the Assigned Users section. From here, it is possible to edit the user's role within the territory:

You can even define whether a user is a forecast manager. This option is used in opportunity forecasts so that a user can roll data up or down their territory hierarchy (and even adjust and view forecast data).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.37.62