Here's how to do it the sensible way, (not the long winded way shown on another site).
Use a Torx20 screwdriver to remove the 2 screws on each side of the exterior boot panel.
Pull the rubber seal off of the top edge of the lower boot panel.
Pull the panel away so it clears the lock barrel...
...and then push the panel down to release a large clip just behind the smart logo.
Look behind the panel and disconnect the electrical connections to both licence plate lights.
The panel is now free to be removed from the car.
Pull the foam rubber sound deadening from the top...
...and the bottom of the tail gate.
Pull the remaining foam to one side and locate the Torx20 screw at each end. Remove these.
Look just under the lock and you'll see a final Torx20 screw. Remove this too.
Now you'll have to remove the boot restraints. Use a Torx45 bit to undo both.
The back of the boot flap can now be pushed back away from the frame.
Just left of the lock you'll see the boot catch solenoid. Disconnect the electrical connector.
Look behind the solenoid to find the 2x Torx20 screws. Just loosen these.
...until it stops. Pull it towards you...
...and slide it left and away from the car.
On refitting, ensure that the push rod from the solenoid passes through the hole arrowed below.
You'll have to peer behind the left side of the catch to see it.
The boot latch solenoid can only push with any strength. The return is spring powered inside of the solenoid.
As power is applied to the solenoid, the rod pushes the lever over and opens the boot latch.
The lever moves to its open position and presses the microswitch.
This is how the car knows the position of the boot hatch. If the car thinks that the boot is open, it won't lock.
On refitting the solenoid, it's a good idea to slightly grease the end of the push rod (arrowed) to help the movement.
Once you have fixed the fault and bolted everything back in place, the final tricky part is getting the internal boot
cover back into position. It will naturally want to push the boot release catches backwards. This won't work.
Push the red catches forward as you pull the interior boot cover over the top.
Replace the screws, the foam, the panel and remember to plug the licence plate lights back in.
Hopefully it all works as it is supposed to.