A monopolist wishes to maximize her profits by finding an optimal price policy. After she announces a menu of products and prices, each agent x will choose to buy that product y(x) which maximizes his own utility, if positive. The principal's profits are the sum of the net earnings produced by each product sold. These are determined by the costs of production and the distribution of products sold, which in turn are based on the distribution of anonymous agents and the choices they make in response to the principal's price menu. In this paper, we provide a necessary and sufficient condition for the convexity or concavity of the principal's (bilevel) optimization problem, assuming each agent's disutility is a strictly increasing but not necessarily affine (i.e., quasilinear) function of the price paid. Concavity, when present, makes the problem more amenable to computational and theoretical analysis; it is key to obtaining uniqueness and stability results for the principal's strategy in particular. Even in the quasilinear case, our analysis goes beyond previous work by addressing convexity as well as concavity, by establishing conditions which are not only sufficient but necessary, and by requiring fewer hypotheses on the agents' preferences. © 2019 Wiley Periodicals, Inc.