Skip to main content
Hi Team ,

 

I have got a business requirement on our CPQ build to implement related to  price book + quote.

 

The current Beta (Proof of concept ) has implemented as per bellow way and it is working as expected.

 

Current Setup

 

Our setup is basically catering for service oriented products and around 250,000 + active products available in our organization and potential to grow beyond 1 million over the time.  Currently we have around 1 million active rates (price book entries) defined in the system. This will exponentially grow as we increase products.

 

We have multiple price books setup. The Standard Price Book ( Standard Rate Card)  and Custom Price Books (Client Rate Card)are in use. For Customer Specific rate defined Sales Account we tag Custom rate card at the account  , opportunity and eventually it derives to quote as well.

 

We have Salesforce CPQ setup with Advanced Approval which advanced approval will governed  the Quote Status based on the workflow.

 

We have contract basis renewal and amendment process configured.

 

Requirement(s)

 

 

  1. Req 1- Operation Team (who update the price on price book entries) , should able to get a report on how prices of a certain product has changed over the period.
  2. Req 2.a - Once Rates updated in price books (user will update the price entries rate) it should be notified to Sales (users who work on quotes) , that rates has changed , refresh the rate prior to proceeding further. This is only for inflight quotes.
  3. Req 2.b -The quotes can be copied as clone with related . created due to amendment or renewal or by creating net new quote at opportunity.  These quotes also should be behave as above.

 

The Implementation

 

 

  1. As price book entry is a junction object and support limited capabilities on automations (process builder / flows / work flow ) and apex triggers . I have created a Apex Batch class which runs on every 5 mins (chaining the batch apex using the final method once completed scheduled a Cron job to execute completed time + 5 mins) to replicate (upsert) the data into another object ( Price Book Entry Snapshot. This object has same field configuration and price book entry object.

 

The concurrency has handled to avoid running multiple apex jobs as the same time.

 

 

  1. Also above mentioned Cron job insert data to another object which maintain the historical revision of the price book entry, which will use  to create a historical report (filters are applied to make sure users are getting only entries needed. Such as Price Book , Period on last modified date) ( satisfy Req 1)

 

  1. Then I have added custom field (Price Book Entry Rate)  to quote line which is type of currency(16,2) to capture latest price book entry rate for product tagged in quote line.
  2. A price rule has configured to look up Price Book Entry Snapshot (The object which get current snap shot of price book entry) , The rule will look up the SBQQ__PricebookEntryId__c and Key field of Snapshot ( Source Price Book Entry Id) and populate the Price Book Entry Rate ( custom field ).
  3. Then I have created Check Box Formula field (Initiate Price Refresh)  which will check Price Book Entry Rate (Vir_Eag_Price_Book_Entry_Rate__c) and Quote Line Net Price Field (SBQQ__NetPrice__c) if there is a mismatch this will set to true.
  4. At the quote level , I have created roll up summery field (Refresh Price Roll Up) which will get the count of quote lines which make  “Initiate Price Refresh” field to true.
  5. A Product Rule has created , by checking Refresh Price Roll Up field , if it is greater than 1 , then a Validation will pop up asking users to refresh the prices and revisit.

 

Challenges (Support Needed)

 

 

  1. Need your input on the approach  is it ok to proceed with this , if you have used another work around to resolve the same problem , what will be it.
  2. Need to figure out a way to bring Refresh Price Button as a custom Action to Quote Line Editor (QLE) , as it is better if user can refresh the prices at the Quote Line Editor. Otherwise user has to reenter changes upon price refresh.
1 respuesta
0/9000