W e consider a retailer with limited inventory of identically priced, substitutable products. The retailer faces a market with multiple segments of customers that are heterogeneous with respect to their product preferences. Customers arrive sequentially, and the firm decides which subset of products to offer to each arriving customer depending on the customer's preferences, the inventory levels, and the remaining time in the season. We show that it is optimal to limit the choice set of some customers (even when the products are in stock), reserving products with low inventory levels for future customers who may have a stronger preference for those products. In certain settings, we prove that it is optimal to follow a threshold policy under which a product is offered to a customer segment if its inventory level is higher than a threshold value. The thresholds are decreasing in time and increasing in the inventory levels of other products. We introduce two heuristics derived by approximating the future marginal expected revenue by the marginal value of a newsvendor function that captures the substitution dynamics between products. We test the impact of assortment customization using data from a fashion retailer. We find that the potential revenue impact of assortment customization can be significant, especially when customer heterogeneity is high and when the products' inventory-to-demand ratios are asymmetric. Our findings suggest that assortment customization can be used as another lever for revenue maximization in addition to pricing.