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

# Return Prime

> Connect Return Prime to Ocular using an App Access Token from a Return Prime custom app to sync returns, exchanges, and refund data into your reports.

**Required fields in Ocular:**

* **App Access Token** – the Admin API access token from a Return Prime custom app

Follow the steps below to grab the access token and paste it into **Data Management → Connectors → Add connector → Return Prime**.

<CardGroup cols={2}>
  <Card title="What you need" icon="key">
    An App Access Token from a Return Prime custom app.
  </Card>

  <Card title="What it unlocks" icon="rotate-left">
    Return-reason breakdown in Quickstart Reports → Sales, returns-by-SKU analysis, and refund attribution in the P\&L.
  </Card>
</CardGroup>

***

## <Icon icon="key" /> Step 1 · Generate an App Access Token in Return Prime

Follow these steps to create a custom app and generate an access token.

<Steps>
  <Step title="Open Return Prime" icon="arrow-up-right-from-square">
    Log in to your Return Prime dashboard.
  </Step>

  <Step title="Open Settings" icon="gear">
    Navigate to **Settings** at the bottom of the left sidebar.
  </Step>

  <Step title="Go to Integrations → Develop apps" icon="hammer">
    Go to the **Integrations** section and click **Develop apps**.

    {/* TODO: image asset missing — /images/tww1-(1).png not present in repo. Re-add when available. */}
  </Step>

  <Step title="Go to Integrations → Develop apps" icon="hammer">
    Go to the **Integrations** section and click **Develop apps**.

    <Frame caption="Settings → Integrations">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/RP-settings.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=36ae7eae966586f8573b2c59eef52c38" alt="RP Settings" width="1911" height="873" data-path="RP-settings.png" />
    </Frame>

    <Frame caption="Integrations → Develop apps">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/RPDevelopapps.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=4507174f7aaf55c24f565167079c5516" alt="RP Developapps" width="1903" height="855" data-path="RPDevelopapps.png" />
    </Frame>
  </Step>

  <Step title="Create new app" icon="plus">
    Click **Create new app**.

    Enter an app name (e.g., *Ocular Analytics*) and click **Create app**.
  </Step>

  <Step title="Create new app" icon="plus">
    Click **Create new app**.

    <Frame caption="Develop apps → Create new app">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/RPcreateapp.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=cdac0ef1acb4505c11c6427bab639629" alt="R Pcreateapp" width="1918" height="894" data-path="RPcreateapp.png" />
    </Frame>

    Enter an app name (e.g., *Ocular Analytics*) and click **Create app**.
  </Step>

  <Step title="Open API credentials" icon="key">
    Once the app is created, navigate to the **API credentials** tab.
  </Step>

  <Step title="Open API credentials" icon="key">
    Once the app is created, navigate to the **API credentials** tab and copy the access token

    <Frame caption="API credentials → Admin API access token">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/RPaccesstoken.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=6aa5a6f1dd1839ae7c0533692fda150d" alt="R Paccesstoken" width="1908" height="877" data-path="RPaccesstoken.png" />
    </Frame>
  </Step>

  <Step title="Copy the Access Token" icon="copy">
    Copy the **Access Token** that appears.

    <Warning>
      Save this token securely elsewhere as you may only be able to view it once. If you lose the token, you'll need to regenerate it from the custom app settings — all previous tokens will be invalidated.
    </Warning>

    <Tip>
      If you ever lose the token, regenerate a fresh one from the app's API credentials tab. All previous tokens will be invalidated.
    </Tip>
  </Step>
</Steps>

***

## <Icon icon="plug" /> Step 2 · Plug the credentials into Ocular

