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
CobbUserCobbUser 

Uploading Company Price Book into SF.com

I am looking for any help/feedback on mass uploading an existing company price book (in .xls form for example) into SF.com. Our company has 3200 active products that are updated every 2 weeks and need to know if there is an easy way to automate uploading a price book. If this cannot be done then we have no use for SF.com.

I have been told this can be done, has anyone actually accomplished this? Are there any samples we can look at to get a better understanding of how this has been done?

Thanks for your input!

Regards,

Jason
ScotScot

Jason,

Yes, this can be done. My experience is that it is not simple ... but it is much better than applying the changes manually through the UI.

I am using the Excel Connector to maintain our product lists. We have roughly 800 products, but due to different currencies, specification of both license, maintenance and rental "products" for each real-world product,  and several different pricing methods, we have more than 6,000 pricebook entries.

Hopefully you will not have those complexities, but you will need to deal with three inter-related tables, product2, pricebookentry, and pricebook2.


Some hints:

When adding a product, you need to:
   1) Add it into the product2 table
   2) Add a pricebookentry into the standard price book
   3) If you have custom price books (we need them both for pricing models and currencies), then
         add a pricebookentry into each of the custom price books appropriate for the product

When adding pricebookentries
    ProductCode and Name are read-only and should be ignored for creating/updating.

    For entries in the standard price book:
          > UseStandardPrice is set to FALSE. (This must be TRUE according to the documentation, but from my experience, this documentation is wrong)
          > The  price, which will become the standard price, should be specified.

    For entries in the custom price books,
          > UseStandardPrice is determines whether the standard price, or a custom price, is used. If it's TRUE, then you should not specify a price.

The relationships are

      PricebookEntries are keyed on their own PricebookEntryId
          Pricebook2Id, in them, points to the pricebook
          Product2Id, in them, points to the product
          UnitPrice, in it, may be calculated or not.
             If the Pricebook2Id points to the standard price book, then it is specified, and is standard,
             else if UseStandardPrice is FALSE, then it is specified, and is the special price,
             else if UseStandardPrice is TRUE, then it is calculated by lookup iwth the Product2Id and
                the key of the standard price book.


Repetitive Importing
I found it pretty difficult to repetively import the products and prices from an external spread-sheet because:
    > The salesforce records are keyed on their own unique keys, which are not reflected in my sources
    > There are multiple pricebookentry records for each product
    > To maintain links in opportunity line items, I can't delete and re-import products or pricebook entries each time.

My solution is implemented in a horribly complicated Excel sheet. The basic approach is to

    1) Build a new set of pricebook entries, using information from external price sheets, which is "keyed" on logical values, rather than salesforce.com ids. In my case, this is a combination of detailed product code, pricebook and currency.

    2) extract all the existing pricebook entries into a second sheet

    3) join the information, matching on the logical keys

    4) compare stored and target values, indentifying lines which need inserting/updating 

    5) sort by those expressions, and use the Excel Connector to perform the updates.

The building of pricebook entries (1) is done with calculations and some macros which duplicate multiple entries for each product. For example, a simple product will have 9 entries: 
    Three for each price book, to support three currencies, and
    Three price books (Standard and two custom)

The extract is done using a Connector Query Table Data.

The join is done using a calculated common key value in both tables (concatenating together the values for the product code, currency, and pricebook) and VLOOKUP functions. This is not elegant, but it works .. albeit slowly.

The compare is calculations in the joined Excel table, with some conditional formatting to make things obvious during a review, and

The updating is done with the Connector Update Cells function.

CobbUserCobbUser
Scot,

Thanks for your input. While we don't have to deal with multiple currencies, i had a feeling this type of feature would not be a "walk in the park" to implement. Just time consuming...

But do-able

Thanks again!

Jason
David JDavid J
Can someone help me. 
 
I have a product and price book of 60 items from a Stock manufacturing plant that has three different prices for Bags, Bulk and Bulk Bags and I wanted to import the prices into Salesforce.  I have manually loaded the product and price book into SF.
 
I have tried to utilise apex Data loader however it seems to be collecting data from SF and the excel file and making another external excel report and not importing.  I have used the update command in the apex loader however it has not worked for me.  
 
The prices file is on a csv format in excel and I wanted to import the prices (only into SF). What is the best method of importing prices.
 
I have the following headings and prices.
 
 Product Name      20 Kg Bag   Bulk Bag    Bulk     Product description
Top Intro 0 2.5%   $100            $101           $102    Urea and Salt 0% Urea 2.5% Phos 1% Sulphur 1.4% Calcium 4% Protein 38%
Top Intro 10 2.5% Urea $101   $102           $103    Salt 10% Urea 2.5% Phos 1% Sulphur 1.4% Calcium 4% Protein 37%
 
 
Yours David Johnston