Fix problems

Sync and delete recovery

A delete happens in two parts, so a failure in one part can be retried without repeating the other.

CommandWhat it does
DeleteDocumentCalls QuoteCloud to delete the document.
DeleteDocumentCleanupWorks only in Salesforce: removes the Salesforce File, jobs that no longer apply and the local document.

If the QuoteCloud part fails

The work stays as DeleteDocument. A retry with the same idempotency key returns the original success if it already went through. Using that key for something else returns idempotency_key_reused.

If the Salesforce part fails

The cleanup rolls back, so the local document and File stay in place. The work moves to Failed, then to Dead letter after 5 attempts. Retrying it never calls QuoteCloud again. If cleanup gets stuck in Running, a five-minute lease lets it recover.

Retry it

An admin can retry from Operations & Diagnostics.