Salesforce Sales Cloud does not allow you to update the Product on an existing Quote Line Item with Data Loader, due to the complications outlined in the article "Product mismatch in Quote's 'Quote Line Item' related list and Quote Line Item record".
As a workaround, re-insert the updated Quote Line Items as new records. Export the existing line items, update the export file with the new Product's Price Book Entry IDs, insert the new Quote Line Items associated to the new Products, and then delete the original Quote Line Items.
This article answers how to change the Product on existing Quote Line Item (QuoteLineItem) records in Salesforce Sales Cloud by exporting, re-inserting, and deleting records with Data Loader.
Warning: Always back up your data before performing any data operation. See Export Backup Data from Salesforce in the Salesforce Help for more details. Run a test with a small subset of records first. Then open the corresponding records in Salesforce and verify manually that they are correct.
Export the existing Quote Line Item (QuoteLineItem) records using Data Loader:
Note: If Data Loader is not yet installed, review the Data Loader installation procedure listed in Additional Resources.
Rename the ID column in your export file to "OLD ID". Then update the existing values in the PRICEBOOKENTRYID column with the PricebookEntryIds of the new Products that you want.
Note: A quote must have a price book selected to add Products, and you can only add Products from a single price book. Changing the selected price book deletes all existing Products from the quote.
You can update a Quote's assigned price book with Data Loader through the Quote's Pricebook2Id field, but only when the Quote does not have any associated line items. If Products are associated through Quote Line Items, you receive the error "INVALID_FIELD_FOR_INSERT_UPDATE: You Cannot Modify The Quote Price Book On Quotes Which Have Quote Line Items" when you update the Quote's Pricebook2Id.
If you do not know the PricebookEntryIds of the new Products, use one of the following options.
Go to the Price Books tab and open the price book that contains the new Products and is also assigned to the Quote. Click the View action for the corresponding Product in the Products section of the price book page. This opens the Price Book Entry record, and the URL in your browser contains the PricebookEntry Id.
For example, in the URL https://YourInstanceOrMyDomainHere.salesforce.com/01ua000000fgBO4, the ID is 01ua000000fgBO4.
Identify which price books are assigned to each Quote that you want to update. Then use the corresponding Price Book Ids to query the PricebookEntry object and generate a list of Products with their PricebookEntryIds. Use that list as a reference when you update your export file.
To identify the price book currently assigned to the Quote and get its Pricebook Id, use either of these methods:
SELECT Id, Name, Pricebook2Id FROM Quote
After you have the Quote's assigned Pricebook Id, generate a list of the Products in the price book to get the PricebookEntryIds of the new Products.
Create a list of PricebookEntryIds for a particular price book with Data Loader. Select Export, check Show all Salesforce objects, and select Price Book Entry (PriceBookEntry). Select the following query fields, plus any additional fields that help you identify the desired Product:
Add the filter condition Pricebook2Id equals the Pricebook Id from Option B. For example, if your Pricebook Id is 01sa0000000L81b, the filter is Pricebook2Id equals 01sa0000000L81b. Click Add Condition. The generated query in the Data Loader editor looks similar to this query, which returns the Id, Name, Pricebook2Id, and Product2Id of every entry in the selected price book:
Select Id, Name, Pricebook2Id, Product2Id FROM PricebookEntry WHERE Pricebook2Id = '01sa0000000L81b'
Click Finish, and then click Yes when prompted to begin the export. The ID column in the resulting CSV file contains the PricebookEntryIds. Use them as a reference to update your Quote Line Item export file with the new Products, as described in Step 2.
After you update the Quote Line Item export file with the PricebookEntryIds of the new Products and save it, you are ready to re-insert the Quote Line Items.
Note: To keep the original Quote Line Item audit field data (Created By and Last Modified By), enable the "Set Audit Fields upon Record Creation" feature before you proceed. See the article "Enable the 'Create Audit Fields' Permission in Salesforce" in the Salesforce Help for more details.
If the insert succeeds, your Quote contains both the original Quote Line Items and the newly inserted line items with their updated Products. If the insert fails, review the error messages in the Error file, make the necessary corrections, and attempt the insert again.
Delete the original Quote Line Items, because you have re-created them with the updated Products.
If the delete succeeds, your Quotes contain only the newly inserted line items with the updated Products. If the delete fails, review the error messages in the Error file, make the necessary corrections, and attempt the delete again.
000381645

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.