473,804 Members | 3,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tiered Commission Calculation

Hello

I am developing a database to calculate commissions on a sale for each
rep involved in the same and their uplines.

Below is the database structure and the commissions schedule. I am
having trouble designing a way to store the commission rates and
calculate the commission amounts. Below is a list of the business
rules for calculating the commisssions.

1) each sale will have only 1 or 2 reps involved with the sale
2) each sale will have only 1 sale orginator (flag in tblOrderRep)
3) each rep involved with the sale will receive a commission on the
sale based on the commission matrix below
4) the uplines of the rep that is flagged as the sale originator will
receive a commission on the sale based on the matrix below

For example:
- Roger & Matt completed a sale together.
- Roger & Matt are both Tier 2 reps.
- Roger was the sale originator
- Allen is Roger's upline
- Roger & Matt will split the 8% commission for the tier 2 reps and
Allen will receive 6% commission on the sale.

DB Structure:
tblOrder
salesOrderID
salesAmount
customerName

tblOrderRep
salesOrderID
repID
flagSaleInitiat or

tblRep
repID
repName
tier
upline

Commission Matrix
Tier 1 Tier 2 Tier
3 Tier 4
Reps that Made the sale Commission Commission
Commission Commission
Sales Rep in Tier 1 10%
2 Sales Reps in Tier 1 5% each
Sales Reps in Tier 1 & 2 10% 4%
Sales Rep in Tier 2 6% 8%
2 Sales Reps in Tier 2 6% 4% each
Sales Reps in Tier 2 & 3 4%
8% 4%
Sales Rep in Tier 3 3%
4% 8%
2 Sales Reps in Tier 3 3%
4% 4% each
Sales Reps in Tier 1 & 3 10%
2% 4%
Sales Rep in Tier 4 2%
3% 4% 8%
2 Sales Reps in Tier 4 2%
3% 4% 4% each
Sales Reps in Tier 1 & 4 10%
2% 1% 4%
Sales Reps in Tier 2 & 4 3%
4% 2% 4%
Sales Reps in Tier 3 & 4 3%
2% 3% 4%

Thank you in advance for your time and advice
Matt
Oct 18 '08
12 4932
On Oct 19, 11:35*am, "KC-Mass" <connearneyATco mcastDOTnetwrot e:
Hi Matt

Just two questions if I could:

1. *In your matrix where there are two reps, the one in the lower
(numerically) tier
(1 vs 3) seems always to get a full commission and the one in the higher
tier
(3 in the above example) always gets a half commission. *Does that assume
that the one in the lower tier is the originator or do commission rates
depend
soley on relative tier level of the participating reps?

2. On row 8 of your matrix, the single rep will receive 8%. *What do the
3% and 4% in columns B and C represent - who are they applied to?
If its the upline what happens in row 10?

I do think if you get the structure right you can establish commissions with
a query.

Kevin

"Tom van Stiphout" <tom7744.no.s.. .@cox.netwrote in messagenews:bp* *************** *************** *@4ax.com...
On Sat, 18 Oct 2008 16:42:54 -0700 (PDT), spima05
<mspilot...@gma il.comwrote:
Ha, you left that gem for last, right :-)
I think the data structure doesn't matter as much as I first thought:
you'll have to write some VBA with recordsets to figure this out.
Access doesn't do recursive queries (unlike SQL Server).
You probably know you can call a VBA function from a query.
If performance is a concern, I might use a Table type recordset, and
use Seek to find the record I'm interested in.
It will probably take a few hours to program, but once the business
rules are firmly established the rest follows rather mechanically.
Best of luck,
-Tom.
<clip>
>Hello Tom
>I forgot to mention, in the example we were going thru above, the Tier
2 & Tier 3 reps that are in Suzy's upline will also receive a
commission of 3% (cell C12) & 4% (cell D12) that will need to be
calculated.
>thank you
Matt- Hide quoted text -

- Show quoted text -
Hello Kevin

