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

# Syncing Contracts

> Run syncs, preflight checks, approval workflow, and conflict resolution

## When to Run a Sync

Run a sync **after** you have completed [linking](/projects/settings/integrations/curve/linking-overview) in the recommended order (entities → catalog → contracts) and addressed any [contract alerts](/projects/settings/integrations/curve/contract-alerts) you care about. Syncs push contract data (and related sales terms, participation rates, cost rules) from Royaltyport to Curve. Only contracts that pass preflight checks are included.

## Run Tab Structure

Under **Curve** → **Run** you’ll see:

* **New Run** — Start a new sync (wizard: settings → testing → start).
* **Batch Approval** — For **manual** runs: review and approve pending batches before sync. This tab is disabled when there is no batch needing approval.

## Step 1: Settings

* **Integration mode** — Choose how this run is executed:
  * **Automatic** — Sync runs in the background; no approval step. You get a toast when the run is started.
  * **Manual** — A batch is created; you must review and approve (and resolve any conflicts) in **Batch Approval** before the sync is executed.
* **Contract selection** — Select which contracts to include. The list shows contracts that are **eligible** for a Curve run (e.g. not already linked, or eligible for update). You can multi-select and use filters (file name, type, group). Selecting a group can auto-select its contracts.
* **Continue** is enabled when at least one contract is selected, a mode is chosen, and you’re not blocked by a pending batch (see below).

If you have a **pending batch** (e.g. a manual batch not yet approved or synced), the wizard may block starting a new run until you handle it. Use **View Batch** to go to **Batch Approval**.

## Step 2: Testing (Preflight Checks)

After you continue from Settings, the integration runs **preflight checks** for each selected contract. Only contracts that **pass** all checks can be synced.

### Preflight Checks (in order)

| Check                      | Failure meaning                                                                                                    |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| 1. Already linked          | Contract is already linked to Curve (may be skipped or used for updates depending on configuration).               |
| 2. API credentials         | One or more of the four Curve API credential fields are missing for the contract’s account type (Label/Publisher). |
| 3. Integration enabled     | Curve integration is not enabled for the contract’s account type.                                                  |
| 4. Accounting period       | Contract has no accounting period or it’s not one of: yearly, half-yearly, quarterly, monthly.                     |
| 5. Recurring payment type  | Contract has no recurring payment type or it’s not royalty or profit share.                                        |
| 6. Publisher: compositions | Publisher contract has no compositions linked.                                                                     |
| 7. Label: recordings       | Label contract has no recordings linked.                                                                           |

You can filter the results by file name, contract type, status (passed/failed), and failure type. The table shows each contract, its status, and actions. **Start Run** is enabled only when at least one contract has passed; only passed contracts are included in the run.

## Starting the Run

Click **Start Run**:

* **Automatic mode** — The sync is triggered in the background. You see a confirmation toast and the wizard resets. No approval step.
* **Manual mode** — A batch is created and you’re taken to **Batch Approval**. You must review each contract’s actions, resolve any conflicts, and approve (or dismiss/cancel) before the sync runs.

## Manual Mode: Batch Approval

In **Run** → **Batch Approval** you’ll see the current batch and per-contract actions (grouped by contract number). Statuses include:

* **Pending** — Waiting for your approval.
* **Completed** — Approval step done; sync may be in progress or done.
* **Failed** — The run or sync step failed.
* **Sync failed** — Approval succeeded but the actual sync to Curve failed (you may see **Retry**).

Buttons:

* **Approve** — Approve this contract’s actions (disabled if failed, cancelled, or has unresolved conflicts).
* **Dismiss** — Dismiss from the batch (disabled if there are unresolved conflicts).
* **Retry** — For sync failures, retry the sync.
* **Cancel** — Remove the run from the batch.

The **banner** at the top can show counts (e.g. approved, pending, dismissed, conflicts, sync failed) and:

* **Approve All** — Approve all pending runs that have no conflicts.
* **Cancel** — Dismiss the entire batch (with confirmation).
* **Sync** — Start the sync for all approved items (disabled if none are ready or the batch is invalid).

## Conflict Resolution (Sales Terms and Costs Terms)

For **manual** runs, if the integration detects **conflicts** (e.g. multiple Royaltyport rules mapping to the same Curve criteria with different rates), you must resolve them before approving.

* Each conflict card shows the **RP side** (effective rate, rule type, description) and the **Curve side** (catalog type, group, territory, channel, etc.).
* **Per rule** you can **Remove** (with confirmation) or **Edit** (open the conflict rule editor and adjust the mapping).
* Resolving is done via **Remove** or **Edit**; when all conflicts are resolved, **Approve** becomes available.

Costs conflicts may also be shown; resolve them in the same flow so the batch can be approved and synced.

### Editing Escalation Rules

When you open the rule editor via **Edit**, you can view and modify the **escalation rules** attached to that sales or costs term. Escalations define tiered rates that apply once certain conditions are met.

Each escalation row has:

* **Condition type** — Choose **Threshold** or **Date**.
  * **Threshold** — The escalation triggers when a tracked value (Net, Gross, or Units) exceeds or falls below a threshold amount. Fields: Tracker Name (a custom label, e.g. `net_over_250`), Type (Net / Gross / Units), When (Greater Than / Less Than), and Threshold value.
  * **Date** — The escalation triggers after a specific date. Fields: Tracker (for sales terms: **Sale Date** or Reporting Date; for costs terms: **Cost Date** or Reporting Date) and the trigger Date.
* **Rate (%)** — The royalty or cost rate that applies when the condition is met.

Use the **+ Threshold Escalation** or **+ Date Escalation** buttons to add new rows. Use the trash icon to remove a row. Save your changes to update the rule.

## Next Steps

<Card title="Contract Alerts" icon="alert-triangle" href="/projects/settings/integrations/curve/contract-alerts">
  Review differences after syncing.
</Card>

<Card title="Linking Overview" icon="link" href="/projects/settings/integrations/curve/linking-overview">
  Keep linking up to date for new contracts and catalog.
</Card>
