Influence of external potentials on heterogeneous diffusion processes