Once an Account Manager creates a new account, the Manager can add, a team member, or multiple team members, to an Account Team. This blog is a sequel to my previous blog – Getting Started with Process Builder – Part 80 (Auto Add Member to New User’s Default Account Team).
As you may recall from my previous blog, an Account Team is a set of users that usually work together on an Account. A typical Account Team may include Account Manager, Sales representative, Legal advisor, etc. In the previous blog, I discussed how to automatically add a member to new user’s default account team. In this blog, I will go one step further and discuss requirement #2 – how to add multiple team members to an account team.
In Salesforce, a user can define Account Team in two places:
- Define Default Account Team on user’s record
- Manually add the members to Account Team for each new account record
Furthermore, one user can be associated with multiple Account Teams, and an account team can have multiple users. Yes! You are right! A Junction object is needed if one user is to be associated with multiple account teams and an account team is associated with multiple users. Lo and behold, there is such a junction object that connects one team member to multiple account teams and associates multiple account teams with a user. The object is called AccountTeamMember! In other words, the AccountTeamMember is a junction object between Account and User, as shown in the following screenshot:
Business Use case
Martin Jones is working as a System Administrator at Gurukul on Cloud (GoC). At GoC they use Account Team to easily track collaboration on Accounts. GoC has a team of Legal Advisors that helps on the legal side of all deals. Martin has received a new requirement from the higher management:
- Automatically add Legal Advisors (all legal advisors) to new accounts if the account Type =”Customer – Direct” and grant them the following access as stated below:
- Account:- Read
- Contact :- Read
- Case:- Private
- Opportunity:- Read
Solution for the above business requirement
There are a few possible solutions for the above business scenario, but we’ll use Flow and Process Builder to solve the above business requirement. Before trying to understand the technical aspect of the solution, let us spend some time to understand the general flow at a high level. Please spend few minutes to go through the following flow diagram and understand it.