> ## 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.

# Catalog Acquisition Sync

> Reconcile a newly acquired catalog against an external CRM with three-tier matching and human review

When a label acquires another label's catalog, the back-office team needs to reconcile the newly ingested recordings against their existing data in an external system (e.g. Dynamo, a custom CRM, or a data warehouse). This example uses two automations inside a single composer: the first imports the external roster into an automation database, and the second matches Royaltyport recordings against that local copy.

## Trigger

**Manual** — run on demand after an acquisition closes, or when a new batch of catalog data is ready to reconcile.

## Composer Structure

This workflow uses a [Composer](/automations/composers) with two automations in sequence:

1. **Import External Roster** — fetches the external system's data and stores it locally
2. **Match & Sync** — matches Royaltyport catalog against the imported data and syncs results back

## Automation 1: Import External Roster

<Steps>
  <Step title="Fetch external data">
    An [API Request](/automations/steps/http-request) step calls the external system's API (e.g. Dynamo, a custom CRM, or a data warehouse endpoint) to pull the current artist and track roster — names, ISRCs, UPCs, and any internal IDs.
  </Step>

  <Step title="Loop and store">
    A [Loop](/automations/steps/loop) step iterates over the response. Inside each iteration, a [Database](/automations/steps/database) step upserts each record into an [automation database](/automations/databases) table (e.g. `external_roster`) with columns for external ID, artist name, track title, ISRC, and UPC.
  </Step>
</Steps>

<Tip>
  By storing the external roster in an automation database first, the matching automation can query it directly without making repeated API calls per recording. This also gives you a browsable snapshot of the external data in the [database editor](/automations/databases#editing-a-database).
</Tip>

## Automation 2: Match & Sync

<Steps>
  <Step title="Pull Royaltyport catalog">
    An [API Request](/automations/steps/http-request) step with the **Royaltyport API** preset pulls the newly ingested catalog — recordings, ISRCs, artist names, and metadata.
  </Step>

  <Step title="Loop over recordings">
    A [Loop](/automations/steps/loop) step iterates over each Royaltyport recording. Inside the loop, a three-tier matching cascade runs against the `external_roster` table:

    1. **Absolute match** — a [Code](/automations/steps/code) step queries the automation database for an exact ISRC or UPC match.
    2. **Embedding search** — if no exact match is found, a [Transformer](/automations/steps/transformer) step performs a semantic similarity search against the artist names and track titles in the `external_roster` table.
    3. **Confidence scoring** — for candidates found via embedding, a [Validator](/automations/steps/validator) step evaluates the match and outputs `match: true/false` with a `confidence` score.
  </Step>

  <Step title="Human review for low confidence">
    [Branch](/automations/steps/overview#branches--conditions) on the confidence score. Scores below **0.9** route to a [Review](/automations/steps/review) step (wait mode), where the catalog team can inspect the candidate and approve or reject the match.
  </Step>

  <Step title="Sync to external system">
    Branch on the final match result:

    * **Match found** — an [API Request](/automations/steps/http-request) step updates the existing record in the external system with all Royaltyport values (metadata, rights, identifiers), using the external ID from the matched `external_roster` row.
    * **No match** — an [API Request](/automations/steps/http-request) step creates a new record in the external system from the Royaltyport data.
  </Step>
</Steps>

## Key Features Used

* [Composer](/automations/composers) with two sequenced automations (import, then match)
* [Automation database](/automations/databases) as a local cache of external data
* [Branching](/automations/steps/overview#branches--conditions) to route by confidence score and match result
* [Review step](/automations/steps/review) with wait mode for human-in-the-loop approval
* [Royaltyport API](/automations/steps/http-request#royaltyport-api) preset for authenticated catalog queries
* Three-tier matching: exact → semantic → validated

## Related Documentation

<CardGroup cols={2}>
  <Card title="Databases" icon="database" href="/automations/databases">
    Create and manage the automation database for external roster data.
  </Card>

  <Card title="Branching" icon="git-branch" href="/automations/steps/overview#branches--conditions">
    Route workflows based on step output values.
  </Card>

  <Card title="Review" icon="eye" href="/automations/steps/review">
    Pause workflows for human approval.
  </Card>

  <Card title="More Examples" icon="lightbulb" href="/automations/examples/overview">
    Browse all example workflows.
  </Card>
</CardGroup>
