Unjust enrichment is a claim in restitution: the defendant received a benefit at the plaintiff’s expense, in circumstances where retaining it without payment would be unjust. Quantum meruit is the related claim for the reasonable value of services rendered.

It is a fallback, not an alternative. Where an express contract governs the same subject matter, the claim is ordinarily barred — the parties have already allocated the risk. So the claim appears where the contract is unenforceable, void, terminated, or never quite formed.

Typical settings. Work performed under a letter of intent while the definitive agreement was still being negotiated. Services rendered to a party who is not the contract counterparty. Improvements to property under an agreement that fails for the statute of frauds. Payments made by mistake.

Measure of recovery is the value of the benefit conferred, not the plaintiff’s expectation. That is often less than the contract would have paid, which is why it is a fallback.

Pleading in the alternative is permitted and is standard practice: contract claim first, restitution second, with an acknowledgment that success on the first forecloses the second.

Prevention. For anyone doing work before the paperwork is signed, the answer is a short written interim agreement covering scope, rate and what happens if the deal dies. Relying on restitution to fix a missing contract is a poor substitute for having one.