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
Phillip Moseley 2Phillip Moseley 2 

Help with Updating Existing Formula

I have an existing formula field that I'm trying to update to also include a product field that if checked True, then exclude it from the Total Services Discount. 

The new field on the product object is called Exclude from Services Discount. I need to add this field to the formula below that if checked True, it will exclude the product from the Total Service Discount Formula. 
IF (SBQQ__PrimaryQuote__r.Discount_ServicesPercent__c > 0.00,SBQQ__PrimaryQuote__r.Discount_ServicesPercent__c,
IF (Total_Services_Net_Value_Sum_Rollup__c > 0.00 && Total_Service_List_Price_SUM_Rollup__c> 0.00,1-(Total_Services_Net_Value_Sum_Rollup__c / Total_Service_List_Price_SUM_Rollup__c), SBQQ__PrimaryQuote__r.Discount_ServicesPercent__c))

Any help or suggestions would be appreciated.

Thanks,

 

VaibhavSethVaibhavSeth

Hi Philip

To achieve the behavior you described, where the product should be excluded from the Total Services Discount if the "Exclude from Services Discount" field is checked, you can modify the formula as follows:

IF (
    SBQQ__PrimaryQuote__r.Discount_ServicesPercent__c > 0.00,
    SBQQ__PrimaryQuote__r.Discount_ServicesPercent__c,
    IF (
        Exclude_from_Services_Discount__c,  // Assuming the field name is 'Exclude_from_Services_Discount__c'
        0,  // If excluded, no discount
        IF (
            Total_Services_Net_Value_Sum_Rollup__c > 0.00 && Total_Service_List_Price_SUM_Rollup__c > 0.00,
            1 - (Total_Services_Net_Value_Sum_Rollup__c / Total_Service_List_Price_SUM_Rollup__c),
            SBQQ__PrimaryQuote__r.Discount_ServicesPercent__c
        )
    )
)

If this information helps, please mark the answer as best.
Thank you