The brief
The Beetle had a confused hatch: the latch showed the tailgate open when it was closed and closed when it was open, so the dash warning and the central locking didn't know what state it was in. He brought it in. A latch that misreads is more than an annoyance, it can leave the boot insecure or refuse to release. The tailgate latch is the motorised mechanism that catches and releases the hatch, with a micro-switch inside it that tells the car whether the hatch is open or shut. When that switch or the latch wears, the car gets the wrong signal, so the state reads backwards, the warning won't clear, and the locking acts up. A latch with a failed switch doesn't recover, so it needs replacing.
The diagnosis
A check confirmed it, the tailgate latch's state switch was faulty, sending the wrong signal so the car read the hatch backwards. The wiring and the central locking checked out, it was the latch mechanism itself. That's a latch replacement, you don't repair the switch inside it, so the call was a complete tailgate latch assembly, fitted and tested with the central locking.
The work
The tailgate trim was accessed, the failed latch mechanism removed, and a new genuine VW-spec tailgate latch fitted, connected up, the latch and the release adjusted so the hatch catches and releases cleanly. The new unit was registered as needed so the central locking recognised it, and the trim refitted. A check confirmed the hatch read closed when closed and open when open, the warning cleared, the central locking handled it correctly, and it released cleanly on the button.
The outcome
The hatch reading its state correctly, the warning gone, the central locking working with it, and a clean release every time. The Beetle went home with the latch sorted. A latch that misreads only gets less reliable until the boot won't secure or won't open, so changing the mechanism put it right.