Loading

Add new product prices in Price Books with Data Loader

Publiceringsdatum: Oct 13, 2022
Beskrivning

You can modify existing Price Book data with Data Loader.

 

Lösning


Please note that this solution is applicable if:

 

  • You have already loaded Products into the "Products2" table (via another solution) and simply need to change which Price Books in which they appear in.
  • You have products in one Price Book and now want them in other Price Books.
  • You have products in listed in one currency in one Price Book and now want to add these products in other currencies to one or many Price Books.


Please see the attached PDF file (formatted - easy to read version of solution).

 

Step 1. Export the "Price Book Entry" table

To give us a file to work with your existing data you will need to export this table.
 

  1. Open the Data Loader
  2. Export the "Price Book Entry" table
  3. Include all fields except: Id, Created Date, Created By ID, Last Modified Date, Last Modified By ID, System Mod Stamp, Product Code or Product Name.
 
Notes:
  • These fields are not mappable in the next steps.
  • You will not need "Id" because you will be inserting new entries in the Price Book Entry table.
  • You can export Name, to help you work with the file preparation but this field will not be mappable in the Price Book Entry table.

 

Step 2. Prepare file for standard Price Book

Take the file from Step 1 and modify it to reflect changes to the standard Price Book (See attached sample file: Solution5654-.xls).

Note: Any new entries made in a custom Price Book will first need to be made in the standard Price Book, so this step needs to be followed.

 

  1. Identify existing data in the standard Price Book.
  1. Open the Price Book Entry export file (from Step 1) and sort by the Pricebook2ID column.
Note: To find which Pricebook2ID relates to which Price Book Name quickly, export the Pricebook2 table via Data Loader. This will show you the names and IDs together.

 

  1. Identify standard Price Book data.
  2. Delete non standard Price Book data.
  3. Save As and give the file a new name. This will allow you to keep both files as a backup.
 
  1. Modify other columns to contain desired changes to the standard Price Book:
  • PriceBook2ID: Standard Price Book ID
  • Product2ID: Do not modify
  • CurrencyIsoCode: Modify if necessary
  • Unit Price: Modify if necessary (this is the List Price/Standard Price field for the product)
  • UseStandardPrice: This indicates whether to use the price from Standard Price Book or not.
  1. FALSE (only option for Standard Price Book)
  2. TRUE (is not an option because Use Standard Price field is not available in the Standard Price Book)
  • IsActive: TRUE (must be TRUE to insert. This can be changed to FALSE after Step 5 is complete).

 

Step 3. Insert into "Price Book Entry" table

To add new entries into the standard Price Book
 

  1. Open Data Loader.
  2. Insert to 'Price Book Entry' table.
  3. Save success and error files in a folder for this project.
 

Step 4. Prepare file for custom Price Book

Take the file from Step 1 and modify it to reflect the changes to the custom Price Book.
 

  1. Identify existing data in the standard Price Book.
  1. Open the original Price Book Entry export file (from Step 1) and sort by the PriceBook2ID column.

Note: To find what Pricebook2ID relates to which Price Book Name quickly, export the Pricebook2 table through Data Loader. This will show you the names and IDs together.
 

  1. Identify custom Price Book data.
  2. Delete all other Price Book data.
  3. Save As to keep both files.
 
  1. Modify the file to contain desired changes to the custom Price Book:
  • PriceBook2ID: Custom Price Book ID
  • Product2ID: Do not modify
  • CurrencyIsoCode: Modify if necessary
  • Unit Price: Modify if necessary (this is the List Price or Standard Price field for the product)
  • UseStandardPrice: this indicates whether to use the price from standard Price Book or not.
  1. FALSE (this choice means you will use the Unit Price from the custom Price Book and NOT the Unit Price from the standard Price Book)
  2. TRUE (this option only works if this Product has been added to the standard Price Book. This choice will use the Unit Price from the standard Price Book)
  • IsActive: TRUE

 

Step 5. Insert into "Price Book Entry" table

To add new entries into the custom Price Book, make sure your custom Price Books are active in SFDC.
 

  1. Open Data Loader.
  2. Insert to Price Book Entry table.
  3. Save success and error files in a folder for this project.
 

Step 6 (optional)

If you only want the Products that are not in the standard Price Book available for selection as a line item, you must deactivate the Price Book Entry where the Pricebook2ID is the standard Price Book.

 

Deactivate standard Products in Standard Price Book

  1. Use the file saved from "Step 2. Prepare file for standard Price Book" which should contain Price book entry records for only Products in the standard Price Book.
  2. Change the values in IsActive from TRUE to FALSE.
  3. Map only the PriceBooks2ID and IsActive fields.
  4. Update Price Book Entry table.


 

See also:
Manage Price Books  
Insert new product prices in Price Books with Data Loader  
Associate products to standard and custom Price Books with Data Loader

Salesforce Support Video: 
How to Load Products via Data Loader

Knowledge-artikelnummer

000385493

 
Laddar
Salesforce Help | Article