Production companies face the challenge of reducing energy costs and carbon emissions while achieving the logistical objectives at the same time. Active management of electricity demand, also known as Demand Side Management (DSM) or Energy Flexibility (EF), has been recognized as an effective approach to minimize energy procurement costs for example by reducing peak loads. Additionally, it helps to integrate (self-generated, volatile) renewable energies to reduce carbon emissions and has the ability to stabilize the power grid, if the incentives are set appropriately. Although production companies possess great potential for EF, implementation is not yet common. Approaches to practical implementation for integrating energy flexibility into production planning and control (PPC) to dynamically adapt the consumption to the electricity supply are scarce to non-existent due to the high complexity of such approaches. Therefore, this paper presents an approach to integrate EF into PPC. Based on the energy-oriented PPC, the approach identifies and models EF of processes in a generic energy flexibility data model (EFDM) which is subsequently integrated in the energy-oriented production plan and further optimised on the market side. An application-oriented use case in the chemical industry is presented to evaluate the approach. The implementation of the approach shows that EF can have a variety of characteristics in production systems and a clear, structured, and applicable method can help companies to an automated EF. Finally, based on the results of the use case, it is recommended to introduce EF in production companies stepwise by extending existing planning and scheduling systems with the presented approach to achieve a realization of flexibility measures and a reduction of energy costs.