Configure automated sync jobs to keep your Salesforce data current with Onboarded™.
Important: Batch jobs run as the user who schedules them. Ensure this user has the Onboarded™ Admin permission set and access to all objects/fields being synchronized. See the Execution Context page for details.
- Open Onboarded™ Setup. Navigate to the Onboarded™ Setup tab.
- Go to Scheduled Jobs Tab. Click on the Scheduled Jobs section.
- Configure Schedule. Set your preferred schedule using the CRON expression builder or presets.
- Save and Enable. Save your configuration and enable the scheduled job.
Alternative — Manual Scheduling via Setup. You can also schedule jobs manually from Setup → Apex Classes → Schedule Apex. If you use this method, the Onboarded™ Setup UI will still detect the scheduled job and update accordingly, as long as the job name starts with "Onboarded" (e.g., "OnboardedSyncScheduler"). Jobs scheduled with other names will run but won't be reflected in the Onboarded™ Setup interface.
Schedule Daily at 2 AM
// Schedule default daily sync at 2:00 AM
OnboardedSyncScheduler.scheduleDaily();Custom CRON Schedule
// Schedule every 4 hours
OnboardedSyncScheduler.scheduleWithCron('0 0 0,4,8,12,16,20 * * ?');
// Schedule weekdays at 6 AM
OnboardedSyncScheduler.scheduleWithCron('0 0 6 ? * MON-FRI');View Active Schedules
// List all scheduled Onboarded jobs
List<CronTrigger> jobs = OnboardedSyncScheduler.getScheduledJobs();
for (CronTrigger job : jobs) {
System.debug(job.CronJobDetail.Name + ' - Next: ' + job.NextFireTime);
}Remove All Schedules
// Unschedule all Onboarded sync jobs
OnboardedSyncScheduler.unscheduleAll();Important — Scheduled Jobs Run As The Scheduling User. Salesforce scheduled jobs execute in the security context of the user who scheduled them. This affects CRUD/FLS permissions, sharing rules, and record access.
Best practices:
- Schedule jobs using an integration user or system administrator account with appropriate data access
- Avoid scheduling under individual user accounts that may be deactivated — deactivating the scheduling user will cause the job to fail
- If the scheduling user leaves the organization, reassign or reschedule the job under an active admin account
| Schedule | CRON Expression |
|---|---|
| Daily at 2:00 AM | 0 0 2 * * ? |
| Every 6 hours | 0 0 0,6,12,18 * * ? |
| Weekdays at 7:00 AM | 0 0 7 ? * MON-FRI |
| Every hour | 0 0 * * * ? |
| Sunday at midnight | 0 0 0 ? * SUN |
The Batch Size setting controls how many records are processed in each batch execution during sync operations. This setting is configurable in the Onboarded™ Setup interface.
| Setting | Details |
|---|---|
| Valid Range | 1 to 2000 records per batch |
| Default Value | 200 records |
- Decrease batch size if you encounter governor limit errors (CPU time, heap size, SOQL queries) due to complex triggers, validation rules, or automation on the target objects
- Increase batch size if sync operations are taking too long and you have minimal automation on target objects
Tip: Start with the default value of 200. If you experience governor limit issues, try reducing to 100 or 50. Only increase above 200 if you have tested thoroughly and confirmed your org can handle larger batches.
Batch Sync Exemption Rules allow you to exclude specific records from being synced based on field values in the Onboarded™ API response. This is useful when you want to filter out certain records before they are created or updated in Salesforce.
When a sync batch runs, API records are checked against active exemption rules before being processed. Records that match any active exemption rule are excluded from the sync operation.
Exemption rules can be configured in the Onboarded™ Setup interface. Each rule requires:
| Field | Description |
|---|---|
| Onboarded™ Object | The Onboarded™ object type this rule applies to (e.g., Employee, Employer, Task) |
| Onboarded™ API Field | The API field name to evaluate. Supports nested fields using dot notation (e.g., status, address.city) |
| Match Type | How to evaluate the field value (see match types below) |
| Exemption Value | The value to match against (required for "equals" match type) |
| Is Active | Toggle to enable or disable the rule |
| Match Type | Description | Example Use Case |
|---|---|---|
equals | Field value exactly matches the exemption value | Exclude employees where status equals terminated |
isBlank | Field value is null, empty, or whitespace | Exclude records where email is blank |
isNotBlank | Field value is not null and not empty | Exclude records that have a do_not_sync flag populated |
- Exclude terminated employees: Onboarded™ Object = Employee, API Field =
status, Match Type = equals, Value =terminated - Exclude test records: Onboarded™ Object = Employee, API Field =
email, Match Type = equals, Value =test@example.com - Exclude records without email: Onboarded™ Object = Employee, API Field =
email, Match Type = isBlank
Note: Exempted records are counted in sync statistics but are not created or updated in Salesforce. If an exemption rule is later deactivated or removed, previously exempted records will be synced on the next batch run.