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
john8407john8407 

Product management

Our products can be different prices depending on the location of the customer.  The way we do this now is for one product available in 40 places, we load that product 40 times with a field on the product showing where its for.  I want to cut down on the products if possible.  Our pricing tool is customized visualforce and filters off the field on the product that says where its for.  Is it possible to have a class call all products in a price book? Im thinking of creating 40 price books for 1 product. 

ReidCReidC

So, right now you have 40 instances of 1 product all connected to a single pricebook, correct?

 

So if you have 5 physical products, you create 200 entries in salesforce all contected to a single pricebook?

 

Pivoting that so that you have mutiple pricebooks instead of a multiple products is a good idea, that's exactly what pricebooks are for.  With the example above, you would then have 5 products and 40 pricebooks.

 

Accessing those via Apex / VF is no big deal.

 

HTH

john8407john8407

Thanks for the reply ReidC.  Well not 40, I just used that as an example.  We actaully have more like 800 products with each available in about 8,000 different areas so we have a total of around 6,000,000 products loaded in the Product2 table.  We need a better way to manage this so I'm trying to find ideas and thoughts.

ReidCReidC

Interesting.  Are all 800 products always available in all 8000 locations?  Are the prices always different for a given product within each of the 8000 locations?  (meaning a product would always have 8000 different prices)

john8407john8407

No, the 800 products are not always available in all locations.  Some are and some are not.  It kind of depends on the product if the price is different.  Some products will have the same price across all locations, but some will have different prices in some locations, that is why we load each product for each location.  Also, I dont think a product would ever have 8000 prices, If a product is priced different, it would be maybe 1000 (max) different prices across those 8000 locations.