Considerations, Guidelines, and Examples for Calculating Metrics

Consider formula logic and level when you calculate attributes in Territory Planning. The same attribute can produce different results depending on where it’s calculated. Put real-world examples into action when you tailor them to address your specific business requirements.

Required Editions

Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience
Available in: Professional, Enterprise, Performance, Unlimited, and Developer Editions with Web Services API enabled

Considerations for Using Calculated Attributes

Calculated attributes:

  • Can reference other calculated attributes or data imported from CSV files.
  • Apply to individual datasets.
  • Include case-sensitive text matching. They also include syntax validation for formulas except what’s inside brackets. Invalid variables are calculated as 0.
  • Require numerical values for aggregations.
  • Require the addition function for cross-unit formula aggregations.

Guidelines for Calculated Attributes in Areas, Boundaries, and Units

Calculated attributes produce different results depending on the levels that you add them to.

Level How Calculated Attributes Can Help Available for Optimization?
Area Gain insights into territories, such as market share. No.
Boundary Determine the value of certain boundaries. For example, discover whether a specific postal code has more growth potential compared with others. Yes, unless they reference assignments or fields from units.
Unit Optimize alignments based on formulas that address specific business needs. For example, reveal total sales by adding product-level sales together. Yes, unless they reference assignments.

Examples of Using Metrics for Your Business Goals

Goal and Solution Sample Formula
Reveal total sales by adding product level sales together. [Sales Product A] + [Sales Product B]
Prioritize sales from one product over another by combining and weighting fields. [Sales Product A] * .7 + [Sales Product B] * .3
Show the number of accounts that match the criteria in the legend using segmentation flags. IF([Account Type]="Prospect", 1, 0)
Calculate workdays per territory using visit frequency, visit duration, and travel time estimates (([Visit Frequency]*(([Travel Time Estimate]/60)+[Visit Duration]))/60)/8