The proposed flexible electrification unit and computational approach can be applied to different hydrogen-based chemical production systems. Specifically, our optimization framework allows us to estimate the levelized production cost of hydrogen as a function of the time-varying energy prices (from different markets). As such, we can use these tools to determine viability of electrifying different facilities and also to understand how increasing market volatility (expected under higher share of renewables) can create incentives for electrification. Our work assumed that we have perfect information of electricity market. In the future, we will develop statistical tools to predict the electricity market and propose advanced control models for harnessing the flexibility of the energy market at most. In addition, we will investigate potential revenue sources for flexible units that can result from the provision of electricity demand flexibility and from sales of hydrogen in external markets (e.g., for energy storage). Moreover, it is necessary to conduct a more comprehensive study on the economic viability of electrified processes in different markets/regions of the United States and of the world.