Turn off your Bosch dishwasher and open the door. Notice the soap dispenser mounted to the inside of the door.
Insert the tip of a flathead screwdriver in the seam where the top cover of the dispenser meets the bottom. Pry up to pop the cover up.
Turn the cover upside down and place it on a table. Notice the spring inside the cover. It should be attached to both the rod-shaped tripping mechanism and the side of the lid.
Fit the end of the spring over the latch at the side of the lid to secure it. If the spring isn't connected to the tripping mechanism, proceed to the next step.
Slide the remaining end of the spring over the tripping mechanism to secure the spring. If the spring is broken, you can slide it off of the lid and mechanism and slide a new spring in its place.