The transformation of today's grid toward smart grid has given the energy storage systems (ESSs) the opportunity to provide more services to the electric grid as well as the end customers. On the grid's side, ESSs can generate revenue streams participating in electricity markets by providing services such as energy arbitrage, frequency regulation or spinning reserves. On the customers side, ESSs can provide a wide range of applications from on-site back-up power, storage for off-grid renewable systems to solutions for load shifting and peak shaving for commercial/industrial businesses. This webinar focuses on the benefits of behind-the-meter (BTM) ESSs to the utility customers and the method for optimizing these benefits. A nonlinear optimization problem is formulated to find the optimal operating scheme for ESSs to minimize the energy and demand charges of time-of-use (TOU) customers, or to minimize the energy charge of net-metering (NEM) customers. The problem is then transformed to a Linear Programming (LP) problem using Minmax technique. Case studies are conducted for residential and commercial customers in California and an industrial customer in New Mexico.