You need to sign in to do that
Don't have an account?
jack-cepheid
Discount Formula
I’m trying to build out some formula based fields and I’m unable to do a certain function no matter what I try. What I want to do is build a formula that will calculate discounts based on the Total quantity of products that are in an opportunity. Now there is a standard Total Opportunity Quantity field but it does not give me the calculation that I need. I need the calculation to look at the Quantity of the part number in the opportunity and multiply that by a custom field in the Product record that says how many items are in that part number. This calculation would need to be duplicated for each product (limited by a certain group of product families of course) and the total either returned to a custom field as number or just used in the formula to figure a discount. An example would be…In the Product setup. Part number M-120 has a custom field that says that part number contains 120 items Part number G-10 has a custom field that says that part number contains 10 items Both are assigned to the same product familyIn the OpportunityCustomer XYZ Is ordering 3 of part number M-120 And 5 of part number G-10 (the standard SFDC field would say the opportunity quantity is 8) I want a formula to be able to see that 3 of part number M-120 =360 itemsAnd that 5 of part number G-10 = 50 items So the total number of items for that product family is 410 The discount would just be a greater/less than calculation that would say that the quantity is eligible for a 3% discount. Please let me know if there is a way to make that formula… Again I can do this for individual products right now but I need to do it one level higher at the opportunity level.
Since I'm not that good with writing code yet (just learning now) I found a temporary workaround that is functional.
I have a manual entry field in each product that would by "Product volume". On that field I put a validation rule that says that the value in "Product volume" must equal Part number X items in part number (or what my formula would have been in the first place)
That allowed me to use the Roll Up Summary field for the Opportunity to determine my discounts.
Thanks for your help
All Answers
Sorry i copied it from an email i had sent and assumed the format stayed.
Try this one...
I’m trying to build out some formula based fields and I’m unable to do a certain function no matter what I try. What I want to do is build a formula that will calculate discounts based on the Total quantity of products that are in an opportunity. Now there is a standard Total Opportunity Quantity field but it does not give me the calculation that I need. I need the calculation to look at the Quantity of the part number in the opportunity and multiply that by a custom field in the Product record that says how many items are in that part number. This calculation would need to be duplicated for each product (limited by a certain group of product families of course) and the total either returned to a custom field as number or just used in the formula to figure a discount.
An example would be…
In the Product setup. Part number mrsa-120 has a custom field that says that part number contains 120 items
Part number GBS-10 has a custom field that says that part number contains 10 items
Both are assigned to the same product family
In the Opportunity
Customer XYZ
Is ordering 3 of part number M-120
And 5 of part number G-10 (the standard SFDC field would say the opportunity quantity is 8)
I want a formula to be able to see that 3 of part number M-120 =360 items
And that 5 of part number G-10 = 50 items
So the total number of items for that product family is 410
The discount would just be a greater/less than calculation that would say that the quantity is eligible for a 3% discount.
Please let me know if there is a way to make that formula…
Again I can do this for individual products right now but I need to do it one level higher at the opportunity level.
Try this. From the line item, you can get to the product info by using this syntax PricebookEntry.Product2.Your_Field__c
Then sum up the formula fields on the line items using a roll-up summary field.
I see what you mean but it didn't work.
the Roll up summary would not show my formula field in the options.
Since I'm not that good with writing code yet (just learning now) I found a temporary workaround that is functional.
I have a manual entry field in each product that would by "Product volume". On that field I put a validation rule that says that the value in "Product volume" must equal Part number X items in part number (or what my formula would have been in the first place)
That allowed me to use the Roll Up Summary field for the Opportunity to determine my discounts.
Thanks for your help