My only advice is to keep it simple. As systems people, we sometimes get carried away with permuations and computations, but in the end it has to be easy to explain, easy to track and easy to calculate. Our model assigned a lead consultant to every customer. 90% of the time that consultant does all the work for that customer and got full revenue credit against a pre-established goal. Once they reached their goal, we had a an escalting bonus that increased the further past their goal they got. When a team was involved, the lead consultant/project manager had to divy up the revenue credit. PM knew they couldn't screw the other staff if they wanted them to work on their projects again, so found them to be very fair. Great learning curve for future supervisors and managers. All other factors like seniority, skill, etc, showed up either in base salary, or in their ability to get more work and more revenue, thus bigger bonus.
Some might say a little mercenary, but sure was simple. Last thing I would add in is, if in doubt, err on the side of the good employee. I never hesitated giving credit for things like sales presentations, user groups, etc that took away direct revenue producing time, but was good for the firm. Small dollars towards larger goal.