We investigate the topological theory obtained by twisting the N=(2,2) supersymmetric nonlinear sigma model with target a bihermitian space with torsion. For the special case in which the two complex structures commute, we show that the action is a Q-exact term plus a quasi-topological term. The quasi-topological term is locally given by a closed two-form which corresponds to a flat gerbe-connection and generalises the usual topological term of the A-model. Exponentiating it gives a Wilson surface, which can be regarded as a generalization of a Wilson line. This makes the quantum theory globally well-defined.