iSyncSFDocumentation

#Cleanup & Maintenance

iSyncSF generates audit logs, application logs, and sync job records during every sync operation. Over time these records consume Salesforce data storage and can impact query performance. This guide covers how to manage data retention using both scheduled and manual cleanup tools.


#Why Regular Cleanup Matters

Every sync operation creates records that track what happened during the job. While these records are essential for monitoring, troubleshooting, and rollback, they accumulate quickly:

Without regular cleanup, these records consume Salesforce data storage, slow down list views and reports on iSyncSF objects, and can push your org toward storage limits. Additionally, audit log records are required for rollback and retry operations — but only for recent sync jobs. Retaining audit logs indefinitely provides no benefit and creates unnecessary storage pressure.


#Application Log Cleanup

Manual Cleanup

Each DataSyncTemplate record page includes a Delete Application Logs button in the toolbar. Clicking this button opens a confirmation dialog, and upon confirmation, deletes all Application Log records associated with that specific template.

Automatic Pre-Sync Cleanup

iSyncSF automatically clears old Application Log records for a template before starting a new sync run (except on retry operations). This ensures that logs from previous runs do not accumulate indefinitely, even if you never use the manual delete button.

Scheduled Cleanup

The Application Log Cleanup Job runs on a configurable CRON schedule (default: daily at 3:00 AM) and removes Application Log records older than the configured retention period (default: 60 days). See the Scheduled Cleanup Jobs section below for configuration details.


#Audit Log Retention

DataSyncAuditLog records are the most storage-intensive objects in iSyncSF. Each record stores the source record ID, destination record ID, status code, error messages, and relationship metadata. A single sync operation creates one audit log record for every record processed.

Default Retention

The default retention period for audit logs is 90 days. Records older than 90 days are automatically purged by the scheduled cleanup job.

Important Considerations


#Scheduled Cleanup Jobs

iSyncSF includes three pre-configured scheduled cleanup jobs that run automatically once enabled. These jobs are managed through the Setup Assistant under the Scheduled Jobs tab.

Job Name Object Cleaned Default Retention Default Schedule
Audit Log Cleanup DataSyncAuditLog 90 days Daily at 2:00 AM
Application Log Cleanup ApplicationLog 60 days Daily at 3:00 AM
Sync Job Cleanup DataSyncJob 180 days Weekly on Sunday at 4:00 AM

Enabling Cleanup Jobs

  1. Open the iSyncSF app and navigate to the Setup Assistant.
  2. Go to the Scheduled Jobs tab.
  3. Click Apply Recommended Settings to enable all three cleanup jobs with their default retention periods and schedules.
  4. Alternatively, configure each job individually by setting a custom CRON expression and retention period (in days).

Customizing Retention Periods

You can adjust the retention period for each cleanup job from the Scheduled Jobs tab. For example:

Staggered Scheduling

The three cleanup jobs are scheduled at different times (2 AM, 3 AM, and 4 AM) to avoid competing for batch job slots. Salesforce allows a maximum of five concurrent batch jobs, and cleanup jobs should not interfere with active sync operations. If you customize the schedules, maintain at least a one-hour gap between cleanup jobs.

Managing Scheduled Jobs

From the Scheduled Jobs tab in the Setup Assistant, you can:


#Manual Cleanup Options

In addition to scheduled cleanup, iSyncSF provides several manual cleanup options:

Delete Application Logs for a Specific Template

Navigate to any DataSyncTemplate record page and click the Delete Application Logs button. This removes all Application Log records linked to that template, which is useful for clearing logs before a fresh sync run or after investigating an issue.

Legacy Data Cleanup

For advanced cleanup scenarios, iSyncSF includes a legacy cleanup tool that can:

Bulk Record Deletion via Data Loader

For very large volumes of audit log records that need to be removed quickly, you can use Salesforce Data Loader to export and bulk-delete DataSyncAuditLog records. This approach is faster for one-time cleanup of millions of records but requires familiarity with Data Loader operations.

Review Storage Usage

Monitor your Salesforce data storage from Setup → Storage Usage. Look for growth in the Custom Objects category, which includes all iSyncSF objects. If storage is approaching limits, reduce retention periods or run a manual cleanup.


#Storage Impact Estimates

Use these rough estimates to plan your storage needs and cleanup schedules:

Object Approximate Size per Record Example: 100,000 records synced
DataSyncAuditLog ~2 KB ~200 MB
ApplicationLog ~1 KB ~50 MB (varies by log level)
DataSyncJob + Child Jobs ~1 KB per child job ~5 MB

Each synced record generates approximately one audit log record at roughly 2 KB. A 100,000-record sync therefore creates approximately 200 MB of audit log data. For orgs running daily syncs at this volume, audit logs alone can accumulate several gigabytes per month without cleanup.

Recommendations