473,795 Members | 3,175 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 #1
12 4930
Hi Matt

You need to find a way to show your matrix more clearly.
The word wrap makes it unreadable.

I also don't see how/if that matrix references the upline.

Kevin

"spima05" <ms********@gma il.comwrote in message
news:69******** *************** ***********@p59 g2000hsd.google groups.com...
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 #2
On Oct 18, 11:29*am, "KC-Mass" <connearneyATco mcastDOTnetwrot e:
Hi Matt

You need to find a way to show your matrix more clearly.
The word wrap makes it unreadable.

I also don't see how/if *that matrix references the upline.

Kevin

"spima05" <mspilot...@gma il.comwrote in message

news:69******** *************** ***********@p59 g2000hsd.google groups.com...
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- Hide quoted text -

- Show quoted text -
Hello Kevin

thank you for your reply. I have posted an image of the matrix on the
following website:
http://s90.photobucket.com/albums/k2...onschedule.jpg

and here is a link to see the relationships of the tables
http://s90.photobucket.com/albums/k2...bstructure.jpg

I appreciate any advice you can provide.

Thank you
Matt
Oct 18 '08 #3
On Sat, 18 Oct 2008 12:19:21 -0700 (PDT), spima05
<ms********@gma il.comwrote:

MUCH better. One point about the db design: there should be a PK over
saleOrderID + repID in tblOrderRep.

Why does Allen get 6%? Is that a matter of looking up Allen's tier
(say it is 1) and then staying in the same row in the matrix (so he
gets whatever is in B6)?

-Tom.
Microsoft Access MVP

>On Oct 18, 11:29*am, "KC-Mass" <connearneyATco mcastDOTnetwrot e:
>Hi Matt

You need to find a way to show your matrix more clearly.
The word wrap makes it unreadable.

I also don't see how/if *that matrix references the upline.

Kevin

"spima05" <mspilot...@gma il.comwrote in message

news:69******* *************** ************@p5 9g2000hsd.googl egroups.com...
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- Hide quoted text -

- Show quoted text -

Hello Kevin

thank you for your reply. I have posted an image of the matrix on the
following website:
http://s90.photobucket.com/albums/k2...onschedule.jpg

and here is a link to see the relationships of the tables
http://s90.photobucket.com/albums/k2...bstructure.jpg

I appreciate any advice you can provide.

Thank you
Matt
Oct 18 '08 #4
On Oct 18, 4:18*pm, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
On Sat, 18 Oct 2008 12:19:21 -0700 (PDT), spima05

<mspilot...@gma il.comwrote:

MUCH better. One point about the db design: there should be a PK over
saleOrderID + repID in tblOrderRep.

Why does Allen get 6%? *Is that a matter of looking up Allen's tier
(say it is 1) and then staying in the same row in the matrix (so he
gets whatever is in B6)?

-Tom.
Microsoft Access MVP
On Oct 18, 11:29*am, "KC-Mass" <connearneyATco mcastDOTnetwrot e:
Hi Matt
You need to find a way to show your matrix more clearly.
The word wrap makes it unreadable.
I also don't see how/if *that matrix references the upline.
Kevin
"spima05" <mspilot...@gma il.comwrote in message
>news:69******* *************** ************@p5 9g2000hsd.googl egroups.com....
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- Hide quoted text -
- Show quoted text -
Hello Kevin
thank you for your reply. I have posted an image of the matrix on the
following website:
http://s90.photobucket.com/albums/k2...dbimages/?acti...
and here is a link to see the relationships of the tables
http://s90.photobucket.com/albums/k2...dbimages/?acti...
I appreciate any advice you can provide.
Thank you
Matt- Hide quoted text -

- Show quoted text -
Thank you Tom, i have updated the tblOrderRep with primary keys for
the salesOrderID and repID fields.

Yes, Allen receives 6% because he is a Tier 1 rep and he is Roger's
upline.

I am having a difficult time figuring how to store the rates so it is
easy to apply them to the reps involved in the sale. I was thinking of
creating a commissions table as follows, but i dont know if it is a
good idea to have 2 fields for the reps.

tblCommissionDe tail
tier
rep1Tier
rep2Tier
commission%

