  We present a numerical analysis of the cosmological evolution of scalar field
dark matter (SFDM) in the Boltzmann code $\texttt{CLASS}$, based on a dynamical
system analysis of previous works. We show a detailed study of the evolution of
the different dynamical variables, and in particular of the energy density and
its corresponding linear perturbations. The numerical results are in good
agreement with those of the original SFDM equations of motion, and have better
accuracy than other approaches. In addition, we calculate the temperature and
matter power spectra and discuss the reliability of their numerical results. We
also give simple examples in which we can put constraints on the field mass
using recent likelihoods incorporated in the Monte Carlo Markov Chain sampler
$\texttt{MontePython}$.
