webERP Forum

Full Version: Sales Commission system
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As mentioned in another thread I have been employed to produce a comprehensive sales person commission system for a company in Germany to replace the existing functionality which is somewhere between minimal and not existing.

I have written a first draft specification here:

I would be happy to bring this into webERP (even though one of the admins still thinks it's funny to spread lies about me and refuses to allow me the write to reply) if there is sufficient interest. Also if anybody has any suggestions/comments on this specification please feel free to share them.

Sounds good ... :-)
I wrote a report to manage commissions based upon the existing commission table.

The problem with commission is that it varies drastically depending upon context.
(05-05-2018 10:30 PM)VortecCPI Wrote: [ -> ]The problem with commission is that it varies drastically depending upon context.

I agree Paul, I am trying to make my system as flexible as possible to cover as many scenarios as possible whilst still fulfilling my customers specifications. It should also be easily improved upon to cover other scenarios by others as they need it. However I am aware it will never do everything that everybody wants.

I have nearly completed the code, and details in the spec have changed as I write the code so I will update the wiki when I get a moment.

I would be interested in any comments or suggestions you have,


Here is how ours works: Salesman gets 10% if customer has been on board for less than 12 months. After that period salesman gets 2%.

Hopefully this fits in your solution...

Yes tricky to please all comers with this. Commission based on GPmakessome sense rather than sales.
Also tiered commission rates, different rates for different areas or specificcustomers can easily become complex
Ok, while sitting in the garden over the bank holiday weekend enjoying the record breaking temperatures I have been thinking about this. What I have done is to move the CalculateCommission() function to it's own includes/CommissionCalculations.php file, and then moved the logic of the calculation to separate functions, so CalculateCommission() for the stock category specific commission as per my customers spec now becomes just calls to these functions. I have written a function as well doing the commission on length of time customer has been buying (as per Paul's post) and anybody can easily write their own functions as per their needs and simply call them from the CalculateCommission() function.

This modular approach makes it infinitely flexible with just a small amount of programming.

I spoke with one of my customers using ECi M1 ERP and they said commission is so complicated it can only be done externally. ECi M1 ERP is used as the input data but all work to compute output data is done in Excel Workbooks.

I really like the idea of having functions in a separate module.
We have this functionality running on our customers test environment. I have updated the wiki specifications with the changes we have done as per above, and also included some screenshots of the functionality working.

Reference URL's