This article explains how to use Salesforce Data Loader to insert, update, or upsert Order Products (also called OrderItems) into existing Salesforce Orders. Order Products represent the individual products added to an Order and are stored in the OrderItem object in Salesforce. If you only need to add a small number of products, adding them manually through the Salesforce user interface may be simpler.
Before importing Order Products using Data Loader, it helps to understand the relationship between the key objects involved:
Prepare a CSV file with the following columns before running Data Loader:
SELECT Id, OrderNumber, AccountId, Account.Name, Pricebook2Id, Pricebook2.Name FROM Order WHERE Status = 'Draft'. Note: The query above filters for Draft Orders only, since activated Orders cannot have products added or modified.SELECT Name, Id, UnitPrice, Pricebook2.Name, Product2.Name FROM PricebookEntry WHERE IsActive = trueYou may need additional fields depending on your org's validation rules or required custom fields on the OrderItem object.
Data Loader Overview
Orders Overview
Preparing Your Data for Import
Prepare a CSV file for an import or update in Salesforce
000384893

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.