# Conservation of Momentum for collision - when shold I use the impulse?

I'm doing a problem on collision. In the previous exercises I used to use the law of conservation of momentum. Say for particle A and B, where $v_i$s are the final velocities and the $u_i$s the initial $$v_A+v_B = u_A+u_B$$.

So the total momentum is conserved. However in the new problem a ball is colliding against a wall (bouncing off). In the solutions they add the impulse in the equation.

When should I use the impulse and when not? does it have anything to do with conservative forces maybe?