How to Insert or Update Price Books with Data Loader in Salesforce

In Salesforce, Price books are crucial in managing product pricing and discounts within the organization. When it is required to create price books and modifications like adding new products or updating existing prices, using Salesforce Data Loader can implement the changes efficiently.

In this Salesforce tutorial, we will learn to Insert or Update the Price books with the help of the Salesforce data loader.

Price books in Salesforce

In Salesforce, the price books serve as catalogs for product pricing, allowing us to define different prices for products based on various criteria. There are two main types of Price Books – Standard Price Books and Custom Price Books.

Standard Price Books – The Standard Price Book is the default catalog of prices that comes with Salesforce. It shows the base prices for products and is often associated with the standard list prices. Products associated with the Standard Price Book will inherit their prices from this catalog by default.

Custom Price Books – The custom price books allow us to create a specialized catalog that is customized for specific customers, regions, and other criteria. We can define our unique pricing in the custom price books. To associate any product with the custom price book it should be associated first with the standard price book.

Data loader to Insert and Update Salesforce Price books

Salesforce Data Loader is a powerful and robust tool for data management that enables bulk data import, export, update and delete operations. Its capability of performing bulk data operations efficiently with data accuracy makes it suitable to mass insert and update the price books in the Salesforce environment.

Insert Price Books via Data Loader in Salesforce

This process applies to importing a custom Price Book. The field for ‘Standard‘ is not accessible when working in the Data Loader which means the price book will be considered as custom only, so it is best to create a Standard Price Book manually in the org.

See also  How to Export Salesforce Users Data With Data Loader

To insert price books via the data loader in Salesforce, make sure you have installed the Data loader in your system.

Now follow the below steps, to insert custom price books via data loader in Salesforce.

1. To insert or import price books via data loader, create a CSV file with the header columns Name, IsActive, Description, and any other fields necessary for the product.

Enter the values in the column, and save the CSV file in your system from where it can be accessed by the data loader.

Insert Price book with Salesforce Data loader

2. Now open the Data loader, log in with your credentials, and click on the Insert button.

3. In this step, activate the checkbox Show All Salesforce Objects, then select the data object Price Book (Pricebook2). After this, browse the CSV file that we have created in the above steps.

After this, click on the Next button.

Salesforce Price book insert from data loader

4. As we click on the Next button, the data loader will initialize the CSV file and display the number of rows in the CSV file. Here, click on the OK button to continue.

Import Price book in Salesforce via data loader

5. In this, we will map the column headers with the Salesforce object fields, and for that, click on the button Create or Edit a Map. Then, in the next window, click on the button Auto-Match Fields to Columns.

Now, the column will be auto-matched with the object field names; if not, then you have to drag the object fields down to the column mapping.

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

Insert Custom Price book with Salesforce Data loader

6. In this step, select the location for the success and error from where it can be accessed by the Data Loader, and then click on the Finish button.

Import Price book in Salesforce with data loader

7. As we click on the Finish button, a warning message will appear on the screen regarding the insert operation. Here, click on the Yes button to proceed.

Insert Price book via Salesforce Data loader

8. Now, the data insertion will start, and the number of successes and errors will appear in a dialog box. Here, we got the success message with no errors, which means that the data is successfully inserted.

See also  Add or remove Opportunity Team members with Data Loader in Salesforce

Now click on the OK button to close the data loader.

Insert and Update Price books in Salesforce via Data Loader

9. To view the inserted price books, go to the Salesforce setup page click on the App Launcher, and search then select Price Books, and in the price books tabs, you will able to see newly inserted and created custom price books.

How to Insert or Update Price Books with Data Loader in Salesforce

In this way, we can insert the custom price books in your Salesforce org via data loader by following the above steps.

Update Price Books via Data Loader in Salesforce

The Data Loader can be used to update the Name, Description, and Active status of a Price Book. 

To update the price books via the data loader in Salesforce, open the data loader and log in with your credentials, then follow the below steps.

1. To update the Price book (Pricebook2), it will be better to get an export of price book details from the data loader so that we can have a template for the update.

To export details of the price book, open the data loader and follow the steps.

  • Click on Export.
  • Select the data object Pricebook2, and click Next.
  • Select the fields Description, Id, Names, and other fields.
  • Click Finish.

2. Now open the extracted CSV file and edit the values of the price books update the values then save the CSV file in your system from where it can accessed to the data loader.

3. Again open the data loader, and click on the Update button.

Update Salesforce Price books via data loader

4. In this step, select the data object Price Book (Pricebook2), then select the CSV file that you have saved with the updated values then click on the Next button.

Use Data loader to update Salesforce Price books

5. Now the uploaded CSV file will be initialization by the Salesforce data loader. Here, click on the OK button to proceed.

Update the price books via Salesforce Data loader

6. Now, we need to map the column header of the CSV file with the object field names, and for that, click on the button Create or Edit a Map.

Then in the next window, click on the button Auto-Match Fields to Columns. Now, the column names will be auto-matched with object names. If they are not auto-matched then you have to drag the objects fields down to the column mapping.

See also  How to Update Picklist (multi-select) Values in Salesforce with Data LoaderĀ 

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

Insert and Update Price books with Salesforce data loader

7. Now, in this step, select the location for the error and success file from where it can be accessed by the data loader, and last, click on the Finish button.

Use Data loader to insert and update Price books

8. As we click on the Finish button a warning message will appear regarding the update operation. Here, click on the OK button to proceed.

9. Now the data update will start and we can see the number of errors and successes that occurred during the update operation. Here click on successes to view the updated records.

Update Salesforce Price books with data loader

Now we can see the status of updated price books, and you can also view the updated changes in the Price book tab in the Salesforce console.

Use Salesforce data loader to update price books

In this way, we can update the price books in Salesforce via data loader by following the above steps.

Conclusion

In the Salesforce environment, effectively managing price books is essential for maintaining accurate product pricing and providing a seamless experience for users. Utilizing Salesforce Data Loader for inserting and updating price books helps in maintaining data accuracy and consistency in the Salesforce org.

By following the above example, you might have understood the process of inserting and updating the price books via the Salesforce data loader, and now you will be able to perform these data operations efficiently in your org.

You may like to read: