Salesforce Data Loader can import Opportunity Product (OpportunityLineItem) records in bulk.
For example, a sales operations admin needs to bulk-load 500 Opportunity Products into existing Opportunities after migrating from a legacy CRM. The CSV file must include the OpportunityID, PricebookEntryID, and UnitPrice columns.
This article answers how to create Opportunity Product (OpportunityLineItem) records in Salesforce Sales Cloud by importing a CSV file with Data Loader.
The video below (runtime ~5 minutes) walks through preparing the CSV file and running the Data Loader insert for OpportunityLineItem records, including how to retrieve PricebookEntry IDs.
To get started, prepare a CSV template with the following columns:
To get the OpportunityID, navigate to the Opportunity record and copy the ID in the page URL. If you are working with more than one Opportunity, use Data Loader to export records from the Opportunity object. Include the ID, Opportunity Name, and any other fields that help identify the correct Opportunities.
To get the values for PricebookEntryID and Product2ID, export them from the Price Book Entry (PricebookEntry) object using Data Loader. Select the fields ID, Product2ID, and any other fields that help identify the correct Product. The ID field is the PricebookEntryID.
If you have additional information for the import, add new columns to the CSV file for the fields and data.
After you save the file as a CSV file, perform an import using Data Loader:
000382941

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.