> ## Content Index
> Fetch the complete content index at: https://www.namastesalesforce.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# 03 · Batch sync without tears
- URL: https://www.namastesalesforce.com/training/integration-patterns/batch-sync-without-tears/
- Published: 2025-11-21T09:00:00.000Z
- Updated: 2025-11-21T09:00:00.000Z
- Description: Nightly loads still run the world. Upsert on external IDs, order parents before children, and make reruns safe.
- Author: Swarnil Singhai
- Tags: Integration Patterns, #training, #duration-15m, #Import 2026-09-03 19:13

Nightly loads still run the world. Upsert on external IDs, order parents before children, and make reruns safe.

## External IDs are the contract

Match on the source system's key, never on Salesforce Ids the source does not know. An indexed external ID field per synced object is the whole trick.

## Idempotency first

Design every load so running it twice changes nothing the second time. When (not if) the 2 a.m. job dies halfway, the fix becomes 'run it again' instead of an archaeology project.

## Practice in your org

- Open your Developer Edition org and follow along step by step
- Change one thing at a time and note what happens
- When something breaks, read the error before searching for it