The high variability and uncertainty introduced into modern electrical distribution systems due to decentralized renewable energy generators requires new solutions for grid management and power quality assurance. One of these possible solutions includes grid integrated energy storage. The appropriate size and placement of decentralized storage is highly dependent on purpose of the battery system and expected operational strategy. However, battery operational strategies are difficult to simulate simultaneously during a sizing and placement planning calculation. The motivation of this paper is to propose an algorithm that is capable of integrating sizing, placement and operational strategies of batteries into an Optimal Power Flow (OPF) distribution grid planning tool. The choice of the OPF approach permits to account for grid constraints which is more adapted for grid-connected storage devices compared to other approaches in the state of the art that are based only on an email balance analysis. This paper presents an alternating current (AC) multi-temporal OPF algorithm that uses a convex relaxation of the power flow equations to guarantee exact and optimal solutions with high algorithmic performance. The algorithm is unique and innovative due to the fact that it combines the simultaneous optimization of placement and sizing of storage devices taking into account load curves, photovoltaic (PV) production profiles, and distribution grid power quality constraints. The choice to invest in battery capacity is highly sensitive to the price of battery systems. The investment in battery systems solely for reducing losses an operational costs was proven not to be cost effective, however when battery systems are allowed to buy and sell electricity based on variable market prices they become cost effective. The assumptions used for this study shows that current battery system prices are too high to be cost effective even when allowing battery system market participation.