Thank you in advance for your advice.
Matt
Oct 18 '08 #5
On Sat, 18 Oct 2008 14:52:21 -0700 (PDT), spima05
<ms********@gma il.comwrote:

I just want to get the detail about Allen right, because it may matter
for the data structure. What if Allen is also Suzy's uplink and she
and Sally are Tier-4 reps and made a sale together. Then Allen gets 3%
from cell B15, right?

-Tom.
>On Oct 18, 4:18*pm, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
>On Sat, 18 Oct 2008 12:19:21 -0700 (PDT), spima05

<mspilot...@gm ail.comwrote:

MUCH better. One point about the db design: there should be a PK over
saleOrderID + repID in tblOrderRep.

Why does Allen get 6%? *Is that a matter of looking up Allen's tier
(say it is 1) and then staying in the same row in the matrix (so he
gets whatever is in B6)?

-Tom.
Microsoft Access MVP
>On Oct 18, 11:29*am, "KC-Mass" <connearneyATco mcastDOTnetwrot e:
Hi Matt
>You need to find a way to show your matrix more clearly.
The word wrap makes it unreadable.
>I also don't see how/if *that matrix references the upline.
>Kevin
>"spima05" <mspilot...@gma il.comwrote in message
>>news:69****** *************** *************@p 59g2000hsd.goog legroups.com...
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- Hide quoted text -
>- Show quoted text -
>Hello Kevin
>thank you for your reply. I have posted an image of the matrix on the
following website:
http://s90.photobucket.com/albums/k2...dbimages/?acti...
>and here is a link to see the relationships of the tables
http://s90.photobucket.com/albums/k2...dbimages/?acti...
>I appreciate any advice you can provide.
>Thank you
Matt- Hide quoted text -

- Show quoted text -

Thank you Tom, i have updated the tblOrderRep with primary keys for
the salesOrderID and repID fields.

Yes, Allen receives 6% because he is a Tier 1 rep and he is Roger's
upline.

I am having a difficult time figuring how to store the rates so it is
easy to apply them to the reps involved in the sale. I was thinking of
creating a commissions table as follows, but i dont know if it is a
good idea to have 2 fields for the reps.

tblCommissionD etail
tier
rep1Tier
rep2Tier
commission%

Thank you in advance for your advice.
Matt
Oct 18 '08 #6
On Oct 18, 6:48*pm, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
On Sat, 18 Oct 2008 14:52:21 -0700 (PDT), spima05

<mspilot...@gma il.comwrote:

I just want to get the detail about Allen right, because it may matter
for the data structure. What if Allen is also Suzy's uplink and she
and Sally are Tier-4 reps and made a sale together. Then Allen gets 3%
from cell B15, right?

-Tom.
On Oct 18, 4:18*pm, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
On Sat, 18 Oct 2008 12:19:21 -0700 (PDT), spima05
<mspilot...@gma il.comwrote:
MUCH better. One point about the db design: there should be a PK over
saleOrderID + repID in tblOrderRep.
Why does Allen get 6%? *Is that a matter of looking up Allen's tier
(say it is 1) and then staying in the same row in the matrix (so he
gets whatever is in B6)?
-Tom.
Microsoft Access MVP
On Oct 18, 11:29*am, "KC-Mass" <connearneyATco mcastDOTnetwrot e:
Hi Matt
You need to find a way to show your matrix more clearly.
The word wrap makes it unreadable.
I also don't see how/if *that matrix references the upline.
Kevin
"spima05" <mspilot...@gma il.comwrote in message
>news:69******* *************** ************@p5 9g2000hsd.googl egroups.com...
Hello
I am developing a database to calculate commissions on a sale foreach
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- Hide quoted text -
- Show quoted text -
Hello Kevin
thank you for your reply. I have posted an image of the matrix on the
following website:
http://s90.photobucket.com/albums/k2...dbimages/?acti....
and here is a link to see the relationships of the tables
http://s90.photobucket.com/albums/k2...dbimages/?acti....
I appreciate any advice you can provide.
Thank you
Matt- Hide quoted text -
- Show quoted text -
Thank you Tom, i have updated the tblOrderRep with primary keys for
the salesOrderID and repID fields.
Yes, Allen receives 6% because he is a Tier 1 rep and he is Roger's
upline.
I am having a difficult time figuring how to store the rates so it is
easy to apply them to the reps involved in the sale. I was thinking of
creating a commissions table as follows, but i dont know if it is a
good idea to have 2 fields for the reps.
tblCommissionDe tail
* *tier
* *rep1Tier
* *rep2Tier
* *commission%
Thank you in advance for your advice.
Matt- Hide quoted text -

