Aims. We investigate a new method to for obtaining the plasma parameters of solar prominences observed in the Mg ii h&k spectral lines by comparing line profiles from the IRIS satellite to a bank of profiles computed with a one-dimensional non-local thermodynamic equilibrium (non-LTE) radiative transfer code. Methods. Using a grid of 1007 one-dimensional non-LTE radiative transfer models, some including a prominence-corona transition region (PCTR), we carry out this new method to match computed spectra to observed line profiles while accounting for line core shifts not present in the models. The prominence observations were carried out by the IRIS satellite on 19 April 2018.Results. The prominence is very dynamic with many flows, including a large arm extending from the main body seen near the end of the observation. This flow is found to be redshifted, as is the prominence overall. The models are able to recover satisfactory matches in areas of the prominence where single line profiles are observed. We recover: mean temperatures of 6000 to 50 000K; mean pressures of 0.01 to 0.5 dyne cm −2 ; column masses of 3.7×10 −8 to 5×10 −4 g cm −2 ; a mean electron density of 7.3×10 8 to 1.8×10 11 cm −3 ; and an ionisation degree n HII /n HI = 0.03 − 4500. The highest values for the ionisation degree are found in areas where the line of sight crosses mostly plasma from the PCTR, correlating with high mean temperatures and correspondingly no Hα emission. Conclusions. This new method naturally returns information on how closely the observed and computed profiles match, allowing the user to identify areas where no satisfactory match between models and observations can be obtained. The inclusion of the PCTR was found to be important when fitting models to data as regions where satisfactory fits were found were more likely to contain a model encompassing a PCTR. The line core shift can also be recovered from this new method, and it shows a good qualitative match with that of the line core shift found by the quantile method. This demonstrates the effectiveness of the approach to line core shifts in the new method.