  We develop an approach based on stochastic quantum trajectories for an
incoherently pumped system of interacting bosons relaxing their energy in a
thermal reservoir. Our approach enables the study of the versatile coherence
properties of the system. We apply the model to exciton polaritons in a
semiconductor microcavity. Our results demonstrate the onset of macroscopic
occupation in the lowest-energy mode accompanied by the establishment of both
temporal and spatial coherence. We show that temporal coherence exhibits a
transition from a thermal to coherent statistics and the spatial coherence
reveals off-diagonal long-range order.
