Just learn the colours of the valves and what they do and the sequence of switching then all will become clear.
Two port valve.... Grey perm live, brown switch live from controls, blue neutral, green and yellow earth and orange switch live to boiler and pump..unless the boiler has pump over run then the pump is connected to the pump live terminal in the boiler.
Order of sequence/switching.... programmer, thermostat, valve, boiler and pump.
Say this is for the CH....CH on connects to common of room thermostat, switch live from thermostat connects to brown of the valve and orange of the valve connects to switch live of the boiler.
It's just a load of switching in series.