Wednesday, December 14, 2022

Products, Pricebooks & Pricebook Entries in Salesforce

Image result for products and pricebooks in salesforce

Enter a caption

Define your Product:
A Product is a service or item that the company sells to the customers. Once you have added the Products, you can set the price of the product per unit based on your business. In Salesforce, Product is a Standard object having standard fields and tabs. You can add your custom fields to customize Product object as per your business requirement. Products can be added to the Opportunity allowing you to have an correct inventory and also make your forecasting accurate.

What is Price Book:
The Price Book will provide the list of products and their prices per unit. You can create multiple price books to maintain different prices for the same product based on your business needs. Salesforce will always provide your a Standard Price Book. The moment you add a Product into Salesforce and set the price of the Product, that Product will go into Standard Price Book. But you can create Custom Price Book as well.
Important Notes on Creating Products:

  • Permission needed to create Products are “read” and “create” permission on Product object.
  • You can create Products by cloning an existing Product. But if you don’t have sharing access in any of the Price Books, then entries for that Price Book and Product combination will not be created. Similarly if you have read-only access on any fields, value of that field will not be carried over to the cloned record.
  • It is recommended to not have more than 2,000,000 products otherwise it may impact the performance.
  • Products always needs an active Price Book so that you can add the product to that Price Book.
  • Product object is having a standard field – Product Currency. This field holds the currency of the product. In a multi currency organization, if the product currency is different from user’s currency, then product currency will be converted into user’s currency and both the values will be displayed. (Converted amount will be displayed in parentheses).

Sharing Price Books:

  • Admin or user with with “Edit” permission on Price Book can share the same with more users, groups, roles and territories.
  • You can’t make it more restrictive.
  • Sharing option will only be available when the OWD of Price Book is either “No Access” or “View Only”.

Want to remove Price Books? Need to know below points –

  • You can delete, deactivate or archive Custom Price Books. It is having no impact on other Custom Price Books. These action will impact Opportunity and Quotes.
  • You need to change association with Opportunity or Quotes before removing an associated Price Book.
  • For Standard Price Book, you can deactivate the same, but can’t delete or achieve it.
  • You can’t delete a Price Book while it’s in use on Opportunities or Quotes. Trying to do the same will create a list of Opportunities or Quotes where the Price Book is being used.
  • You can deactivate a Price Book while it is being used in Opportunities or Quotes. Managing Entries is also possible for deactivated Price Books and you can re-activate the same as well.
  • You can archive a Price Book even if it being used in Opportunities or Quotes. Archived or Deleted Price Books can’t be recovered.

Want to remove Products from Price Books?

  • You can remove Products from a Price Book as long as that Price Book + Product combination is not being used in any existing Opportunity or Quotes. Removing Products from a Price Book will not impact other Price Books where the same Products are listed as well.
  • If a Product + Price Book combination is being used in any of the existing Opportunity or Quotes and you want to remove the Product from that Price Book, you have three options, which is explained here –

Important Note – While associating Products with an Opportunity, you need to select the Price Book first. An Opportunity can have Products only from one Price Book.

Relationship between Product, Price Book and PricebookEntry

Basic:

  • Products are represented by Standard Object – Product2.
  • PriceBooks are represented by Standard Object – Pricebook2
  • Each Pricebook can have zero or more entries. Each of these entries are stored inside the Standard Object – PricebookEntry. Each entry in PricebookEntry defines the cost of the products in a particular currency.
  • These three objects – Product2Pricebook2 and PricebookEntry will only be available if Product is enabled in the organization.

Data Model:

  • PricebookEntry is the junction object between Product and Price Book.
  • OpportunityLineItem is the junction object between Opportunity and PricebookEntry.

Below is the flow diagram depicting the process to load Products and setup PriceBook through API.

No comments:

Post a Comment

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC)

Understanding Wire vs Imperative Apex Method Calls in Salesforce Lightning Web Components (LWC) Introduction: Salesforce Lightning Web ...