Page 1 of 1

Working out commissions

PostPosted: Wed Mar 28, 2007 1:51 am
by rservis
Hi, am getting confused and need expert advice,

I am trying to work out how to get a percentage into my line items file so that I can produce reports etc.. I basically want to pay the employees what they deserve to get!!

Im using my employees as my resources, when you create an appointment you go in to the new window mini appointment layout. On this layout i have a line items portal from which you can select what product or service a client was having (When you choose an item from a drop down list which pulls from a products table it inserts into the line items file if its a product or service).

In my line items table i can see all the information for each transaction for that employee via the "Calculation, Unstored, from Lines, = AppointmentsDaily::ApptResource".

In the Resources table i have 3 commisson fields: Products 0.10%, Services 0.5% and Referrals 0.8% these rates vary per employee.

A client can have a service, buy a product/s and could have been referred by someone.

How best is it to workout the commission for each employee per transaction.

Many thanks in advance,

Roy

PostPosted: Wed Mar 28, 2007 6:15 am
by John Sindelar
Leaving referrals aside for a minute, I'd begin by creating an AutoEnter calc in the Lines table that looks out past the appointment to its resource and grabs the appropriate commission rate. Sounds like you have the product "type" in the products table so the auto enter calc would probably look like this:

Case (
Product::ProductType = "Product" ; AppointmentsDailyResources::ProductCommissionRate ;
Product::ProductType = "Service" ; AppointmentsDailyResources::ServiceCommissionRate
)

That would give you a commission rate. and thus a commission amount, for each line.

The thing about referrals is that "being referred" isn't an attribute of the item or service purchased, it is an attribute of the appointment, or perhaps of the customer. So when someone who is referred buys something, the transaction is both a product/service transaction and a referral transaction. You just have to decide which takes precedence in this situation and looking at your rates it seems like the referral commission rate would be paid.

So, simply put your test for the referral at the front of the case statement , since that will stop evaluating when it reaches a true condition. If "being referred" is an attribute of the appointment, your case statement could look like this:

Case (
AppointmentsDaily::ApptIsReferral = 1 ;
AppointmentsDailyResources::ReferralCommissionRate ;
Product::ProductType = "Product" ; AppointmentsDailyResources::ProductCommissionRate ;
Product::ProductType = "Service" ; AppointmentsDailyResources::ServiceCommissionRate
)

Hope that helps.

PostPosted: Wed Mar 28, 2007 7:15 am
by rservis
Hi John,

Thanks for getting back to me so soon, I will try your idea.

Many many thanks,

Roy