Building thermal energy storage (TES) can provide value to building owners while helping the electric grid. In this paper, a transactive approach to controlling thermal energy storage is developed for multiple buildings considering electric grid incentives. A two-stage building control framework is proposed to plan day-ahead electricity procurement and real-time TES operation. Day-ahead planning is decided by a two-stage stochastic optimization framework to account for uncertainty in the occupant behavior and weather of the following day. In the real-time operation, a transactive market mechanism is utilized for load flexibility created by TES operation. Real-time operations are based on solving a model predictive control (MPC) problem at the aggregator level to dispatch thermal storage via transactive markets. Simulation case studies were conducted to evaluate the proposed framework by comparing the performance of the stochastic planning and control with the deterministic approach. This paper demonstrates the effectiveness of the developed framework in operating a portfolio of thermal storage resources in consideration of uncertainty.