  $\mathrm{J}/\psi$ production in high-energy hadronic collisions is sensitive
to both perturbative and non-perturbative aspects of quantum chromodynamics
(QCD) calculations. The production of a heavy-quark pair is well-described by
perturbative QCD, whereas the formation of the bound state involves
non-perturbative processes, treated in different ways by various available
theoretical models. ALICE can measure inclusive $\mathrm{J}/\psi$ at both
forward and midrapidity down to low ${p_{\rm T}}$ and the prompt and non-prompt
$\mathrm{J}/\psi$ separation can be performed at midrapidity. The study of the
production of non-prompt $\mathrm{J}/\psi$ originating from the decay of beauty
hadrons, besides allowing to isolate the prompt $\mathrm{J}/\psi$ cross section
from the inclusive $\mathrm{J}/\psi$ cross section, can be used to estimate
open beauty-hadron production. Heavy-flavour particle production in pp
collisions as a function of charged-particle multiplicity can provide insight
into the processes occuring in the collision at the partonic level, as well as
the interplay between the hard and soft mechanisms in particle production.
