Ionized outflows in Active Galactic Nuclei (AGN) are thought to influence their nuclear and local galactic environment. However, the distance of the outflows with respect to the central engine is poorly constrained, which limits our understanding of their kinetic power as a cosmic feedback channel. Therefore, the impact of AGN outflows on their host galaxies is uncertain. However, when the density of the outflows is known, their distance can be immediately obtained from their modelled ionization parameter. With the new self-consistent PhotoIONization (PION) model in the SPEX code, we are able to calculate detailed level populations, including the ground and metastable levels. This enables us to determine under what physical conditions the metastable levels are significantly populated. We then identify characteristic lines from these metastable levels in the 1 -- 2000 {\AA} wavelength range. In the large density range of $n_H \in (10^6, 10^{20} m^{-3}$, the metastable levels 2s 2p $(^3P_{0-2})$ in Be-like ions can be significantly populated. For B-like ions, merely the first excited level 2s$^2$ 2p $(^2P_{3/2})$ can be used as a density probe. For C-like ions, the first two excited levels 2s$^2$ 2p$^2$ ($^3P_1$ and $^3P_2$) are better density probes than the next two excited levels 2s$^2$ 2p$^2$ ($^1S_0$ and $^1D_2$). Different ions in the same isoelectronic sequence cover not only a wide range of ionization parameter, but also a wide range of density. On the other hand, within the same isonuclear sequence, less ionized ions probe lower density and smaller ionization parameter. Finally, we re-analyzed the high-resolution grating spectra of NGC 5548 observed with Chandra in January 2002, using a set of PION components to account for the ionized outflow. We derive lower (or upper) limits of plasma density in five out of six PION components, based on the presence (or absence) of the metastable absorption lines.