Thank you for your time. Regarding your questions:
Commission rates depend soley on the tier level of the participating
reps. Using your example of a Tier 1 & Tier 3 rep performing a sale
together (row 10 of the commission matrix), the Tier 1 rep receives
10%, the Tier 3 rep receives 4% and the Tier 2 rep receives 2% because
they recruited the Tier 3 rep. All reps that have downlines receive a
commission any time their downlines make a sale.

Thank you again for any advice you can offer on how to design the
table to store the commission rates and how to apply them using a
query.
Matt
Oct 20 '08 #11
Hi Matt

I think you've worn me out.

I asked two questions, although I will agree that the second was a two part
question. I got one point five answers.
I do not ask questions here to expand my knowledge but to make my response
responsive to your specific needs.
I've heard nothing re row 8 and now you talk about downlines when before we
were only concerned with uplines.
When describing data, consistency and specificity matter - a great deal.

You like me, and many others, assume that everyone will understand "OUR"
terminolgy and vernacular. They don't and won't.

If you won't describe your conditions and needs specifically and in detail -
those willing to help will be unable to do so.
Trust me I have been guilty of all the same faults here and hopefully have
learned from those experiences.

Food for thought.

Regards
Kevin


"spima05" <ms********@gma il.comwrote in message
news:98******** *************** ***********@i76 g2000hsf.google groups.com...
On Oct 19, 11:35 am, "KC-Mass" <connearneyATco mcastDOTnetwrot e:
Hi Matt

Just two questions if I could:

1. In your matrix where there are two reps, the one in the lower
(numerically) tier
(1 vs 3) seems always to get a full commission and the one in the higher
tier
(3 in the above example) always gets a half commission. Does that assume
that the one in the lower tier is the originator or do commission rates
depend
soley on relative tier level of the participating reps?

2. On row 8 of your matrix, the single rep will receive 8%. What do the
3% and 4% in columns B and C represent - who are they applied to?
If its the upline what happens in row 10?

I do think if you get the structure right you can establish commissions
with
a query.

Kevin

"Tom van Stiphout" <tom7744.no.s.. .@cox.netwrote in
messagenews:bp* *************** *************** *@4ax.com...
On Sat, 18 Oct 2008 16:42:54 -0700 (PDT), spima05
<mspilot...@gma il.comwrote:
Ha, you left that gem for last, right :-)
I think the data structure doesn't matter as much as I first thought:
you'll have to write some VBA with recordsets to figure this out.
Access doesn't do recursive queries (unlike SQL Server).
You probably know you can call a VBA function from a query.
If performance is a concern, I might use a Table type recordset, and
use Seek to find the record I'm interested in.
It will probably take a few hours to program, but once the business
rules are firmly established the rest follows rather mechanically.
Best of luck,
-Tom.
<clip>
>Hello Tom
>I forgot to mention, in the example we were going thru above, the Tier
2 & Tier 3 reps that are in Suzy's upline will also receive a
commission of 3% (cell C12) & 4% (cell D12) that will need to be
calculated.
>thank you
Matt- Hide quoted text -

- Show quoted text -
Hello Kevin

Thank you for your time. Regarding your questions:
Commission rates depend soley on the tier level of the participating
reps. Using your example of a Tier 1 & Tier 3 rep performing a sale
together (row 10 of the commission matrix), the Tier 1 rep receives
10%, the Tier 3 rep receives 4% and the Tier 2 rep receives 2% because
they recruited the Tier 3 rep. All reps that have downlines receive a
commission any time their downlines make a sale.

Thank you again for any advice you can offer on how to design the
table to store the commission rates and how to apply them using a
query.
Matt
Oct 20 '08 #12
On Mon, 20 Oct 2008 00:13:37 -0400, "KC-Mass"
<connearneyATco mcastDOTnetwrot e:

I second that. For example it wasn't until third or fourth instance
that I realized the recursive (or at least hierarchical) nature of
your commission structure. And I want to add that writing down all
requirements in unambiguous language sometimes reveals the solution.
It forces you to think out of the box.