<Steps>
  <Step title="Open the connector form" icon="window">
    In Ocular, navigate to **Data Management → Connectors → Add connector → Return Prime**.
  </Step>

  <Step title="Open the connector form" icon="window">
    In Ocular, navigate to **Data Management → Connectors → Add connector → Return Prime**.

    <Frame caption="Add connector → Return Prime">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/RPOC.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=a19c2fae7881638919d0c8dfbec07bc4" alt="RPOC" width="1912" height="876" data-path="RPOC.png" />
    </Frame>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        Free-form label.
      </Card>

      <Card title="Connector Identifier" icon="hashtag">
        Auto-generated by Ocular.
      </Card>

      <Card title="Start Date" icon="calendar">
        YYYY-MM-DD — how far back in time Ocular should pull data from your Return Prime account. Choose a date from which you want to begin analyzing your return and exchange data.
      </Card>

      <Card title="Lookback Days" icon="clock-rotate-left">
        The number of past days from which data will be fetched during synchronization. This ensures that recent historical data is included and kept up to date. Default is 30 days.
      </Card>

      <Card title="Schedule Frequency" icon="repeat">
        Defines how often the connector will automatically sync data. Configured using a numeric value (frequency) along with a time unit (e.g., hours), determining the interval between each sync cycle.
      </Card>

      <Card title="Auto Sync" icon="toggle-on">
        Automatically triggers synchronization when the connector is enabled.
      </Card>

      <Card title="App Access Token" icon="key">
        The token you just copied from Return Prime.
      </Card>
    </CardGroup>
  </Step>

  <Step title="Fill the fields" icon="pen-to-square">
    <CardGroup cols={2}>
      <Card title="Connector Name" icon="tag">
        Free-form label.
      </Card>

      <Card title="Connector Identifier" icon="hashtag">
        Auto-generated by Ocular.
      </Card>

      <Card title="Start Date" icon="calendar">
        YYYY-MM-DD — how far back in time Ocular should pull data from your Return Prime account. Choose a date from which you want to begin analyzing your return and exchange data.
      </Card>

      <Card title="Lookback Days" icon="clock-rotate-left">
        The number of past days from which data will be fetched during synchronization. This ensures that recent historical data is included and kept up to date. Default is 30 days.
      </Card>

      <Card title="Schedule Frequency" icon="repeat">
        Defines how often the connector will automatically sync data. Configured using a numeric value (frequency) along with a time unit (e.g., hours), determining the interval between each sync cycle.
      </Card>

      <Card title="Auto Sync" icon="toggle-on">
        Automatically triggers synchronization when the connector is enabled.
      </Card>

      <Card title="App Access Token" icon="key">
        The token you just copied from Return Prime.
      </Card>
    </CardGroup>

    <Frame caption="Return Prime connector form — paste the App Access Token">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/RPpaste-token.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=12471cb0962a503b4be77cdcf06ff550" alt="R Ppaste Token" width="1915" height="868" data-path="RPpaste-token.png" />
    </Frame>
  </Step>

  <Step title="Create the connector" icon="circle-check">
    Click **Create Connector**. Ocular stores the token in its encrypted vault and triggers the first sync.
  </Step>

  <Step title="Create the connector" icon="circle-check">
    Click **Create Connector**. Ocular stores the token in its encrypted vault and triggers the first sync.

    <Frame caption="Connector created — data will begin syncing shortly">
      <img src="https://mintcdn.com/ocular/q-V-PFkPr0MOCSrr/successRP.png?fit=max&auto=format&n=q-V-PFkPr0MOCSrr&q=85&s=db0601654bf8e7d8c26dfd99c4e77f73" alt="Success RP" width="1495" height="801" data-path="successRP.png" />
    </Frame>
  </Step>
</Steps>

***

## <Icon icon="life-ring" /> Troubleshooting

<AccordionGroup>
  <Accordion title="Token isn't accepted" icon="triangle-exclamation">
    Re-copy the token — watch for leading/trailing spaces. If the issue persists, regenerate the token from the custom app's API credentials tab (this invalidates all previous tokens).
  </Accordion>

  <Accordion title="Lost the token" icon="key">
    Open the custom app in Return Prime, go to **API credentials**, and click regenerate. Paste the new token into the Ocular connector form and re-save.
  </Accordion>

  <Accordion title="Returns missing from older orders" icon="clock-rotate-left">
    Increase **Lookback Days** — returns are often initiated weeks after the original purchase, especially during sale windows. 60–90 days is common for brands with long return policies.
  </Accordion>
</AccordionGroup>

<Note>
  For ticket-writing format when filing a connector issue, see [Working with the Ocular team → Connector-not-working tickets](/overview/working-with-the-ocular-team).
</Note>
