This paper proposes a procedure for the optimal siting and sizing of energy storage systems (ESSs) within active distribution networks (ADNs) hosting a large amount of stochastic distributed renewable energy resources. The optimization objective is to minimize the ADN’s day-ahead computed dispatch error. The allocation of ESS is determined while taking advantages from their operational features regarding the ADN’s dispatchability. The proposed ESS planning is defined by formulating, and solving, a scenario-based non-linear non-convex optimal power flow (OPF). The OPF problem is converted to a piecewise linearized OPF (PWL-OPF). The ESS control strategy is designed to fully exploit the energy capacity of the ESS. It is integrated within the PWL-OPF to achieve the ADN’s dispatchability regarding all operating scenarios. The Benders decomposition technique is employed to tackle the computational complexity of the proposed planning problem. The problem is decomposed into two sub-ones: a master problem where the allocation of the ESSs is decided, and several subproblems where the dispatchability of ADN with the support of the allocated ESS is evaluated through the scenario-based OPF. To validate the proposed method, extensive simulations are conducted on a real Swiss grid embedding significant PV generation capacity.