ABSTRACT The ion populations most frequently adopted for diagnostics in collisional plasmas are derived from the density independent coronal approximation. In higher density, lower temperature conditions, ionization rates are enhanced once metastable levels become populated, and recombination rates are suppressed if ions recombine into Rydberg levels. As a result, the formation temperatures of ions shift, altering the diagnostics of the plasma. To accurately model the effect of ionization from metastable levels, new electron impact ionization cross-sections have been calculated for oxygen, both for direct ionization and excitation–auto-ionization of the ground and metastable levels. The results have been incorporated into collisional radiative modelling to show how the ionization equilibrium of oxygen changes once metastable levels become populated. Suppression of dielectronic recombination has been estimated and also included in the modelling, demonstrating the shifts with density in comparison to the coronal approximation. The final results for the ionization equilibrium are used in differential emission measure modelling to predict line intensities for many lines emitted by O ii–O vi in the solar transition region. The predictions show improved agreement by 15–40 per cent for O ii, O vi, and the intercombination lines of O iii–O v, when compared to results from coronal approximation modelling. While there are still discrepancies with observations of these lines, this could, to a large part, be explained by variability in the observations.