Skip to main content

Shopify API Connector

Connect Shopify to import orders, revenue and ecommerce performance data for reporting and analysis.

File:Shopify logo 2018.svg - Wikimedia Commons

Overview

Shopify is an ecommerce platform that allows businesses to manage their online stores, products, orders and customer transactions. Through the Shopify Admin API, integrations can access store, order and performance data for reporting and analysis.

The Shopify Admin API exposes a range of ecommerce and transaction data, including:

Order & Transaction Data

  • Orders

  • Order numbers and IDs

  • Order dates

  • Order status

  • Financial status

  • Fulfillment status

  • Order transactions

  • Payment information

  • Refunds

  • Returns

Revenue & Sales Data

  • Gross sales

  • Net sales

  • Total sales

  • Discounts

  • Returns

  • Refunds

  • Taxes

  • Shipping

  • Duties

  • Transaction fees

Product & Line Item Data

  • Products

  • Product variants

  • SKUs

  • Product titles

  • Quantities

  • Unit prices

  • Discounts

  • Product-level revenue

  • Line item totals

Customer & Store Data

  • Customer information

  • Customer type

  • Customer location

  • Sales channel

  • Store currency

  • Store timezone

  • Billing and shipping information

Granularity:

The integration retrieves data at order and line-item level, allowing performance to be analysed across orders, products, variants, customers and sales channels.

Order data can be used to aggregate ecommerce KPIs by date, product, SKU, customer, sales channel and other available Shopify dimensions.

Purpose:

Track ecommerce performance and revenue metrics including orders, sales, discounts, refunds, returns and product-level performance. Shopify data can be combined with advertising and media data to provide a consolidated view of marketing activity and resulting revenue.

Refresh Cadence:

Data is refreshed daily.

Update Modes:

Append for order and transaction data, Refresh for store and metadata data.


Jobs Configuration

1. Shopify - Order Import

  • Feed: shopify

  • Status: Active

  • Job Label: Shopify - Order Import

  • Lookback: Last 5 days

  • First Run Hour: 6 AM daily

  • Poll Frequency: Every 24 hours

  • Targets:

    • Table: shopify_data_orders

    • Description: Shopify - Order Data

    • Update Mode: Append new data daily

    • Date Column: created_at

    • Priority: 1


2. Shopify - Product Refresh

  • Feed: shopify

  • Status: Active

  • Job Label: Shopify - Product Refresh

  • Lookback: Last 1 day

  • First Run Hour: 6 AM daily

  • Poll Frequency: Every 24 hours

  • Targets:

    • shopify_meta_product (priority 1, refresh mode)

    • shopify_meta_variant (priority 2, refresh mode)


Connection Details

Parameter

Description

Notes

Store URL

{val_1}

Shopify store URL

Client ID

{val_2}

Shopify Custom App client ID

Client Secret

{val_3}

Shopify Custom App client secret

Access Token

{val_4}

Shopify Admin API access token

Options

{val_5}

Additional connector configuration where required


How to Authenticate the Connection

Integrating with the Shopify Admin API allows Bright Analytics to pull order, revenue and other ecommerce KPI data from your Shopify store.

In Shopify terms, the approach is to create a Custom App. The Custom App provides the authentication credentials required for Bright Analytics to make authenticated requests against the Shopify Admin API.

Shopify uses access scopes to control which store data an app can access. The access token is used to authenticate API requests, while the granted scopes determine which data the integration can retrieve.

1. Create a Custom App

Create a Custom App for your Shopify store and configure the app with the permissions required by the Bright Analytics integration.

For instructions on creating and configuring a Custom App, refer to Shopify's Custom App documentation.

2. Configure API Scopes

When configuring the access scopes for the Custom App, the primary permission required is:

  • read_orders

The read_orders scope provides access to Shopify Order data, including orders and associated order transactions.

If additional data is required for your reporting use case, additional scopes may need to be enabled.

