Inevitable inaccuracies in both manufacturing and assembly of magnetic field coils cause discrepancies between actual and nominal field in the plasma region, then generating error fields (EFs). This article examines the possibility to take advantage from the degrees of freedom (DoFs) of the assembly procedure to reduce the EFs due to a previously assembled part of the magnetic system in a tokamak. It is part of a broader vision that places the assembly phase within an optimization process able to take into account a full set of plasma scenarios. The effectiveness of the procedure is shown for the magnetic system of the divertor tokamak test (DTT) facility, currently under construction in Frascati, Italy.