In this situation, how to decrease the payout amount based on the "weighed" constituent parts? Couldn't think of a better way to explain it in the title, my bad.
This is a problem I'm running into in a programming project.
Here's the situation:
Say a partner is due to be paid $1000 for providing 100 leads or something. Lets say that 25% of the leads are from the US/UK (highly valuable), another 25% are from, say, Span (valuable, but not as much) and the rest are from Sierra Leone (not valuable).
I want to be able to assign weight to them so to speak, and subtract from the $1000 (that number is pre-determined based on a bunch of other things; I simply want to adjust it based on the quality of the leads)
I need to make a formula that takes these into account. If the partner only provides the poorest quality installs, I want to cut it down to like $200. 
I'm not sure how to even tag this problem.
 A: The simplest is to assign point values based on where the leads are.  Maybe 3 points for the highest value leads, 2 for medium, 1 for low (pick the numbers to suit).  Now the requirement needs to be adjusted to 2000 points or something like that.
A: Let's say that an employee is supposed to receive $x$ dollars for $n$ top-quality leads, and that this amount is to be reduced when the leads are of poorer quality than desired.
Thus, each individual lead is valued at $\frac{x}{n}$ dollars (assuming it is top-quality).
If the leads collected are named $\ell_1,\ldots,\ell_m$ (note that the number of leads actually collected, $m$, may not be equal to the number $n$ you are basing your starting scale on) then you could set the amount to be paid for these $n$ leads to be
$$\frac{x}{n}\sum_{i=1}^m\mathrm{weight}(\ell_i)$$
where the leads are assigned weights ranging between $0$ and $1$. These could be determined on a lead-by-lead basis, or you maybe you prefer to have a fixed list of values, say
$$\{0,\;0.2,\;0.5,\;0.8,\;1\}$$
that the weight of each lead must be chosen from. 
If you want to ensure a lower bound on salaries, so that someone who collected $n$ bottom-quality leads would still get $y$ dollars (for some $y<x$), the simplest solution would be to scale the weights so that the worst leads are given a weight of $\frac{y}{x}$.
