There should be 3 cables entering the programmer, but you need to confirm where they go. I have come across all sorts of bizarre wiring arrangements in the past. I would expect to see.
1. Mains Supply
2. Cable to Boiler
3. Cable to Pump
Once you have identified the cables
1. The mains supply is quite obvious N & L
2. The Live in the cable to the boiler goes to HW On (3)
3. The Live in the cable to the pump goes to CH On (4)
The earths and neutrals of all the cables are connected together respectively. (earths omitted for clarity below

)
View attachment 397575
Some boilers require a permanent live (shown by the dashed line) if yours needs it, it will be connected already and shown in the boilers installation instructions.
I suspect the pump cable will contain a live wire that originally went to ST699 'Heating On' (Terminal 3) and the cable to the boiler will have a live wire connected to 'HW Com' (Terminal 8.) But check to make sure.