Firms are increasingly using clickstream and transactional data to tailor product offerings to visitors at their site. Ecommerce websites have the opportunity, at each interaction, to offer multiple items (referred to as an offer set) that might be of interest to a visitor. We consider a scenario where a firm is interested in maximizing the expected payoff when composing an offer set. We develop a methodology that considers possible future offer sets based on the current choices of the user and identifies an offer set that will maximize expected payoffs for an entire session. Our framework considers both the items viewed and purchased by a visitor and models the probability of an item being viewed and purchased separately when calculating expected payoffs. The possibility of a user backtracking and viewing a previously offered item is also explicitly modelled. We show that identifying the optimal offer set is a difficult problem when the number of candidate items is large and the offer set consists of several items even for short time horizons. We develop an efficient heuristic for the one period look-ahead case and show that even by considering such a short horizon the approach is much superior to alternative benchmark approaches. Proposed methodology demonstrates how the appropriate use of information technologies can help e-commerce sites improve their profitability.