Admins / Data

Insert Products With Data Loader in Salesforce Tutorial

By Mariel Domingo

Welcome to another part of our series on becoming a Salesforce data pro! If you’ve been following our journey from the installation of Data Loader to the seamless insertion of users, you’re probably already familiar with the potential that Data Loader holds when it comes to managing big amounts of data.

Now, we’re on to tackle another object: products. In this tutorial, we’ll guide you through the process of effortlessly integrating products into your Salesforce environment.

Products in Salesforce are the lifeblood of your sales process, as they encompass everything your company has to offer! Knowing how to efficiently insert them in bulk ensures that your catalog is always up-to-date and ready for action without having to add them one by one through the UI manually.

Prerequisites and Prep

The standard Product object’s API name in Salesforce is Product2. As usual, make sure you’ve prepared your CSV file properly. There are a few items to consider:

  • Product Name is a required field when inserting or creating products.
  • If you created custom fields for your Product object, you’ll definitely need to add these as columns in your CSV file, along with the standard fields. This guide has more information on the standard Product fields.
  • Run a full export on the Product2 object to get a list of the IDs associated with products. This will also serve as a backup of your current data.

To run a full export:

1. Open Data Loader, click “Export All”, and log in to your org.

2. Search for “Product2” and specify the folder where you want your CSV file of exported content to be saved.

3. Hit “Next” and proceed to Step 3: Editing Your Query. Select the Product fields that you want included in your file. I picked out the basics for active products – like Name, Id, and IsActive. You can add more fields as needed.

4. Click “Finish”, and Data Loader should tell you how many successful exports and errors went through.

  • It’s time to create your CSV file for importing. Here’s a basic template you can start with – just download and fill it out! Feel free to add the columns you need.
  • Make sure every row has a value for Name since it is a required field. On the IsActive column, input “TRUE” for active Products and “FALSE” for inactive ones.

Once you’re done, the CSV file should look similar to the image below. In my case, I’m trying to add four active products and have added the RecordTypeId column since I am importing two Product record types.

Insert the Products

It’s time to add the products to your org. Launch Data Loader and log in. Hit “Insert” and select the Product object.

Choose the file name of the CSV file you created and hit “Next”. Data Loader will analyze your file, and you should see whether or not initialization succeeded.

Click “OK”, and the next step will be mapping. The columns in your CSV file will appear as a list.

Click “Create or Edit a Map” then “Auto-Match Fields to Columns”. Double-check the resulting mappings and go over some that didn’t map successfully. In my case, Name didn’t come through, so I searched for the correct field and dragged it over to map correctly, like so:

Hit “OK”, and then “Next”. For the directory, click “Browse” and specify the location for saving the “error” and “success” files. Then click “Finish”.

Verifying your Results

Once the insertion process is finished, Data Loader will tell you whether or not it was successful.

You can verify what went down through the “error” and “success” files that will appear in the location/folder you specified earlier. You should see two new CSV files, one for errors and the other for successes.

Check each file’s contents for more information. Ideally, the “error” file’s table should be empty and the “success” file should have a complete list of the products you wanted to import.

Log in to your Salesforce org and check if the new products have now appeared. You can try cross-checking the details of inserted products with the original CSV file to ensure accuracy. Here are the four active products I imported using the CSV file:

Bonus: Relating Your Products to Price Books

Congratulations on successfully importing the products into your org! Now, it’s time to enhance your product offerings further. This involves associating these products with specific price books, so you can add prices and effectively utilize them to cater to your customer base.

Price books allow you to define different sets of products and prices for various purposes. This flexibility ensures accurate pricing for diverse customers. In this bonus section, we’ll guide you through this process so you can further fine-tune your sales strategies. Since products must first be associated with the standard price book before you can associate them to a custom price book, let’s proceed to establish this fundamental connection.

Prerequisites and Prep

The association between a product and a price book is dictated by the Price Book Entry object. As usual, let’s prepare our CSV file. Keep in mind to include the required fields below:

  • Product2ID: The ID of the specific product to associate with a price book. This ID can be found in the URL when viewing the product via UI.
  • Pricebook2ID: The ID of the price book to be associated with the product. Same as above, the ID can be found in the URL when viewing the price book from the UI.
  • IsActive: Values for this column would either be TRUE (for active) or FALSE (for inactive).
  • UnitPrice: Your product’s price.
  • CurrencyISOCode: Only required for orgs using multicurrency. Otherwise, you can skip this field.

You can use this template – just fill it out and it should look somewhat like this:

I used Products 6, 7, 8, and 9, which were imported earlier. Save your final CSV file.

Inserting the Price Book Entries

Follow the same steps we did for inserting products above, but this time, make sure to tick “Show all Salesforce objects” before searching for Price Book Entry.

Select your CSV file’s location. Hit “Next” and “OK” after initialization.

For the mapping, do the same steps as before – make sure to drag the appropriate fields to map values that didn’t come through (in my case, it’s Product2ID). Hit “OK”, and then “Next”. For the directory, click “Browse” and specify the location for saving the “error” and “success” files. Then, click “Finish”.

Check Your Results

Data Loader will tell you whether all rows were successful or if there were any errors (hopefully not!). Verify what went down through the “error” and “success” files that will appear in the location/folder you specified, then check your Salesforce org to see if the products are now associated with your standard price book.

Here you can see Product 8 (row three of my CSV file), which now shows the Standard Price Book in its Price Book related list with a list price of $320.

Once your products are related to your standard price book, repeat the same steps above in case you want to add custom prices/relate to custom price books. Just update the price book ID values in your CSV file to the ID of your custom price books.


And there you have it – we’ve demystified the process of integrating multiple products into your Salesforce org using Data Loader. With this newfound expertise, managing your product catalog is bound to become second nature.

Just remember, like with user insertion, meticulous preparation of your CSV file and accurate mappings lead to success. So, get to practice your Data Loader skills and watch yourself breeze through bulk insertions every time. Happy product management!

The Author

Mariel Domingo

Mariel is the Courses Administrator at Salesforce Ben.

Leave a Reply