Category: Territory

Salesforce Enterprise Territory Management Cheat Sheet

Sudipta Deb Founder of Technical Potpourri, Co-Founder of Shrey Tech, Enterprise Cloud Architect FacebookXLinkedIn FollowFollowFollowFollowFollowFollowFollowFollowFollowFollowFollowFollowFollowFollowFollowFollow This post is the continuation of my study notes for  Sharing and Visibility Designer Architect Certification. Previous post was regarding Salesforce Sharing and Security Cheat Sheet. Enterprise Territory Management is a very important topic and having a clear understanding will definitely going to help in passing the certification as well as implementing it for your own project. Nice To Check Out Salesforce Spring 21 Release Feature Salesforce Certification Notes Salesforce Release Video Tutorials Salesforce Lightning Flow Video Tutorials Important Note Original Territory Management is only available with Customizable Forecast. Enterprise Territory Management works with Collaborative Forecast. It will not work with Customizable Forecast. Territory Group of Accounts and Sales reps who work for those accounts. Territory Type This is the criteria to group territories. Every territory must have one Territory Type, but it will never appear in the Territory Hierarchy Territory Type Priority Helps you to create priorities for your territory type. Territory Model Creates the entire Territory Hierarchy. It allows to create multiple territory hierarchy and test that before activating. Number of territory models depends on the Salesforce edition. Territory Hierarchy Shows the model’s territory structure. You can run assignment rules at the model level or individual territory levels. Your territory hierarchy in active territory model also determines the forecast hierarchy for territory forecast....

Read More

Apex Code to Assign Territories to Opportunities

Assigning Territories to Opportunities can be done manually, but there is an option by which you can automate this process. This blog post is all about writing Apex class to automate the Territory assignment to Opportunity record.Before I start explaining the Apex code, let me explain two important objects -Territory2Type: This represents the category of Territories(Territory2). Every territory must have a Territory2Type. The important field within this object is Priority, which is used in Opportunity filter to assign Territory to Opportunity.ObjectTerritory2Association: This represents the association between Territory and Object record, which is Account. This is available only if Enterprise Territory Management is enabled.The Apex code is written here in the Salesforce Developer’s guide. The logic is as follows -If the Opportunity’s Account record is assigned to no Territory, then Opportunity’s territory2Id field will be null.If the Opportunity’s Account record is assigned to 1 Territory, then Opportunity’s territory2Id field will be assigned to same Territory record.If the Opportunity’s Account record is assigned to more than 1 Territories, then Opportunity’s territory2Id field will be assigned to that territory record which is having highest priority.If multiple territories are having the same priority, then Opportunity’s territory2Id field will null.Once you have the apex class written, you can configure the Opportunity Territory assignment filter by going into Setup -> Territory Settings and there providing the apex class name. The screenshot is given below -Few important...

Read More
Loading

Earlier Posts

  • 2024 (18)
  • 2023 (47)
  • 2022 (25)
  • 2021 (35)
  • 2020 (41)
  • 2019 (13)
  • 2018 (16)
  • 2017 (14)
  • 2016 (18)
  • 2015 (74)
  • 2014 (20)