How to design retries for business automations
Give automated workflows a recovery plan for temporary failures, rejected records, and requests with an uncertain outcome.
Sort failures by what can change
A temporary service interruption may clear in a few minutes. A rejected invoice with a missing customer reference needs a correction. Classifying these as separate cases helps the system retry work that may recover and bring a human in when input needs attention.
List the signals that indicate each class. For example, your connector can distinguish a temporary availability response, a rate limit, an invalid submission, and a missing permission. Decide how the job should behave when it receives a response it cannot classify.
Give retries a budget
Space retries farther apart after each failed attempt. Add a small random delay when many jobs may fail together. Follow any wait period the destination requests for rate limits so the integration does not keep sending traffic before the limit resets.
Set a maximum age or number of attempts that matches the business deadline. A ticket that must reach support within a working day can be handed to an operator once waiting longer would delay a response to the customer.
Resolve uncertain outcomes before repeating writes
A request can time out after the destination already accepted it. Sending a second create request may add a duplicate record. Use a stable request key when supported, or look up the destination record by a unique reference before repeating the action.
Use the same key and the same intended action for retries. If someone edits a failed request and changes its business meaning, decide whether it should become a new operation with its own reference and review history.
Give the operator a useful recovery path
Once a job exhausts its retries, show the affected record, last error, number of attempts, and next action. Allow an operator to correct a record and replay it, or close the exception with a reason when the work was resolved elsewhere.
Test recovery by simulating a brief outage and an error that needs manual repair. Check that temporary failures resume, rejected records remain visible, and an operator can handle one problem without resubmitting the entire queue.