The total energy of a system is always conserved irrespective of whether external forces act on the system.
The total momentum of a system always remain unchanged before and after the collision regardless of the external forces acting on the system.