> 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/server-events.md).

# Server events

Server events are sent from Shopify to Chord as things happen in your store: orders placed, fulfilled, cancelled and refunded, and checkouts started. They come from Shopify's servers, not the shopper's browser, so ad blockers and closed tabs don't stop them.

You set them up by creating a Shopify app called **Chord Webhook Events** and sharing its credentials with Chord. Chord then subscribes your store to the webhooks it needs. You never register webhooks by hand.

{% hint style="info" %}
Server events are separate from [historical data](/collect-data/shopify/historical-data.md), which brings in your past orders through a second app. Set up both.
{% endhint %}

## Step 1: Create the app

1. Go to the [Shopify Dev Dashboard](https://dev.shopify.com/dashboard).

   ![The Shopify Dev Dashboard](https://2938842758-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Oy2IAsu7IvAGAlWgC36%2Fuploads%2Fgit-blob-8c2b7a6959b42ee284e1fc99daed961b7bf6265b%2Fshopify-dev-dashboard.png?alt=media)
2. In the navigation menu, click **Apps > Create app**.
3. Under **Start from Dev Dashboard**, enter the app name `Chord Webhook Events`.

   ![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: Collect your credentials

You need three values:

* **Client ID** and **Secret**: on the app's **Settings** page, under **Credentials**.
* **Store subdomain**: the part of your Shopify admin URL after `/store/`. For example, if your admin URL is `https://admin.shopify.com/store/acme-goods/orders`, your subdomain is `acme-goods`, and your store URL is `acme-goods.myshopify.com`.

## Step 5: Share them with Chord

Send Chord the client ID and your store subdomain. The secret gives access to your store's data, so discuss with Chord the best way to exchange it securely.

Chord uses these values to subscribe your store to the [webhook events](/collect-data/shopify/server-events/webhook-events.md) it listens to. Chord tells you when the setup is done.

## Step 6: Verify

Shopify's built-in webhook test doesn't send realistic data, so use a real order:

1. Place a test order in your store.
2. In Chord, open **Live Events** for your back-end source.
3. Check that Checkout Started and Order Completed appear.

## Link server events to browser sessions

Server events arrive from Shopify, not the shopper's browser, so Chord needs a way to tie them to the shopper's browsing. The [identifiers script](/collect-data/shopify/browser-events.md#step-2-add-the-identifiers-script) handles this: it saves the shopper's browser identifiers on the cart, Shopify carries them onto the order, and Chord reads them from the webhook. Make sure it's installed.

## Subscriptions

If your store sells subscriptions, Shopify only sends subscription webhooks to the app that created the subscription, so they need a different setup. See [Subscription events](/collect-data/shopify/server-events/subscription-events.md).


---

# 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/server-events.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.
