When you add an Opportunity Team Member in the user interface (UI), Salesforce automatically creates both an OpportunityTeamMember record and an OpportunityShare record. The OpportunityShare record is based on the "Opportunity Access" selected when the team member is added on the Opportunity Team Members page.
When you insert OpportunityTeamMembers through the API, you cannot directly specify the access level of the corresponding OpportunityShare record, so you insert each record individually. The two objects work as follows:
When you insert team members through the API, their access is typically set to the least permissive default level of Read Only. Existing OpportunityShare records with a matching User and Opportunity Id combination are updated from their existing access level to "Read Only", and their sharing reason is updated to "Sales Team". There are a few exceptions, outlined in Specify access level when you import Account or Opportunity team members.
If you want a more permissive access level for a newly inserted team member, run a subsequent insert to the OpportunityShare object to set the desired level of access.
For example, a sales ops admin needs to onboard a new overlay sales team of 200 reps across 1,500 open Opportunities, assigning each an "Overlay Rep" team role with Edit access. This is too many to do manually in the UI.
Note: Complete all 3 steps in the order outlined for the team member's access levels to display properly in the UI.
This article explains how to add Opportunity Team Members to Opportunities, and how to remove them, using Data Loader. To add members, insert OpportunityShare records first and OpportunityTeamMember records second, using the same file.
Prepare a file with the following columns:
Open Data Loader and select the Insert operation on the Opportunity Share (OpportunityShare) object to set the appropriate OpportunityAccessLevel for the team member users. To find the object, select the "Show all Salesforce objects" option in Data Loader. Click Browse, select your file, and click Open | Next | OK.
Using the same file, perform a second Insert operation on the Opportunity Team Member (OpportunityTeamMember) object. To find the object, select the "Show all Salesforce objects" option in Data Loader. Click Browse, select your file, and click Open | Next | OK.
Note: Insert the Opportunity Share records before the Opportunity Team Member records. This ensures that the existing share records are properly linked to the newly created team members. If you insert share records after team members, the team member access levels in the UI may not reflect the share record's access levels.
Once the share and then team member records are inserted in the correct order, they are linked to one another. Subsequent updates to the share records are then reflected in the related team member's access level in the UI.
Note: Deleting an OpportunityTeamMember record also removes the team member's OpportunityShare record, and the team member record is not placed in the Recycle Bin.
000383667

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.