A theory of salesforce compensation plans is presented where the sales of a product depend not only on the salesperson’s effort but also on the uncertainty in the selling environment. The firm chooses a compensation plan to maximize its profit taking into account the salesperson’s likely effort levels under alternative compensation plans and his or her alternative job opportunities. The salesperson (agent) chooses an effort level considering both the disutility from effort and the expected utility from earnings under the compensation plan. The Agency Theory framework provides an explanation for the differences across firms in the types of compensation plans used such as straight salary, straight commissions, or a combination of salary and commissions. It is shown that the optimal compensation plan is a convex (concave) increasing function of sales if the risk tolerance of the salesperson increases “rapidly” (stays constant) with income. We identify several structural parameters that affect the compensation plan and show that the implication of changes in some of these parameters is consistent with those mentioned in the sales management literature. For example, we show that the proportion of salary to total compensation would increase with an increase in one or more of the following parameters: (i) uncertainty, (ii) marginal cost of production, and (iii) attractiveness of alternative job opportunities for the salesperson. We conclude with a discussion of the implications of the theory for managing salesforce compensation plans.