Mass Update Territory on Opportunity records via Data Loader in Salesforce

In Salesforce, territory management is crucial for the Sales operation of the organization. With territory models, we can efficiently organize the opportunity records. If you enable ‘Enterprise Territory Management’ in your organization, the ‘Territory’ field will become available in the ‘Opportunity’ object.

We can update the territory field for an opportunity object with the help of a data loader, especially if it was not automatically updated after running the territory assignment rule.

Update Territory on Opportunity records via Data Loader in Salesforce

To Update Territory on Opportunity records via Data Loader in Salesforce, ensure you have enabled Enterprise Territory Management and defined territory models and types.

1. We must prepare a CSV file with the following header column to update territories on opportunity records.

  • OpportunityId: Id of the opportunities in which you have to update territories
  • Territory2Id: Id of the territory available in your org.

2. To get the opportunity ID, run a data export for the Opportunity object by following the steps.

  • Open the data loader and click Export.
  • Select the data object Opportunity and click Next.
  • Select the query field ID and select the Name field for reference.
  • Click Finish.

3. To get the Territory2Id, again perform an export operation for the territory object by following the steps.

  • Open the data loader and click Export.
  • Click on the Show All Salesforce object, select the Teritory2 object, and click Next.
  • Select the query field ID and select the Name field for reference.
  • Click Finish.
See also  How to Mass Delete Opportunities in Salesforce using Data Loader

We can also get the territory ID from the ‘Territory Model‘ in Setup, then click on ‘View Hierarchy‘ and finally click on the territory. The Territory ID can be viewed on the URL and would start with ‘0MI’.

4. Now, in the CSV file with the columns Opportunity Name, Territory ID, and Opportunity ID, enter the IDs of the territories adjacent to the opportunity IDs and save the CSV file in your system from where it can be accessed to the data loader.

Mass update Territory on Opportunity records via Salesforce Data Loader

5. Open the data loader and click on the Update button.

Update Opportunity territory via Salesforce data loader

6. In this step, select the data object Opportunity and browse the CSV file we created in the above steps. After this, click on the Next button.

Mass update Territory on Opportunities via Salesforce Data Loader

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

Update territory in Opportunities using Salesforce data loader

8. In this step, we will map the column header with the object field names, and for that, click on the Create or Edit a Map; then, in the Mapping Dialog window, click on Auto-Match Fields to Columns.

If the field names are not auto-matched, you must drag the fields down to the column mapping.

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

Salesforce Opportunities Territory update from Data loader

9. Select the location for the success and error file from where it can be accessed later. At last, click on the Finish button.

Update Mass Opportunity territory using Salesforce data loader

10. A warning message will appear regarding the data update operation as we click the Finish button. Here, click on the Yes button to proceed.

Mass update Salesforce Opportunities territory via data loader

11. Now, the data loader will start the data update operation. After the completion of the data operation, a dialog box will display the number of successes and errors that occurred during the data update.

See also  How to Bulk Create Campaigns in Salesforce Via Data Loader

In this example, we got the success message with zero errors, which means we successfully updated the territory in the Opportunity records.

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

Salesforce Opportunities Territory mass update via data loader

12. To view the updated data, go to the opportunity record in which you have updated the territory, and in the territory field, you can view the updated territory.

Update Salesforce Opportunity Territory via data loader

This way, we can mass update Territory on Opportunity records via Data Loader in Salesforce by following the above steps.

Conclusion

In Salesforce CRM, efficient territory management is important for the organization’s sales process, and the Salesforce data loader proves to be a useful tool in the mass management of territory data for Salesforce objects.

Following the above steps, you might have understood the process of Mass updating Territory on Opportunity records via data loader. By now, you can manage and update the territory for opportunity records in your Salesforce environment.

Do you like to read: