Enterprise Territory Management – Key Notes

Territory Management - Data Model
  • Enterprise Territory management is used to share Account and its related opportunity and Cases.
  • Account can have multiple Territories.
  • User can have multiple Territories
  • Opportunity can have only 1 Territory. Think about it – If Opportunity allowed to have multiple Territory, how revenue would be split between multiple Territory and what would be business rules ?
  • Territory enables “My Territories” and “My Team’s Territory” filter in Account and Opportunity list View.
  • While creating Territory, we can decide access to Account, Opportunity and Case. Depending on OWD, access can be private, read only and read write.
  • Enterprise Territory Management does not support overlay forecast unlike Roles. However we can create report on Opportunity split object.
  • Overlay forecast (Revenue sharing) is not supported because Opportunity can have only one territory and therefore only 1 revenue maker.
  • Maximum Territory that can be defined is around 99k unlike maximum role 10k.
  • Custom Field (but not lookup) can be created in Territory2 object.
  • Territory related list appears on user and Account records.
  • You cannot create lookup to Territory objects.
  • Territory to Opportunity can be assigned using Apex class plugin

Enable Territory based Forecast

  1. Mark user as “Allowed Forecast”
  2. Add user as Territory Team member
  3. Add user as Forecast Manager in Territory

Apex Based Sharing of Opportunity using Territory

For Apex based sharing, we use user of public group Id to share record. If we want to share Opportunity using Territory then there is quick code for that. If we click on manual share button on Opportunity, it will show an option to choose between user, public group, territory and territory with subordinates.

There is no clear documentation, but what I found that when we share using Territory, Salesforce internally creates public group for that territory and assigns that public group to Opportunity.

So, first step is to find public group created for territory. Below code showcase how it can be done.

References :

Import User Quotas in Quantity (Unit) for Collaborative Forecasting

In Previous article we have seen that how to import Quota in Amount (Revenue) for Collaborative forecasting.  I got many request on how to upload Quota in Units, as in Forecasting tab you can see that there is option to see Forecast in Unit or Amount.

Salesforce Display Forecast as Quantity or Revenue
Salesforce Display Forecast as Quantity or Revenue

If we switch from Revenue to Quantity the Quota of user will show blank user. In this article we will upload User Quota in Quantity.

After Winter 14 release also salesforce has not provided any Out of the box tool to upload quota from User Interface. So in this article also, we will depend on Dataloader.

Import User Quotas in Amount for Collaborative forecasting

In Customizable Forecast, we can add the Quota for user by navigating to User Page and going to Quota related list However in Collaborative Forecasting aka Forecast 3 the only way is using Data Loader.

1. Log-in to the Data Loader and use the Insert function.
2. Click “Show all Salesforce objects and select “Forecasting Quota (ForecastingQuota)”.
Note: Only Data Loader version 25 and above can be used for importing Quotas in Collaborative Forecasting
3. Select the import csv file and click Next (click OK in the pop-up that shows the number of records detected in the file).

Note: The import csv file should contain the following columns:

  • Currency ISO Code
  • Quota Amount
  • Owner ID
  • Quota Month (Start Date, In Date Format , 10/1/2013 – 1 Oct 2013)

Import Quota Using DataLoader
Import Quota Using DataLoader for Forecast 3