For companies with large salesforces whose sellers approach business clients in teams, the problem of allocating sales teams to sales opportunities is a critical management task for maximizing the revenue and profit of the company. We approach this problem via predictive and prescriptive analytics, where the former involves data mining to learn the relationship between sales team composition and the revenue earned for different types of clients and opportunities, and the latter involves optimization to find the allocation of sales resources to opportunities that maximizes expected revenue subject to business constraints. In looking at the overall salesforce problem, we focus on the interplay between the data mining and optimization components, making sure to formulate the two aspects in a jointly tractable and effective manner. We perform a sensitivity analysis of the optimization component to provide further insight into the interaction between prediction and prescription. Finally, we provide an empirical study using real-world data from a large technology company's salesforce. Our results demonstrate that by using these analytics, we can increase revenue by 15%.