This shows the problem - the solder melts from the heat and the wire lets go.
If the switch is not repairable, instead of having to swap the entire switch and live with two keys, you can separate the mechanical & electrical halves and retain the original mechanical lock/key with the new electrical switch/harness.
(This pic is from a different model Triumph but the problem is the same)