Only request the permissions required for the intended use case. Shopify recommends requesting the minimum amount of access necessary for an app to function.

If you have any questions about the required scopes, please contact the Bright Analytics support team.

3. Provide the Authentication Details

Once the Custom App has been created and the required permissions have been configured, provide the relevant Shopify authentication details to Bright Analytics.

These credentials allow the connector to authenticate requests against the Shopify Admin API and retrieve the data permitted by the configured access scopes.


Dimensions

Dimension Name

Maps to Fields

Order [Shopify]

shopify_data_orders.order_id

Order Number [Shopify]

shopify_data_orders.order_number

Product [Shopify]

shopify_data_orders.product_title

Variant [Shopify]

shopify_data_orders.variant_title

SKU [Shopify]

shopify_data_orders.sku

Customer [Shopify]

shopify_data_orders.customer_id

Sales Channel [Shopify]

shopify_data_orders.channel

Financial Status [Shopify]

shopify_data_orders.financial_status

Fulfillment Status [Shopify]

shopify_data_orders.fulfillment_status

Country [Shopify]

shopify_data_orders.country

Currency [Shopify]

shopify_data_orders.currency


Base Metrics

Metric Name

Formula

Description

Orders [Shopify]

COUNT(DISTINCT {order_id})

Total number of orders

Revenue [Shopify]

SUM({total_price})

Total order revenue

Gross Sales [Shopify]

SUM({gross_sales})

Total gross sales before discounts and returns

Net Sales [Shopify]

SUM({net_sales})

Sales after discounts and returns

Discounts [Shopify]

SUM({discounts})

Total discounts applied

Returns [Shopify]

SUM({returns})

Total value of returned items

Refunds [Shopify]

SUM({refunds})

Total refunded value

Taxes [Shopify]

SUM({taxes})

Total taxes charged

Shipping [Shopify]

SUM({shipping})

Total shipping charges

Quantity [Shopify]

SUM({quantity})

Total quantity of items sold


Datasource Joins

Order data can be linked to Shopify metadata tables using the relevant Shopify identifiers.

Join Field (LHS)

Join Field (RHS)

Source Table

product_id

shopify_meta_product.id

shopify_data_orders

variant_id

shopify_meta_variant.id

shopify_data_orders

customer_id

shopify_meta_customer.id

shopify_data_orders


Composite Metrics

Metric Name

Formula

Description

Round

Prefix

Suffix

Average Order Value [Shopify]

{Revenue [Shopify]} / {Orders [Shopify]}

Average revenue per order

2

£

Revenue per Customer [Shopify]

{Revenue [Shopify]} / {Customers [Shopify]}

Average revenue per customer

2

£

Items per Order [Shopify]

{Quantity [Shopify]} / {Orders [Shopify]}

Average number of items per order

2

Discount Rate [Shopify]

{Discounts [Shopify]} / {Gross Sales [Shopify]} * 100

Percentage of gross sales discounted

2

%

Refund Rate [Shopify]

{Refunds [Shopify]} / {Revenue [Shopify]} * 100

Percentage of revenue refunded

2

%


Notes

  • Shopify Admin API access is controlled through access scopes.

  • The primary scope required for order reporting is read_orders.

  • By default, read_orders provides access to orders created within the last 60 days. Access to older orders requires the read_all_orders scope and Shopify approval.

  • Additional scopes may be required depending on the data required for the reporting use case.

  • The Shopify Admin API uses an access token to authenticate requests. For the GraphQL Admin API, the token is passed using the X-Shopify-Access-Token request header.

  • Request only the scopes required for the intended use case.

  • Order data should be appended over time to retain historical reporting data.

  • Shopify metadata should be refreshed to ensure the latest store and product information is available.

  • Shopify's current documentation recommends the GraphQL Admin API for new integrations; the REST Admin API is now considered legacy.

Did this answer your question?