Configure Job retention and cleanup
Payload Jobs are useful for support, audit, and troubleshooting, but they should not stay forever in every org.
Every Job can contain request data, response data, query output, target output, error messages, and runtime metrics. That information is valuable when something needs investigation, but it also consumes storage. Job retention is where you decide how long each Payload should keep that level of detail.
Use retention settings to decide how long each Payload keeps New, Completed, and Failed Jobs. Use the cleanup service to remove old Jobs based on those settings.
Where retention is configured
Retention is configured on each Payload.
Open the Payload, select Edit, then review the Job cleanup fields. The settings live on the Payload because different integration steps often need different history. A high-volume status check might only need short retention, while a payment or fulfilment process may need failed Jobs kept for longer.
Retention settings belong to the Payload because different integration steps may need different Job history.
Completed Jobs
Use Delete Completed Jobs when successful runs should be cleaned up automatically.
Set Delete Completed Jobs After (Days) to the number of days Payloads should keep completed Jobs.
Completed Jobs are usually safe to keep for a shorter period because they are mainly used for recent support and evidence of successful delivery. Before reducing retention aggressively, check whether your team relies on completed Job bodies or response data for customer support, reconciliation, or audit work.
Failed Jobs
Use Delete Failed Jobs when failed runs should be cleaned up automatically.
Set Delete Failed Jobs After (Days) to the number of days Payloads should keep failed Jobs.
Failed Jobs are often worth keeping longer than Completed Jobs because they contain error messages, request data, response data, and target output needed for support. If failures are usually investigated by a different team, choose a window that gives them enough time to review the detail before cleanup removes it.
New Jobs
Use Delete New Jobs when queued or unprocessed Jobs should be cleaned up automatically.
Be careful with this setting. A Job in New status may still be waiting for batch processing, or it may indicate that the processing service did not run.
Keep the retention long enough that you can investigate why Jobs are staying New. Removing New Jobs too quickly can hide a queue or Batch Engine issue before anyone has had time to diagnose it.
Start the cleanup service
Open the Home tab and review Cleanup Service.
The cleanup service can be started or stopped from the Home tab. When running, Payloads schedules cleanup and removes Jobs that are older than the configured retention for their Payload and status.
If the Home tab shows cleanup as stopped, old Jobs will remain even if the Payload retention fields are configured. The settings define what should be removed; the service performs the removal.
For Home monitoring, see Monitor the Payloads home tab.
What cleanup does
During cleanup, Payloads checks Jobs for Payloads that have retention settings.
When a Job is old enough to delete, Payloads rolls key counts and metrics into Job Analytics Entry records before deleting the Job. This keeps operational trends available without keeping every detailed Job record.
Cleanup uses the org date context when deciding how old a Job is. After cleanup runs, you should still be able to review trend-level activity on Home, even though the individual old Job records are gone.
Suggested retention approach
Start conservatively.
Keep Failed Jobs longer than Completed Jobs. Keep New Jobs long enough to investigate queue or batch processing problems.
Review storage usage, support needs, and compliance requirements before reducing retention aggressively. If you are unsure, shorten retention gradually and check whether support teams still have the Job detail they need.
What to check
Before enabling cleanup, check that:
each important Payload has explicit retention settings
Failed Jobs are kept long enough for support
New Job retention will not remove queued work before it can run
the cleanup service is running on Home
users who support integrations know that old Job records may be deleted
After cleanup runs, use Home and Job Analytics trends to confirm old activity is still visible at summary level.

