iSyncSFDocumentation

#17. Callback Extensibility System

iSyncSF's Callback Extensibility System lets developers inject custom Apex logic at key points in the sync pipeline. Use source callbacks to filter or transform records before they leave the source org, receiver callbacks to post-process records on the target, and transformation callbacks to normalize data in transit.

Purpose: The callback system allows developers to extend the sync behavior with custom logic at specific points in the sync lifecycle - after data is retrieved, after masking, before sync starts on the target, after each object is synced, and after the entire sync completes. This enables use cases like data normalization, custom validation, triggering downstream processes, or implementing business rules that the standard sync doesn't cover. Where It Fits: Callbacks are a developer-level extension point, not an admin feature. They are configured via Custom Metadata (DataSyncProperties__mdt) and enabled per-object via the Object Setting's "Invoke Callback" checkbox. The callback code runs during sync execution at specific hook points. Developers implement the Callable interface in a custom Apex class and register it in the metadata.

#17.1 Overview

For developers who need to customize sync behavior, the application provides three callback extension points that allow injecting custom logic without modifying the package code.

#17.2 Source Callback

Runs on the source org. Allows manipulation of records: - After Retrieval - Modify records after they are queried from the source, before masking - After Masking - Modify records after masking is applied, before sending to the target

Configuration: - Set the class name in Custom Metadata (DataSyncProperties__mdt -> Source Callback) - Enable per-object via the "Invoke Callback" checkbox on each Object Setting

#17.3 Receiver Callback

Runs on the target/destination org. Provides hooks for: - Pre-Sync - Execute setup logic before any data arrives (e.g., disable triggers) - Post-Sync - Execute cleanup logic after all data is synced (e.g., re-enable triggers, run integrity checks) - Per-Object Post-Insert - Execute logic after each object's records are inserted

Configuration: - Set the class name in Custom Metadata (DataSyncProperties__mdt -> Target Callback)

#17.4 Data Transformation Callback

Runs on the source org between scan and sync phases: - Modify audit log records before data is sent to the target - Override destination record IDs (for custom matching logic) - Runs iteratively until all transformations are complete

Configuration: - Set the class name in Custom Metadata (DataSyncProperties__mdt -> Data Transformation Callback)

#Per-Object Callback Configuration

Callbacks can be enabled or disabled per object using the Invoke Callback toggle in Object Settings. When enabled for a specific object, iSyncSF will invoke the configured callback class during sync operations for that object. When disabled, the callback is skipped — even if a global callback class is configured in Custom Metadata. This gives you fine-grained control over which objects receive custom processing.

#Callback Types Summary