function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
trick12trick12 

Data Loader and Price book problem

Hi Friends,

 

I have etracted some data from one instance and i am trying to upload in another through data loader.

I have been able to extract data which is in Excel file and then I am able to upload to the standard price book and from there I want to move that data to custom price book names pps.

 

I have been able to load data to the standard price but Everytime I try to move data to the custom price book I get an err meesage in the excel sheet along with other data.

Product ID: id value of incorrect type: 01uC0000006HL0SIAW Product ID: id value of incorrect type: 01uC0000006HL0TIAW

 

Guys can any one of you tell me why am I getting this error what is that I am not doing correctly.Please help.

 

Thanks,

Trick12

WizradWizrad

Ids are not consistent between orgs.

sales4cesales4ce

This should help you with what your are requesting for.

 

How to insert/upload new Products, Price Books & Opportunity Line Item via Data Loader?


Questions this solution will help answer:
- Step 1: How do I create and activate a Product Price Book?
- Step 2: How do I load Products via the Data Loader?
- Step 3: How do I load Products into Standard Price Book and Custom Price Books via the Data Loader?
- Step 4: How do I load Opportunity Line Items via the Data Loader?

See attached PDF file (for formatted - easy to read version of solution)

The following steps need to be taken in the exact order:

_______________________________________________________________________________________________
How do I create and activate a Product Price Book?

Step 1 - SET UP Price Books in Salesforce CRM
Usually there are only a small finite set of price books, therefore this action can be done directly in the application. If you choose to use the Data Loader, use the "PriceBook2" table.

1. In salesforce click on the Products Tab.
2. In the bottom right-hand corner, click on "Manage Price Books"
3. Add as many Price Books as necessary.
4. The Standard Price Book MUST be active.

_______________________________________________________________________________________________
How do I load Products via the Data Loader?

Step 2a - PREPARE Products file
(See attached template "Products_INSERT_Template_Step2a.csv")

1. Make sure all Products have a Product Name
-This is a required field when loading Products into the "Products2" Table
2. If you use Record Types, you will need the "RecordTypeID" for the insert file
-EXPORT "Record Type" table via the Force.com AppExchange Data Loader (you will need to check "Show all Sforce Objects"). This export will provide the 18 digit ID, which is needed for the insert.
3. Make sure your column headers in the file exactly match fields in SFDC

Step 2b - INSERT Products to the "Products2" Table.

1.Open Data Loader
2. Insert to "Products2" table
3. Save success and error files in a folder for this project, you will use them in the Step 3b.


_______________________________________________________________________________________________
How do I load Products into Standard Price Book and Custom Price Books via the Force.com AppExchange Data Loader?

Step 3a - EXPORT "Price Book 2" Table
You will need the "PriceBook2ID's" and other fields to prepare a file for the next step.

1. Open the Data Loader
2. Export the "Price Book 2" table
3. You need "Price Book 2 ID" for insert file
4. Save file in an easy to access location
5. This will be used to create your final insert file for Step 3c and 3e

Step 3b - PREPARE file for Standard Price Book

NOTE: Even if you do not want to associate these Products with the Standard Price Book this step still must be followed.

Data Columns:
-Product2ID: Use the "ID" from the "Product2" success file from Step 2
-PriceBook2ID: get the Standard Price Book ID from file created in Step 3a
-CurrencyIsoCode: use Salesforce CRM currency symbol (only for Multi-Currency org)
-Unit Price: this is the List Price/Standard Price field for the product
-UseStandardPrice: this should be TRUE or FALSE and indicates whether to use the price from Standard Price Book or not.
----FALSE (only option for Standard Price Book)
----TRUE (is not an option because "Use Standard Price" field is not available in the Standard Price Book)
-IsActive: TRUE (must be TRUE to insert - this can be changed to FALSE after Step 5 is complete)

Step 3c - INSERT into "Price Book Entry" Table

1. Open the Data Loader
2. Insert to "Price Book Entry" table
3. Save success and error files in a folder for this project

Step 3d - PREPARE file for Custom Price Books
Use the file from last step and modify it to have the Custom Price Book ID.

Data Columns:
-Product2ID: Use the "ID" from the "Product2" success file from Step 2
-PriceBook2ID: get the Custom Price Book ID from file created in Step 3a
-CurrencyIsoCode: use Salesforce currency symbol (only for Multi-Currency org)
-Unit Price: this is the List Price/Standard Price field for the product
-UseStandardPrice: this should be TRUE or FALSE and indicates whether to use the price from Standard Price Book or not.
----FALSE (this choice means you will use the Unit Price from the custom Price Book and NOT the Unit Price from the Standard Price Book)
----TRUE (this option only works if this Product has been added to the Standard Price Book. This choice will use the Unit Price from the Standard Price Book)
-IsActive: TRUE

Step 3e - INSERT into "Price Book Entry" Table
MAKE SURE your Custom Price Books are Active in SFDC.

1. Open Data Loader
2. Insert to "Price Book Entry" table
3. Save success and error files in a folder for this project

Step 3f (optional)
INACTIVATE Standard Products in Standard Price Book

1. Take the success files the Standard Price Book Entry insert from step 3c
2. Change the values in "IsActive" from true to FALSE
3. Map only the "Product2ID" and "IsActive" fields
4. Open AppExchange Data Loader
5. UPDATE "Price Book Entry" Table
6. Save success and error files in a folder for this project

_______________________________________________________________________________________________
How do I load Opportunity Line Items via the Data Loader?

Step 4 (optional)
INSERT products into "OpportunitiesLineItem" Table

1. Data Columns:
-Opportunity ID
-PricebookEntryID
-Total Price
-Quantity
-Unit price
-other fields as needed
NOTE: The Opportunity Product Table provides the "ProductID" as a mappable field, however this field should not be mapped in this process.

1. Export the Opportunity Product (OpportunityLineItem) table for a template
2. Export the appropriate Opportunities from the data loader with filter criteria.
3. Copy OpportunityID into the insert/update template file.
4. Export the "Price Book Entry" table from the data loader, the "ID" column is the PricebookEntryID.
5. Copy the appropriate PricebookEntryID's (with corresponding Opportunities) into the insert/update file.
6. Add the other data into the relevant columns in the insert/update file.
7. Open AppExchange Data Loader.
8. Insert to "Opportunity Product (OpportunityLineItem)" table 

 

Thanks,

Sales4ce

NPNP

U will have to do VLOOKUP and then find the ID and then upload the data. 

 

 

TrickTrick

Thank You guys for giving me so much information 

 

Can u please tell me what does Vlookup mean?

 

Thanks,

Trick

TrickTrick

Thanks a lot sales4ce that worked.

 

 

I tried and it's working.I was able to upload 2 custom book entries and 2 failed I do not know the reason I have another problem.I have 10 custom books and I just want to move 4 customs books to another instance.When I export data from the instance to Excel sheet i am getting more than 40 ,0000 records. I do not want so many records to be expoerted.Is there a way to export data directly listed under the 4 custom books. If u know about please help me

 

Thanks,

Trick 

WizradWizrad

In your data loader SOQL query adjust it to say:

 

WHERE Name = 'Name1' OR Name = 'Name2' OR Name= 'Name3' OR Name='Name4'