Price Book Entry Bulk Load pt. 1

By in
359
Price Book Entry Bulk Load pt. 1

In a previous blog, we talked about how to create Price Book Entries in your Salesforce instance.  During that walk through, the entries were created manually.  Oftentimes you may want to bulk load your Price Book Entries so that you are not manually creating them.  This saves both time and mistakes as it is much easier to accidentally misclick something when you’re manually creating the Entries as opposed to bulk loading via a data loader. Let’s start by creating a query below to determine the fields we need.

First, we need to establish the required fields for our load.  This will help us understand how we need to structure our CSV for data load.  Keep in mind that if you have custom-required fields in your instance that you will need to add those to the CSV template.

 

Required Fields Optional Fields
Pricebook2Id IsActive
Product2Id CurrencyIsoCode
UnitPrice UseStandardPrice
CustomField1 CustomField2
CustomField3 CustomField4

 

Based on this table, you will need to have header columns for Pricebook2Id, Product2Id and UnitPrice.  In this example I added in custom fields as an example in case your instance does in fact have custom fields that will need to be populated.

If you are unsure of how to find the Pricebook2Id that you are going to load to, there are a few ways that you can find that information.  The first one is to do a query in Workbench.  In Workbench, navigate to the Query section and input this query:

​​SELECT Id,Name FROM Pricebook2

That will return the record Id and name of your Pricebooks.  From here you could easily grab the Id of the appropriate Pricebook.

Query for Pricebook Entry

The other option you have is to navigate within Salesforce to the Pricebook section via the app launcher.  Once you are on the Pricebook in Salesforce the record ID will be in the URL of the page.

Price Book Entry

You can see that the value returned in Workbench for the Mid Market Price Book and the ending of the URL for Mid Market Price Book are both 01s5f00000EZ5SIAA1.  This would mean that for the Pricebook2Id field in my CSV I would type in 01s5f00000EZ5SIAA1 if that is where I want the new PriceBook Entries to reside.

In the next blog, we will walk through the actual Pricebook Entry load via Workbench.

 

Additional Resources

Cover Photo by Mike van den Bos on Unsplash

Leave a reply

Your email address will not be published. Required fields are marked *