Bridging the gap between high-vacuum soft X-ray absorption spectroscopy and real systems under ambient conditions probes chemical reactions in situ during deposition and annealing processes. The origin of highly efficient buffer layers in Zn(S,O) is the complex formation between Zn(2+) and the S=C group of thiourea (see schematic), which allows ligand-to-metal and metal-to-ligand charge transfer (LMCT and MLCT).