A theory of sales compensation plans is presented where the sales for a product depends not only on the salespersons effort but also on the uncertainty in the selling environment. The firm chooses a compensation plan to maximize its profit taking into account the salespersons 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) as income increases. We identify several structural parameters that affect the compensation plan and show that the implication of changes in some of these parameters are 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 sales compensation plans.