Add or remove Opportunity Team members with Data Loader in Salesforce

In Salesforce, while adding an Opportunity Team Member in the opportunity record, both an Opportunity Team Member and Opportunity Share records are automatically created. The Opportunity Share record is created based on the “Opportunity Access” selected when the team member is added via the Opportunity Team Members page.

In this Salesforce tutorial, we will learn to Add or remove Opportunity Team members with Data Loader in Salesforce.

Add or remove Opportunity Team members with Data Loader in Salesforce

To Manage the Opportunity Team Members via data loader where you add members to the opportunity record, it is required to set the sharing settings of the Opportunity object and for that go the Setup -> Quick Find box -> search and select Sharing Settings -> Click on Edit -> set Default Internal Access for Opportunity as Private.

In the below steps, I will explain the process of adding and removing the team members to an opportunity record in the following sections.

  • Add Opportunity Team members with Data Loader in Salesforce
  • Remove Opportunity Team members with Data Loader in Salesforce

Add Opportunity Team Members to an Opportunity using the Data Loader

To add Opportunity Team Members to an Opportunity using the Data Loader, ensure that you have installed the data loader in your and have required access to manage opportunities.

If you meet with above conditions then follow the below steps.

1. First, we must create a CSV file to import or add the users as members of the opportunity.

Using the Data Loader, we must create a CSV file with the following header columns to add Opportunity Team Members to an Opportunity.

OpportunityId: The Record ID of the Opportunity to which a team member is being added. This ID can be obtained from the URL of the opportunity record, or you can run a data export for the Opportunity object with query field ID.

See also  How to Mass Update Email Addresses and Usernames with Data Loader in Salesforce

UserId: The ID of the user being added to the Opportunity Team.

TeamMemberRole: The Opportunity Team Role for this user on this Opportunity. To find the list of valid Team Roles, go to Setup -> Customize -> Opportunity -> Opportunity Teams -> Team Roles.

OpportunityAccessLevel: The Opportunity access level for the team member (or UserId). Valid values are “Read” or “Edit.”

2. To get the Opportunity ID and User IDs, you can run data export for the data objects Opportunity and Users separately.

Now populate the header columns OpportuntiyId, UserID, TeamMember Role, and OpportunityAccessLevel.

After this, save the CSV file in your system from where the data loader can access it.

Add Members in Salesforce Opportunity records via data loader

3. Now open the data loader tool, and login with your credentials and click on the Insert button.

Add Opportunity members via Salesforce data loader

4. In this step, activate the checkbox Show all Salesforce objects, then select the data object Opportunity Share and select the CSV file we created in the above steps.

At last, click on the Next button.

Add Opportunity members via data loader in Salesforce

5. Now the data loader will initialize the uploaded CSV file and here click on the OK button to continue.

6. In this step, we will create a mapping between the header column and the object name fields, and for that, click on the Create or Edit a map button. Then, click the Auto-Match fields to Columns button in the mapping dialog window.

If the columns are not auto-matched, drag the Salesforce object fields to the column mapping.

After mapping, click on the OK button and the Next button.

Add and Remove Opportunity members via data loader

7. In this step, select the location for the error and success files from where they can be accessed later.

At last, click on the Finish button.

Use data loader to Add members in Salesforce opportunity

8. A warning message regarding the data insertion will appear on the screen as we click the Finish button. Here, click on the Yes button to proceed.

Add Opportunity members using Salesforce data loader

9. Now, the data insertion will start, and after its completion, we will get the message of success and errors that occurred in the data operation.

See also  How to Import Tasks or Events into Current Records in Salesforce via Data Loader

In this example, we got a success message without errors, which means we successfully added the team members to the opportunity record.

Here, click on the OK button to close the data loader.

Add and Remove Opportunity members via data loader in Salesforce

10. To view the added team members go to the opportunity record whose ID we have used in the CSV file and scroll down to the section team members and there we can see the users that we have added as members via data loader.

Add Opportunity team Members via Salesforce data loader

We have successfully added the users as team members to an Opportunity.

This way, we can add opportunity team members with the Salesforce data loader by following the above steps.

Remove Opportunity Team Members to an Opportunity using the Data Loader

To remove Salesforce Opportunity Team Members from an Opportunity using the Data Loader, open the data loader and follow the below steps.

1. To remove the team members, we will first run a data export for the Opportunity Share object and for that click on the Export button.

2. In this step, activate the checkbox Show all Salesforce objects, then select the data object Opportunity Team Member

Delete Members in Salesforce Opportunity records via data loader

3. In this step select the query fields ID, OpportunityID and other reference fields. After this, add clauses to filter the records.

Enter the Field as OpportunityId, and in the value field, enter the ID of the opportunity from which you have to remove the members and click Add condition.

At last, click on the Finish button.

Remove Salesforce Opportunity team members via data loader

4. When we click the Finish button, the filtered records will be extracted in a CSV file. Now, keep the records of the members you want to remove from the opportunity team and save the CSV file.

How to remove Opportunity team members in Salesforce

5. Now open the data loader and click on the Delete button.

Use data loader to remove opportunity team members in Salesforce

6. In this step, activate the checkbox Show all Salesforce objects, then select the data object Opportunity Team member, and select the CSV file we created from the extracted records.

See also  How to Import Leads as Campaign Members with Data Loader in Salesforce

After this, click on the Next button.

Remove the Opportunity team members via data loader

7. Now, the data loader will initialize the selected file. Here, click on the OK button to proceed.

Remove Multiple Opportunity members Via Salesforce data loader

8. In this step, we must match the header column with the object field name. When we perform the delete operation, we need to map the ID column, and for that, click on the Create or Edit a Map button.

In the Mapping Dialog window, click on the button auto-match field to columns, drag the ID field to the column mapping, click OK to complete mapping, and click the Next button.

Remove Opportunity members via Salesforce data laoder

9. Select the location for the error and success file, then click the Finish button.

Remove Opportunity members via data loader in Salesforce

10. A warning message will appear on the screen regarding the deletion of the data. Here, click on the Yes button to proceed.

11. Now the data operation will start and after its completion we will see the success and errors and in a dialog box. Here, click on the button View Successes.

Remove team members from Salesforce opportunities via data loader

12. In the status column of the CSV file, we can see that records are deleted from the opportunity members.

We can also cross-check the deleted opportunity team members from the opportunity record.

Remove Salesforce Opportunity team members using data loader

This way, we can remove the Opportunity team member via the Salesforce data loader by following the above steps.

Conclusion

In Salesforce, managing Opportunity Team members through Data Loader enhances efficiency and streamlines collaboration within sales processes. By following the above steps, you might have understood the process of adding and removing the team members form an Opportunity records using the data loader.

Now, you will be able to use a data loader to manage the team members in the opportunity records of your Salesforce environment.

You may like to read:

How to Mass Delete Opportunities in Salesforce using Data Loader