What type of field is Component Custom Total? I tried replicating the same on my local org following the same steps from the video but my Component Custom Total field on Quote Line editor is not populated.
This field must be override by CPQ's own calculation. Instead of this field use any other custom field just to verify that if QCP populating it correctly or not
Hi Team, Need some inputs on the below items regarding the QCP plugin , where my requirements is to make callout to third party System to fetch the pricing details 1) If we use the REST callout in QCP plugin , will the callout happens everytime when any one of the field is changed on QL in QLE or else only when we click on Save or Quick Save in Quote Line editor 2)If we specify one of the field in the calculating field set lets say Discount , if the discount field is changed in one of the quote line outside of QLE, then the QCP plugin will fire right ?
1. Yes this will be fired on save/calculate button event. 2. If you add any field lets say discount as you mentioned into calculated field set on product then also it will fire
@@SalesforceCPQ Thanks , and for the point 2 , if we modify the QL in QLE , lets say if we change the discount for first Quote line , then QCP will be fired and after successful callout , then if I change 2nd QL's discount again the REST callout will be fired , is my understanding correct ? Can you please help me in giving few of the drawbacks why we should not QCP plugin (where REST callout is implemented) Thanks for your help ..
@@SalesforceCPQ And another additional question , is the callout synchronous or asynchronous, I can see in the SF documentation that if we use promise then it will be async, I think we should use promise in the QCP .. developer.salesforce.com/docs/atlas.en-us.222.0.cpq_dev_plugins.meta/cpq_dev_plugins/cpq_dev_jsqcp_guidelines.htm So if we use this, the prices will not be loaded in real time ..
Discount field is already part of recalculation. So if you change the discount then recalculation happened automatically. Yes you can use QCP to fetch record from custom object and update to discount field
@@SalesforceCPQ I'm updating discount on quote line on a before insert trigger and it does not work. The field is added in the field set. Am I making any mistake here?
@@nipunkalal I never suggest to use trigger for quote line object, it always conflict with quote calculation. Modification to pricing related field using process builder or trigger is not recommended. Use price rules / QCP
@@SalesforceCPQ The field that is retriggering the calculation is on custom object. Can I still use QCP here? If the field on the custom object is changed then the discount on QLIs should also change.
@@SalesforceCPQ Thanks , can you please provide sample code , as i am unable to achieve , but i am able to call the REST Class. Thanks !! Below is the link which i am able to achieve salesforce.stackexchange.com/questions/273624/integrating-salesforce-cpq-with-sap-to-get-realtime-pricing-data
@@SalesforceCPQ Thanks , yes i am able to call the class .But i need similar code where i can call webservice method from Customscript. global class test { webservice static void getData(){ // some sample code } } In this example , i dont have the rest class annotated , but i want to call the class from custom script , what will be the syntax in custom script . Do you have any sample code which you help me .. Thanks !!
This video is very helpful!! Is there a way to add multiple logics for different scenarios as we can have only one custom script in an Org?
you can add multiple functions and invoke them as per need in QCP logic
good video man
Sound is low? But the video details are good and a nice explanation discussing plugins.
How to add a product automatically in quote whenever we select another product by JavaScript code
Use Salesforce CPQ APIs, call rest method from QCP to achieve this
What type of field is Component Custom Total? I tried replicating the same on my local org following the same steps from the video but my Component Custom Total field on Quote Line editor is not populated.
This field must be override by CPQ's own calculation. Instead of this field use any other custom field just to verify that if QCP populating it correctly or not
Hi Team,
Need some inputs on the below items regarding the QCP plugin , where my requirements is to make callout to third party System to fetch the pricing details
1) If we use the REST callout in QCP plugin , will the callout happens everytime when any one of the field is changed on QL in QLE or else only when we click on Save or Quick Save in Quote Line editor
2)If we specify one of the field in the calculating field set lets say Discount , if the discount field is changed in one of the quote line outside of QLE, then the QCP plugin will fire right ?
1. Yes this will be fired on save/calculate button event.
2. If you add any field lets say discount as you mentioned into calculated field set on product then also it will fire
@@SalesforceCPQ Thanks , and for the point 2 , if we modify the QL in QLE , lets say if we change the discount for first Quote line , then QCP will be fired and after successful callout , then if I change 2nd QL's discount again the REST callout will be fired , is my understanding correct ?
Can you please help me in giving few of the drawbacks why we should not QCP plugin (where REST callout is implemented)
Thanks for your help ..
@@SalesforceCPQ And another additional question , is the callout synchronous or asynchronous, I can see in the SF documentation that if we use promise then it will be async, I think we should use promise in the QCP ..
developer.salesforce.com/docs/atlas.en-us.222.0.cpq_dev_plugins.meta/cpq_dev_plugins/cpq_dev_jsqcp_guidelines.htm
So if we use this, the prices will not be loaded in real time ..
@@kunkans4546 Through QLE it will not, Out of QLE field change will trigger calculation event.
@@SalesforceCPQ Your inputs are highly appreciated . What about Synchronous vs Asynchronous ??
I want to apply for a discount on quoteline if a field on a custom object changes it should trigger the recalculation. Can I do it using QCP?
Discount field is already part of recalculation. So if you change the discount then recalculation happened automatically. Yes you can use QCP to fetch record from custom object and update to discount field
@@SalesforceCPQ I'm updating discount on quote line on a before insert trigger and it does not work. The field is added in the field set. Am I making any mistake here?
@@nipunkalal I never suggest to use trigger for quote line object, it always conflict with quote calculation. Modification to pricing related field using process builder or trigger is not recommended. Use price rules / QCP
@@SalesforceCPQ The field that is retriggering the calculation is on custom object. Can I still use QCP here?
If the field on the custom object is changed then the discount on QLIs should also change.
is it possible Quoteline bundle product field compare with Quote field value using custom script while save the quote and through an error msg
Yes
@@SalesforceCPQ Could you please help me with some sample code,?
@@brahmareddy7048 I tried but access denied for code repo :)
Can we restrict access to users in qcp plugin.
Refer Page Security Plugin
Hi Team, Can you please let me know if we can call an apex class(other than rest service )from the CustomScript code which is written in JS ,
Yes you can call it from JS code.
@@SalesforceCPQ Thanks , can you please provide sample code , as i am unable to achieve , but i am able to call the REST Class. Thanks !!
Below is the link which i am able to achieve
salesforce.stackexchange.com/questions/273624/integrating-salesforce-cpq-with-sap-to-get-realtime-pricing-data
@@sanils6738 Yes, this is correct, have you annotated your apex class with this header @RestResource(UrlMapping='/restName/*')?
@@SalesforceCPQ Thanks , yes i am able to call the class .But i need similar code where i can call webservice method from Customscript.
global class test {
webservice static void getData(){
// some sample code
}
}
In this example , i dont have the rest class annotated , but i want to call the class from custom script , what will be the syntax in custom script . Do you have any sample code which you help me .. Thanks !!
Try this code as well,
var body = { quoteId: quoteId};
conn.apex.post("/APEXCLASSNAME/", body, function(err, res) {
console.log('res' + res);
if (err) {
console.log('error' + err);
} else {
if(res != "true") {
return reject(res);
}
}
return resolve();
Can we update lookup field in qcp plugin
Yes, we can
@@SalesforceCPQ please send me code snippet
Hernandez Brian Thompson Kimberly Harris Ruth
Martin Steven Anderson James Williams Scott
Smith Shirley Hernandez Angela Walker William
Young Linda Hernandez Daniel White Helen