15 thoughts on “Auto Add Members to Account Team

    1. Use Custom Metadata Types and store to store multiple account member details

  1. Hi Rakesh,

    I have a scenario where account team members will be copied to case team members when ever a new case is created using flow, my flow is getting failed due to inactive team members in account (account team members) can you help me how can we ignore inactive users when account team users were getting copied over newly created case.

    Thanks.

    1. I am so sorry for the delay in my response. You may have to use Record Lookup elements to filter out inactive account team member.

  2. Kamal Thakur – Chandigarh, India – When I was 22, I climbed "Shikari Peak". Not metaphorically—I literally climbed a mountain of 11020 ft. While I was hiking, I thought about quitting approximately 5,00 times. (And that’s a lowball estimate.) But despite the high winds, low altitude, mental and physical fatigue, and trail mix overdose, I kept going. I’m that person. Once I say I’ll do something, it will happen. Now, I put that perseverance to work as a Salesforce Consultant. Now, I don’t have to climb any mountains…but I do have to move them. I’m well-versed in Sales Cloud, Salesforce Security, Apex, Aura/LWC, Salesforce Scheduler, Einstein Analytics, Einstein Discovery, Tableau CRM, DBSync, ZoomInfo, and LeanData Flow. If you’re interested in grabbing a coffee and talking Salesforce (or to hear how I almost fell off the mountain at 11K feet), please send an email my way.

    Hi Rakesh, great article. But, is there any way I could reverse this process? Like Whenever I add Account Team Member on Account, I want somehow update the account record with some value. If you could share your view on this?

    1. You have a very limited option. First – try to write Apex scheduled job which will run every night and perform the necessary action.
      Second use Inline Visualforce page and Flow concepts.

  3. Hi Rakesh,

    Thanks for this guide. I am doing something similar but I am only creating when there is no team member with that role already in place. When there is one, I update the user on the team. My problem is my Fast Update does not work, I am checking the values I am passing to the SObject and it looks correct but update is not working. Insert works great.

    Any thoughts?

  4. Hello, great article! I read both this blog and part 80 on how to add multiple users to account teams – but I was wonder if it is possible to add multiple users from the user object, rather than the account object. So when a new user is created using “abc” profile, automatically add every user with “abc” profile to that users account team, while also adding the new user to the other users account team?

    This is my current use case that takes me way longer than needed, especially when there are 30+ users with that profile.

    1. Rakesh Gupta – Mumbai – 9x Salesforce MVP | Senior Solution Architect | 8x Author | 5x Dreamforce Speaker | Salesforce Coach | Co-host of AutomationHour.com and AppXchangeHour.Com

      Yes it is possible to achieve it using Flow and Process Builder. Can you provide a screenshot of what you’re seeing or error message you are getting?

      1. I don’t have any examples or errors as I don’t know where to begin with this task. I am very new when it comes to flows so my knowledge is really minimal. I attempted to follow your instructions from this blog modifying the object to user rather than account and had no luck. No error of any kind, just didn’t work. Any help you could provide I would greatly appreciate!

        1. Rakesh Gupta – Mumbai – 9x Salesforce MVP | Senior Solution Architect | 8x Author | 5x Dreamforce Speaker | Salesforce Coach | Co-host of AutomationHour.com and AppXchangeHour.Com

          Try something like this:


          1. Create a Flow which will process your logic. Create a variable to store newly created userId (We will pass the value into it from Process Builder)
          2. Using a Fast Loop find all users with the same profile
          2.Now you have to use Loop and assignment and add all users into a specific list of type (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_useraccountteammember.htm)
          4. Then use the Fast element to insert it
          5. Create a Process Builder on the user object (Condition – when a record is created)
          6. Then using an immediate action to launch a Flow (Autoaluanched Flow) and pass the value to variable UserId

          1. Thanks for the reply – didn’t have much luck, but I’m assuming I’m doing something wrong. I’m not sure how to post screen shots so I’ll add steps to what I did:

            Created UserID Variable with Text Data Type Input/Output
            Created the “PinnacleProfile” formula based on the profile ID I created as a label
            Created SObject TeamMembersVar which should be the list of Account Team Members
            Created SObject UsersWithPinnacleProfileVAR which should be a list of users with the matching ProfileID “PinnacleProfile”
            Created Collection Variable TeamMembers
            Created Collection Variable UsersWithPinnacleProfile

            Start >
            Fast Lookup – User
            IsActive = True
            ProfileID = {!PinnacleProfile}
            Variable: {!UsersWithPinnacleProfile}
            Fields: Id

            Next > Loop
            Loop through {UsersWithPinnacleProfile} in Ascending order
            Loop Variable {!UsersWithPinnacleProfileVar}

            Next > Assignment – Name: Add users to TeamVar
            {!TeamMembersVar.UserId} equals {!UserID}
            {!TeamMembersVar.AccountAccessLevel} equals Edit
            {!TeamMembersVar.ContactAccessLevel} equals Edit
            {!TeamMembersVar.OpportunityAccessLevel} equals Edit
            {!TeamMembersVar.CaseAccessLevel} equals Edit

            Next > Assignment – Name: Collection to Variable
            {!TeamMembers} add {TeamMembersVar}

            > points back to loop

            Loop to >

            Fast Create:
            Variable: {!TeamMembersVar}

            Process Builder:

            User Object
            When Record is Created or edited

            Formula evaluates to true:

            ISNEW()
            &&
            [User].Profile.Name = “Pinnacle”

            >

            Initiate Flow
            Flow Vaiable: UserID Field Reference [User].Id

            Upon creating a new user with the Pinnacle Profile, I get the following error:

            Unable to Access Page
            The value of a parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.

            Any ideas?

  5. janbaskdigital – We Measure our success by the results we derive for our clients. We believe in creating highly engaging digital properties & brand focused creative solutions. Our expert team of Digital Strategists and Website Developers use cutting edge technology for our clients and guide them how to survive in the digital savvy market and create custom sites. From designing a new brand to relaunching your business, we do it all. We push our creative experts further and deliver more as we don't only want your websites to just look great but also perform better. https://www.janbaskdigitaldesign.com

    Thank you for sharing great article related to salesforce. i want to contribute a article related to salesforce.

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Exit mobile version
%%footer%%