Indeed, the valves must be in working order, and there must be enough blood in the vessels to close the circuit and prime the pump. I don't know if it was confirmed, but while I was a student, there were strong suspicions that blood in the whole thorax (pulmonary circulation), not only in the heart, contributed to the assisted flow.
Another fun fact: CPR is more efficient if you use a plunger to perform the chest compressions, because you can push and pull it, thus not only pumping blood out of the heart (through the arteries), but also actively sucking it back in (from the veins).
As a consequence, at the end of a cycle, there is more blood in the chest to be pumped out on the next one.