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
moverdorfmoverdorf 

Lookup / Formual for commission rates

I need to pull a commission percentage from another custom object for every sale.  The problem is the commission %'s are different for every product and are tiered based on the sale amount.  For example, a sale of product X gets a 5% commission if the sale amount is less than 1,000, 7% if greater than 1,000 but less than 5,000 and 9% if greater than 5,000.  The percentages and tiers can be completely different for a different product.  I currently have a custom object set up to track all the tiers and %'s for each product.  How do I pull the correct % into commission calculation for each of my product sales?

 

apex whistlerapex whistler

Not possible to accomplish what you are asking via formula without hardcoding the commission rates into the formula. Next best option is to use custom button with javascript (especially if the commission is tracked at each opportunity line item) or triggers.

Jeremy_nJeremy_n

This could definitely be done with an Apex trigger. Basically it sounds like it will require querying of your custom object and assigning a value back into your Opportunity Product.

 

I guess it's possible that you might be able to do it with a formula, but it would depend on how Product, Pricebookentry and your commission rate object are related. Does the rate object connect to Pricebookentry?

 

Jeremy