The numerical modelling of forming processes involving the flow of foams requires taking into account the different problem scales. Thus, in industrial applications a macroscopic approach is suitable, whereas the macroscopic flow parameters depend on the cellular structure: cell size, shape, orientation, etc. Moreover, the shape and orientation of the cells are induced by the flow. A fully microscopic description remains useful to understand the foam behaviour and the topological changes induced by the cell elongation or distortion, however, from an industrial point of view, microscopic simulations remain challenging to address practical applications involving flows in complex 3D geometries. In this paper, we propose a viscoelastic flow model where the foam microstructure is represented from suitable microstructure descriptors whose evolution is governed by the macroscopic flow kinematics. This is a post-peer-review, pre-copyedit version of an article published in International journal of material forming.