In this research, a case study is presented for the electrocoagulation treatment of wastewater produced in a drilling oil site. The process variables of the electrolysis time and current density were investigated with the response parameters of total dissolved solids (TDS) and energy consumption. A process integration to identify the Pareto front is designed with respect to the removal of TDS and its respective electricity cost using the global solver of the LINGO 18.0 software. An essential equation generated by the response surface methodology is used in conjunction with the cost equation based on the consumption of energy in the aspect of electrocoagulation. Results in the identification of the Pareto front show a maximum TDS removal of 71.4 % with a corresponding electricity cost of 8.41 USD/m3 under the conditions of 2 min (electrolysis time) and 140.4 mA/cm2 (current density). On the other hand, the minimum cost resulted in 0.53 USD/m3 which corresponds to a TDS removal of 29.2 % under the conditions of 0.5 min (electrolysis time) and 35.1 mA/cm2 (current density). This study has established an appropriate trade-off between the TDS removal and electricity cost by producing the Pareto optimal curve. Hence, this can enable an appropriate decision-making strategy for the stakeholders for future applications in the electrocoagulation method.