How do I mass add products to an opportunity with the Data Loader?

I've tried a few times but it seems to be asking me for the price book Id not the product - quite confused by this. - Is the pricebook entry ID not the product ID? We use 3 pricebooks with about 1million products in each of them

enter image description here

1 Answer 1


Well, the relation looks like it should have a look up to Product object in Opportunity Product. But the architecture is not that simple.

First you have to create PricebookEntry records with your products & pricebooks. Once you have those, you have to bind pricebookentry records to OpportunityProducts which internally will bind itself to the Product records.

Suppose you have pricebookentry records:

enter image description here

And you bind them to OpportunityProducts:

enter image description here

So internally it will bind like this:

enter image description here

This architecture is to ensure that a product can have multiple price in multiple pricebooks. Its up to you to choose the price of the product you are adding into a Opportunity as OpportunityProduct.

Here is a link which you can refer to to understand this better. Also I would encourage you to see the Schema Builder in Salesforce org with Opportunity, OpportunityProduct, Product, PricebookEntry & pricebook selected.

  • So, basically there is no simple way - I cannot just load to opportunity using Product ID field? This seems a bit much work for what is required surely it should be a case of Opportunity ID ###### - Product ID ##### End date, start date, etc map the fields and done.. Sep 9, 2016 at 8:51
  • Thats still easy. All you have to do is create pricebookentry records for each of the products using an apex code running anonymously and use the pricebookentry ids in opp products. Sep 9, 2016 at 9:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .