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
Tejender Mohan 9Tejender Mohan 9 

How to use Quote Calculator Plugin on Salesforce SteelBrick CPQ?

I want use the Custom Quote Calculator Plugin on Salesforce SteelBrick CPQ.
I have gone through many posts/Forum What I have understood is that this can be done using APEX or javascript code which have the methods like onInit,onBeforeCalculate etc as per the need.
But I am not able to understand how to use the custom Apex or javascript code? Where should I put it?
I have tried putting a JS code on static resource and tried to put the name of static resource on 'Quote Calculator Plugin' box on settings but it was not able to access it.
Assertion Failed: A Quote Calculator Plugin called OnInitTest is defined in your settings, but cannot be found.
I can not find the way of using these custom JS or APEX on SteelBrick CPQ setting.
How can I use my custom code for "Quote Calculator Plugin" ?
NagendraNagendra (Salesforce Developers) 
Hi Tejendar,

Go to Setup -> Installed Packages. Search for Salesforce CPQ. Click "Configure". You will be shown: Settings Editor Salesforce CPQ. Now click "Plugins" tab.

In plugin settings page: 1. For Apex: Legacy Quote Calculator Plugin 2. For JavaScript: Quote Calculator Plugin.

Hope this helps.

Please mark this as solved if it's resolved so that it gets removed from the unanswered queue so that it results in helping others who are encountering a similar issue.

Smriti kadianSmriti kadian

Hi Tejendar,

SteelBrick has "Custom Script" custom object where you can specify your javascript code.
Link that custom script to the Quote Calculator Plugin in Setup -> Installed Packages -> Configure -> Plugins -> Quote Calculator Plugin.


Also make sure that you have Authorized new Calculation Service under Pricing and Calculation.

Please mark this as solved if it's resolved.