How to calculate commission based on the contribution percentage in saved search

Create a Transaction saved search With types Invoice and credit memo.

Add contribution% in results and other necessary data

The formula of the Commission is when the contribution is greater than 25% and less than 50%.

Round to Hundredths

CASE WHEN Round({contribution},2)>= 0.25 AND Round({contribution},2)< 0.50 THEN ((NVL({amount},0)-NVL({quantity}{custcol_aha_sales_invoice_cost},0)+NVL({quantity}{custcol_nsts_rm_purchase_rebate},0))((NVL({amount},0)-NVL({quantity}{custcol_aha_sales_invoice_cost},0)+NVL({quantity}{custcol_nsts_rm_purchase_rebate},0))/NULLIF(NVL({amount},0),0)))(25/100) ELSE 0 END

The formula of Commission when the contribution is greater than 50%.

Round to Hundreadths

CASE WHEN Round ({contribution},3)>= 0.50 THEN ((NVL({amount},0)-NVL({quantity}{custcol_aha_sales_invoice_cost},0)+NVL({quantity}{custcol_nsts_rm_purchase_rebate},0))((NVL({amount},0)-NVL({quantity}{custcol_aha_sales_invoice_cost},0)+NVL({quantity}{custcol_nsts_rm_purchase_rebate},0))/NULLIF(NVL({amount},0),0))) {contribution} ELSE 0 END

Leave a comment

Your email address will not be published. Required fields are marked *