Frequently, magnetothermal studies of many ferromagnetic materials are focused considering the system such as a paramagnet subject to a molecular field being characterized by an exchange constant. However, magnetostructural transitions can produce abrupt changes in the exchange constant triggering magnetic transitions of first order at transformation temperatures, which can be shifted by applying magnetic field or pressure. On thermodynamic bases we show how an abrupt but continuous variation of the exchange constant at the transition can play an important role in the magnetocaloric and barocaloric isothermal potentials in systems showing structural transformation.