> 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). Agents can also search and read this documentation through its [MCP server](https://docs.chord.co/~gitbook/mcp).

# 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](https://docs.chord.co/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_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: Add access to all orders

Chord also needs the `read_all_orders` scope. Without it, Shopify only shares orders from the last 60 days, so your reports miss older history.

Shopify protects this scope, so you can't paste it in with the others. Adding it is a separate step:

1. On the app's **Settings** page in the Dev Dashboard, go to **Access requests**.
2. If **Read all orders** is listed, click **Request access**, explain that you need your full order history for reporting, and submit. Wait for Shopify to approve the request.
3. Add `read_all_orders` to the scopes in the **API Access** section and click **Release** to publish a new version.

See Shopify's [orders permissions](https://shopify.dev/docs/api/usage/access-scopes#orders-permissions) for details.

## Step 4: 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 5: 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.

## Point-of-sale staff data (Shopify Plus and Advanced)

Chord can add point-of-sale data to your reports, such as which sales associate handled each in-store sale. This needs the `read_users` scope on the Chord Data Ingestor app. Shopify only offers `read_users` to stores on Shopify Plus or Advanced, and Shopify Support has to turn it on for each app.

1. On the app's **Settings** page in the Dev Dashboard, under **Credentials**, copy the **Client ID**.
2. Go to [help.shopify.com](https://help.shopify.com) and click **Chat with a human**.
3. Choose **Chat with Plus Support**.
4. Ask Shopify to enable the `read_users` scope for the app with your client ID. Give the reason: you need it to bring point-of-sale data, such as the sales associate on each order, into your reporting.

{% hint style="info" %}
Shopify tends to act faster when a store owner or admin makes the request. You don't need a technical spec. The scope name, the client ID and the reason are enough.
{% endhint %}

Once Shopify confirms the scope is enabled, contact Chord support so Chord can start loading the point-of-sale data.


---

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