> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withleaf.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Customizing Data Sync

> Control which boundaries, files, and operations Leaf syncs from providers, including organization filtering, custom data sync, and processing range options.

Leaf's configurations let you control which field boundaries, machine files, and field operations are pulled from providers, how broadly it syncs across organizations, and how far back it looks for historical data. These settings directly affect processing volume and billing, so getting them right matters.

Configurations can be set at the API owner level (defaults for all Leaf users) or overridden per Leaf user. Changes are not retroactive — they only affect data processed after the change.

## Controlling field synchronization

### fieldsAutoSync

Default: `true`

When enabled, Leaf automatically syncs field boundaries from connected providers. The initial sync happens when a Leaf user's provider credentials are connected, then at least every 24 hours (or sooner if the provider supports event-driven updates).

Set to `false` if you want to trigger sync manually through the Manual Sync endpoint.

### customDataSync

Default: `true`

This is Leaf's most powerful tool for controlling data volume. When enabled, Leaf fetches fields in preview mode only — no boundaries are fully resolved, no machine files are processed. You then select which fields to fully process.

This is useful when:

* You only need a subset of a grower's fields.
* You're connecting accounts with hundreds of fields and want to avoid processing (and paying for) all of them.
* You want to preview what's available before committing to full processing.

When you change this from `true` to `false`, previously previewed fields can be fully processed using the Manual Sync endpoint.

### fieldsAutoMerge and fieldsMergeIntersection

`fieldsAutoMerge` (default: `false`) — when enabled, Leaf automatically merges fields whose boundaries intersect above the threshold defined by `fieldsMergeIntersection`.

`fieldsMergeIntersection` (default: `0.01`) — the minimum intersection percentage required to trigger a merge. When fields meet this threshold and auto-merge is enabled, Leaf creates a new `MERGED` field. The original fields remain inactive for historical reference.

### fieldsAttachIntersection

Default: `0.01`

The minimum intersection percentage required to link a machine file to a field. If the overlap between the file's data points and a field boundary exceeds this threshold, Leaf associates the file with that field. `0.01` represents the smallest possible overlap.

### automaticFixBoundary

Default: `true`

Leaf automatically attempts to correct invalid boundary geometries received from providers (self-intersections, duplicate vertices, etc.). Leave this enabled unless you have a specific reason to preserve raw geometries.

## Controlling organization scope

### organizationDataSync

Default: `ALL`

This setting matters for John Deere accounts where a single grower may have access to multiple organizations. By default, Leaf syncs data from all of them.

Set to `SELECTED_ONLY` to sync only from organizations you explicitly mark as `SELECTED` through the Organization Sync endpoints. This prevents Leaf from processing data across organizations the grower has access to but you don't need.

### syncPartnerData

Default: `false`

When enabled, Leaf fetches shared or partner data — for example, from John Deere Operations Center partnerships or Ag Leader shared accounts. Only works if the necessary permissions are granted.

Leave this `false` unless you specifically need partner-shared data. Enabling it can significantly increase the volume of data Leaf processes.

## Controlling operation processing

### operationsAutoSync

Default: `true`

When enabled, Leaf automatically syncs operations from connected providers. Disable if you only want field boundaries and plan to upload machine files manually.

### operationsProcessingRange

Default: 12 months

The lookback period for fetching operations from providers. Leaf only processes operations created or updated within this window. Shorter windows mean less data to process and lower billing. Longer windows give you more historical coverage.

Set this based on your use case: crop insurance programs might need only the current season (6-12 months), while FMIS platforms might need 2-3 years.

### fieldOperationCreation

Default: `true`

When enabled, Leaf automatically creates field operations by merging machine files with field boundaries. Disable if you only need raw machine file outputs without the spatial allocation to fields.

### operationsMergeRange

Default: 5 days

The time window for grouping machine files into a single non-harvest field operation. Files for the same field, crop, and operation type within this window are merged into one operation.

### operationsMergeRangeHarvested

Default: 21 days

The time window for grouping machine files into a single harvest field operation. Longer than the non-harvest window because harvest operations commonly span more days.

### splitOperationsByField

Default: `true`

Creates separate field operations for each distinct field boundary that intersects with the machine data. If disabled, data intersecting multiple boundaries may be combined into a single operation.

### splitOperationsByProvider

Default: `true`

Groups machine files by provider when creating field operations. If disabled, Leaf merges data from different providers into the same field operation when other criteria (field, crop, operation type, date) match.

### splitOperationsByTillType

Default: `false`

Creates separate field operations for each unique tillage type found in the machine data. Enable if your application needs to distinguish between tillage methods.

## Controlling other data types

### implementsAutoSync, machinesAutoSync, operatorsAutoSync, productsAutoSync, zonesAutoSync

All default to `false`. Enable these to automatically sync the corresponding metadata from providers. `productsAutoSync` currently applies to John Deere only.

## Practical patterns

**Minimize billing during development:** Set `customDataSync` to `true` and `organizationDataSync` to `SELECTED_ONLY`. Only fully process the few fields you need for testing.

**Full automation for production:** Set `customDataSync` to `false` (or selectively enable fields after preview), `fieldsAutoSync` to `true`, and `operationsAutoSync` to `true`. Configure `operationsProcessingRange` to cover the historical window you need.

**Selective field processing:** Enable `customDataSync`, preview all available fields, then use the Manual Sync endpoint to fully process only the ones your application needs.

## What to read next

* [Integration Planning](/guides/planning/integration-planning) — the full planning checklist
* [Configuration reference](/configuration/overview) — all available configuration options
