We investigate a mechanism that generates the exact solutions of scalar field cosmologies in a unified way. The procedure investigated here permits to recover allmost all known solutions, and allows one to derive new solutions as well. In particular, we derive and discuss one novel solution defined in terms of the Lambert function. The solutions are organized in a classification which depends on the choice of a generating function which we have denoted by $x(\phi)$ that reflects the underlying thermodynamics of the model. We also analyse and discuss the existence of form invariances and dualities between solutions. A general way of defining the latter in an appropriate fashion for scalar fields is put forward.