bdunagan

Brian Dunagan

December 25 2016
Salesforce Tip: Territories with a Read-Only Custom Formula

Salesforce doesn’t support territories for Leads in its Territory Management or Enterprise Territory Management features. (Our company hasn’t upgraded to Salesforce Lightning, so I’m not sure whether the new version includes this feature.)

However, you can set up sales territories as a read-only custom formula. As a formula, the field is always up-to-date, a stark contrast compared to the territories in Territory Management, which require you click “Run Rules” every so often. (We use Territory Management for Opportunities and Accounts, and every so often, we realize the territories aren’t correct. We have to click “Run Rules” to fix them.)

Let’s walk through how to set up a custom formula:

  1. Go to “Setup” > “App Setup” > “Customize” > “Leads” > “Fields”.
  2. Click on “New” under “Lead Custom Fields & Relationships”.
  3. For the field settings, use “Formula” for “Data Type”, an appropriate label for “Field Label”, and “Text” for “Formula Return Type”.
  4. For the formula, I translate “Country” into regions. Because custom formulas are limited to 5,000 characers, I couldn’t use a CASE statement. Instead, I used CONTAINS, with a colon separator because CONTAINS matches substrings. You can use any separator that doesn’t match the argument. See my version in the GitHub Gist below.
  5. To verify your version, use “Check Syntax”.
Deconstructing Flora Tea from Tea Forte Salesforce Tip: Lookup Contact by Email via Enhanced Lookups
LinkedIn GitHub Email