Universal direct or semi-direct-operated solenoid valves are generally suitable for vacuum applications, because they don't require a pressure differential to operate. The pressure drop in a vacuum system is often only a few tenths of a bar. Therefore, valves that require an internal pilot pressure to open aren't suitable. The vacuum line must be connected to the output of the valve, so that the direction of flow is always from the inlet to the outlet port of the valve. 2-Way valves have two ports and can be normally closed (NC) or normally open (NO). 3-Way valves have three ports and can have different circuit functions. The article Solenoid valves for vacuum provides more background information.