Within the Quote Calculation Sequence, do lines calculate like:
A.
- QL 1: Before Calculate
- QL 2 Before Calculate
- QL 1: On Calculate
- QL 2 On Calculate
OR
B.
1. QL 1 Before Calculate
2. QL 1 On Calculate
3. QL 2 Before Calculate
4. QL 2 On Calculate
I am hoping A is correct; however, the below issue I am having seems like it is B.
Given this bundle structure:
- Bundle Header
- Service
- Fee
Fee Pricing should be based on the Service Quantity.
I have this configured and working; however, it requires two calculations to be accurate.
- QCP: onBeforePriceRules:
- var parent = line.parentItem;
- if (parent != null && line.record.Product_Type__c == 'Service' && (line.record.SBQQ__SegmentIndex__c == null || line.record.SBQQ__SegmentIndex__c == "1")){
- parent.record["Year_1_Service_Quantity__c"] = line.Quantity__c;
- Price Rule: Before Calculate
- Quote Line: Setup_Fee_Pricing_Quantity__c = SBQQ__RequiredBy__r.Year_1_Service_Quantity__c
- Price Rule: On Calculate
- Lookup Query to custom pricing table using Parent_Service_Quantity__c
4 risposte
Your QCP can query the other children directly. Price Rules cannot. For any questions about how things fire/in what order, I’d refer you to this documentation:
https://help.salesforce.com/apex/HTViewHelpDoc?id=sf.cpq_quote_calc_process.htm&language=en_US