How to Deactivate Standard Products in a Standard Price Book via Data Loader in Salesforce

In Salesforce, deactivating the Standard Products in a Standard Price Book via Data Loader is the fastest way to deactivate a standard product. In this Salesforce tutorial, we will learn to deactivate the Standard Products in a Standard Price Book via Data Loader in Salesforce.

Deactivating standard items becomes necessary in many cases, such as when a product’s price has changed or it has been discontinued.

Deactivating products helps maintain accuracy and enhance product management by preventing unnecessary information from being displayed in the Salesforce instance.

Deactivate Standard Products in a Standard Price Book via Data Loader

To deactivate the Standard Products in a Standard Price Boom via data loader, ensure that you have installed the data loader in your system and you have required access to modify the price books and products.

Follow the below steps if you meet the above conditions.

1. Firstly, we must create a CSV price book entry with the header columns ID, ISACTIVE, NAME, and PRICEBOOKID.

The better option is to run an export with a data loader for the data object PriceBookEntry. To do so, open the data loader and click the Export button.

Deactivate the Standard products using the Salesforce data loader

2. In this step, activate the Show all Salesforce objects checkbox and select the Price Book Entry data object. After this, enter a name and select the location of the CSV file into which data will be extracted.

At last, click on the Next button.

deactivate Standard Products in Price books via data loader

3. In this step, select the query fields Id, Name, IsActive, and Pricebook2. We will also add a conditional filter to sort the products of a specific price book.

See also  How to Insert or Update Price Books with Data Loader in Salesforce

In the Field, enter PriceBook2Id and enter the Value as 01s5i0000##### (Pricebook2id), then click on the button Add Condition.

Now, the generated query will appear as:

SELECT Id, Name, Pricebook2Id, IsActive 
FROM PricebookEntry 
WHERE 
    Pricebook2Id = '01s5i00000OxJ1DAAV' 

At last, click on the Finish button.

Products deactivation from price book in Salesforce

Now we will get the data of the pricebook that we have entered in the condition.

4. Open the extracted data in an external CSV file and change the ISACTIVE status of the products you need to deactivate as False. After this, remove the rest of the records and save the CSV file.

How to deactivate products in Salesforce pricebook via data loader

We have prepared the CSV file. After this, we will perform a data update operation via the Salesforce data loader.

5. Open the Data loader and click on the Update button.

Use data loader to deactivate Pricebook products in Salesforce

6. In this step, activate Show all Salesforce objects, then select the data object Price Book Entry. After this, select the CSV file that we have created in the above steps.

At last, click on the Next button.

Salesforce Pricebook products deactivation via data loader

7. Now, the data loader will initialize the uploaded CSV file and display the number of rows in the CSV file. Here, click on the OK button.

deactivate Standard price book products in Salesforce

8. To map the column header with object fields, click on the button Create or Edit a Map, then in the Mapping dialog window, Auto-Match Fields to Columns.

If the columns do not auto-match, you need to drag the object fields down to the column mapping. After mapping, click on the OK and Next buttons.

Deactivate Standard price book products in Salesforce via data loader

9. In this step, select the location for the error and success files so that they can be accessed later. At last, click on the Finish button.

How to deactivate Salesforce price book Products via data loader

10. As we click the Finish button, a warning message regarding the data update operation will appear. Click the Yes button to proceed.

Update product status in Salesforce price book

11. Now, the data update will start in the data loader. After it is completed, a dialog box will display the number of errors and successes that occurred in the data operation.

See also  How to Import the Notes Via Data Loader in Salesforce

Here, we succeeded without errors, which means the data update succeeded. At last, click on the OK button to close the data loader tool.

12. To view the deactivated products, navigate to the Price Book tab. Here, open the price book in which you have deactivated the products.

In the product list, you will see that the Active status is unchecked for the deactivated products.

Deactivate the Standard products via Salesforce data loader

Following the above steps, we can deactivate the Standard Products in a Standard price Book via a data loader in Salesforce.

Conclusion

In Salesforce, using Data Loader to deactivate standard products in a Standard Price Book improves data accuracy and ensures that only the useful products are in the Price Book.

By following the above steps, you might have understood the process of deactivating the Standard Products in a Standard Price Book via Data loader in Salesforce.

You may like to read: