> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/collect-data/shopify/historical-data.md).

# Historical data

Historical data brings your store's past orders, customers, products and other records into Chord, and keeps them in sync. It's what fills your reports with history from before you started sending events.

You set it up by creating a second Shopify app, called **Chord Data Ingestor**, and connecting it in Chord.

{% hint style="info" %}
Historical data and [server events](/collect-data/shopify/server-events.md) are separate sources, each with its own app. Server events send what happens from now on, as it happens. Historical data brings in your store's records, including everything before today. Set up both.
{% endhint %}

## Step 1: Create the app

1. Go to the [Shopify Dev Dashboard](https://dev.shopify.com/dashboard).
2. In the navigation menu, click **Apps > Create app**.
3. Under **Start from Dev Dashboard**, enter the app name `Chord Data Ingestor`.

   ![Creating an app in the Dev Dashboard](https://2938842758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Oy2IAsu7IvAGAlWgC36%2Fuploads%2Fgit-blob-8655d1116b5fef1043e5d8b5de858e4609e07eda%2Fshopify-dev-dashboard-create-app.png?alt=media)
4. Click **Create**.

## Step 2: Configure access scopes

1. Leave the form settings as they are.
2. In the **API Access** section, paste the following scopes:

   ```
   read_all_orders,read_assigned_fulfillment_orders,read_customers,read_discounts,read_fulfillments,read_inventory,read_locations,read_merchant_managed_fulfillment_orders,read_orders,read_products,read_reports,read_returns,read_shipping,read_third_party_fulfillment_orders
   ```
3. Click **Release**.

## Step 3: Install the app

1. On the app's **Home** page, click **Install app**.

   ![Installing the app](https://2938842758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Oy2IAsu7IvAGAlWgC36%2Fuploads%2Fgit-blob-8feb6ce6f3ec84fe4c931e61f42ab119003e36bd%2Fshopify-dev-dashboard-install-app.png?alt=media)
2. Select your store.
3. Review the scopes and click **Install**.

## Step 4: Connect the app in Chord

1. On the app's **Settings** page in the Dev Dashboard, under **Credentials**, copy the **Client ID** and **Secret**.
2. Find your store URL. It's the part of your Shopify admin URL after `/store/`, followed by `.myshopify.com`. For example, if your admin URL is `https://admin.shopify.com/store/acme-goods/orders`, your store URL is `acme-goods.myshopify.com`.
3. In Chord, go to **Data sources**, click **Add New Source**, and select **Shopify**.
4. Enter the client ID, secret and store URL, and save.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/collect-data/shopify/historical-data.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
