# Data Sync Overview

The Onboarded™ application synchronizes data from the Onboarded™ platform to Salesforce using a batch processing architecture.

## Sync Architecture

### Phase 1: Data Sync

Fetches data from Onboarded™ API and creates/updates records in Salesforce.

### Phase 2: Link Resolution

Resolves lookup relationships between synced records (e.g., linking Employees to Employers).

## Sync Order

Objects are synced in a specific order to ensure parent records exist before child records:

1. **Employers** — Parent records for employees
2. **Employees** — Core worker records
3. **Clients** — Client organizations
4. **Jobs** — Job/position definitions
5. **Forms** — Form templates
6. **Placements** — Employee-Job assignments
7. **Tasks** — Onboarding tasks
8. **Placement Forms** — Form instances (optional)


## Sync Options

In the Onboarded™ Setup interface, you can configure which objects you want to sync with your Salesforce org. Each object type can be individually enabled or disabled based on your organization's needs.

## Link Data Option

The Setup interface also provides an option to **Link Data**. This is a separate batch operation that runs after the sync batches complete.

If you have configured any relationship fields in your mappings, the Link Data operation will populate the Lookup and Master-Detail fields to establish the proper relationships between records. For example, linking Employee records to their associated Employer records.

> **Tip:** Enable the Link Data option if your mapping configuration includes relationship fields that need to be populated after records are synced.


## Sync Coverage

Each sync operation:

- Calls the Onboarded™ API with pagination (up to 100 records per page)
- Matches records by Onboarded™ ID (unique identifier)
- Creates new records or updates existing ones based on mapping rules
- Respects Data Authority settings for conflict resolution
- Updates last sync timestamp on each record