Now it may well be that after reviewing that list some of us may deem
this beyond providing assistance in a newsgroup and may be thinking
about billable time, but that doesn't make the exercise less useful.

-Tom.
Microsoft Access MVP

>Hi Matt

I think you've worn me out.

I asked two questions, although I will agree that the second was a two part
question. I got one point five answers.
I do not ask questions here to expand my knowledge but to make my response
responsive to your specific needs.
I've heard nothing re row 8 and now you talk about downlines when before we
were only concerned with uplines.
When describing data, consistency and specificity matter - a great deal.

You like me, and many others, assume that everyone will understand "OUR"
terminolgy and vernacular. They don't and won't.

If you won't describe your conditions and needs specifically and in detail -
those willing to help will be unable to do so.
Trust me I have been guilty of all the same faults here and hopefully have
learned from those experiences.

Food for thought.

Regards
Kevin
<clip>
Oct 20 '08 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4332
by: Jurek | last post by:
I have 10+ experience in C/C++ - mostly automation and graphics. I have never written any business apps though. Recently I've been asked to write a simple report that would calculate sales commission. The report needs to be generated from within a C/C++ app. I don't want to mess it up so I thought maybe someone from this group could give me some advice or point to me to a place that'll provide some background on the issue. Here is a...
0
1462
by: lindagoldstein100 | last post by:
Questions on Affiliate Marketing - Linkshare / Commission Junction etc ? I have heard of LinkShare, Commission junction etc ? Are these any any good ? Any one have experience with them ? Good ? Bad ? Are they worth the money ? Is it a month to month or yearly contract
6
1486
by: Marie4458 | last post by:
I gave it a try but when I debuged the form the commission rate is always $0.00. Any help is appreciated. Thanks. Private Sub xCalcButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles xCalcButton.Click ' declare variables Const commissionRate As Decimal = 0.1D Dim sales As Decimal Dim totalCommission As Decimal
5
2297
by: jatrojoomla | last post by:
Hi! Is there any one with knowledge of CJ API development I am getting error like: http://fb.aafter.com/cj/testb/support.php during Commission Junction SOAP access Commission Junction: http://cj.com/ http://webservices.cj.com/
16
1964
by: atlbearcat | last post by:
Hell all. I have a database that tracks Commissions for recruiters (Access 2003/2003). I need to come up with a commission report on a monthly basis, which is not a problem. Where I'm having the logic problem is.... Sub-Contractor XYZ works on Project 123. He works at site ABC from 10/1/07 - 10/1/07. He works at site DEF from 10/3/07 - 10/3/07. He works at site GHI from 10/6/07 - 10/6/07. He works at site JKL from 10/9/07 - 10/9/07....
2
1123
by: rekhasc | last post by:
hi.. can anyone help me to write the code for commission updation..am doing project for a store in which there is a scheme as tree,one person should be member of that scheme, he is like a root node of that scheme, under him there will be two members like child nodes of that root..again two node are added to the child nodes and so on.. the root node gets 500/- as commission for first two child nodes.. and child nodes gets 500/-...
29
4207
n8kindt
by: n8kindt | last post by:
hey guys, i'm using access 2007. i'm not happy with my solution to the following problem so i'm hoping one of you guys has a better idea. my solution would require use of multiple valued fields and i know union queries and multivalued fields don't get along with each other very well. so..... this is the typical data i'm working with: Person A Person B (a recruit of Person A) Person C (a recruit of Person A)
2
5494
by: spima05 | last post by:
Hello I am trying to create a database to calculate commissions on a sale based on a tiered commission schedule and am having trouble with how to design the tables and relationships to store the info needed. Each sale will have 1 or 2 sales reps which are assigned to a tier. For example: repA is assigned to Tier 1 repB is assigned to Tier 2
0
2124
by: spima05 | last post by:
<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>New Page 1</title> </head>
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10578
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.