- Show quoted text -
Hello Tom

Thank you for your time. As per your example, if Suzy and Sally
completed a sale together and they are both Tier 4 reps and Allen is
the Tier 1 rep in Suzy's upline then Allen would receive 2% shown in
cell B12 because Suzy & Sally are both Tier 4 reps.

I appreciate your help and please feel free to ask any questions.

Thank you
Matt
Oct 18 '08 #7
On Oct 18, 7:33*pm, spima05 <mspilot...@gma il.comwrote:
On Oct 18, 6:48*pm, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:


On Sat, 18 Oct 2008 14:52:21 -0700 (PDT), spima05
<mspilot...@gma il.comwrote:
I just want to get the detail about Allen right, because it may matter
for the data structure. What if Allen is also Suzy's uplink and she
and Sally are Tier-4 reps and made a sale together. Then Allen gets 3%
from cell B15, right?
-Tom.
>On Oct 18, 4:18*pm, Tom van Stiphout <tom7744.no.s.. .@cox.netwrote:
>On Sat, 18 Oct 2008 12:19:21 -0700 (PDT), spima05
><mspilot...@gm ail.comwrote:
>MUCH better. One point about the db design: there should be a PK over
>saleOrderID + repID in tblOrderRep.
>Why does Allen get 6%? *Is that a matter of looking up Allen's tier
>(say it is 1) and then staying in the same row in the matrix (so he
>gets whatever is in B6)?
>-Tom.
>Microsoft Access MVP
>On Oct 18, 11:29*am, "KC-Mass" <connearneyATco mcastDOTnetwrot e:
>Hi Matt
>You need to find a way to show your matrix more clearly.
>The word wrap makes it unreadable.
>I also don't see how/if *that matrix references the upline.
>Kevin
>"spima05" <mspilot...@gma il.comwrote in message
>>news:69****** *************** *************@p 59g2000hsd.goog legroups..com.. .
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. Iam
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 onthe
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 repsand
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- Hide quoted text -
>- Show quoted text -
>Hello Kevin
>thank you for your reply. I have posted an image of the matrix on the
>following website:
>http://s90.photobucket.com/albums/k2...dbimages/?acti...
>and here is a link to see the relationships of the tables
>http://s90.photobucket.com/albums/k2...dbimages/?acti...
>I appreciate any advice you can provide.
>Thank you
>Matt- Hide quoted text -
>- Show quoted text -
>Thank you Tom, i have updated the tblOrderRep with primary keys for
>the salesOrderID and repID fields.
>Yes, Allen receives 6% because he is a Tier 1 rep and he is Roger's
>upline.
>I am having a difficult time figuring how to store the rates so it is
>easy to apply them to the reps involved in the sale. I was thinking of
>creating a commissions table as follows, but i dont know if it is a
>good idea to have 2 fields for the reps.
>tblCommissionD etail
* *tier
* *rep1Tier
* *rep2Tier
* *commission%
>Thank you in advance for your advice.
>Matt- Hide quoted text -
- Show quoted text -

Hello Tom

Thank you for your time. As per your example, if Suzy and Sally
completed a sale together and they are both Tier 4 reps and Allen is
the Tier 1 rep in Suzy's upline then Allen would receive 2% shown in
cell B12 because Suzy & Sally are both Tier 4 reps.

I appreciate your help and please feel free to ask any questions.

Thank you
Matt- Hide quoted text -

- Show quoted text -
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

Oct 18 '08 #8
On Sat, 18 Oct 2008 16:42:54 -0700 (PDT), spima05
<ms********@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
Oct 19 '08 #9
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" <to************ *@cox.netwrote in message
news:bp******** *************** *********@4ax.c om...
On Sat, 18 Oct 2008 16:42:54 -0700 (PDT), spima05
<ms********@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

Oct 19 '08 #10

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

Similar topics

7
4331
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
1461
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
1485
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
2296
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
1122
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
2123
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
9672
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
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9040
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
6780
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
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4113
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
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
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.