Electronic processes in molecule–surface scattering