---
title: Integrate Shopify API
slug: data-platform/docs/integrate-shopify-api
docTags: 
createdAt: 2026-08-10T12:05:19.000Z
---

Sync your Shopify customer, product, and order data to Optimizely Data Platform (ODP) for personalized marketing campaigns by maintaining consistent consent management across both platforms.

## Install the app

1. Go to your **Shopify Marketplace Connect** app and search for **Optimizely Data Platform**.
2. Click **Install** to grant the ODP app access to your Shopify store.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Uckzc2982m3M743F34FIo_integrate-shopfify-api-odp-app-access.png)

3. Start your historical data import in ODP by selecting **Start Bulk Import**. The import could take up to a few hours depending on the number of historical orders and customers.

## Data types imported from Shopify

### Customer data

 ODP receives the following customer data from Shopify when you import or update customer data:

- **Profile information** – The customer's first name, last name, email address, phone number, default shipping address, and customer tags.
- **Marketing consent fields** – The customer's email marketing consent and the corresponding timestamp.
  - **Email marketing consent** – Maps to the `shopify_accepts_marketing` field.
  - **Consent timestamp** – Maps to the `shopify_accepts_marketing_updated_at` field.
- **Identifiers** – The Shopify customer ID, used as a primary, high-confidence identifier, and the Shopify cart token, used for cart tracking as a low-confidence identifier. See [Identifiers](<../../Understand ODP/thebasics-customers/thebasics-identifiers.mdx>).

### Product data

ODP imports the following product data from Shopify and periodically refreshes:

- **Product fields** – The product and variant ID, product title and description, product type, handle, product tags, quantity available, published date, and pricing information.

### Order data

ODP imports the following transaction history from Shopify:

- **Order-level information** – The order ID and name, order timestamp, financial status (such as paid, pending, authorized, and more), customer information, total amount including tax, shipping, and discounts, applied discount codes, order tags, and billing and shipping address.
- **Line item information** – The product ID and SKU, price and quantity, discount amount, and item subtotal for each product in the order.
- **Refund and cancelation tracking** – Refund transactions with amounts and timestamps, order cancelations, and currency conversions for multi-currency refunds.  

## Data sent to Shopify 

ODP sends the following types of data to Shopify:

### Email marketing consent updates

To ensure compliance with Shopify's Terms of Service, the integration syncs a customer's updated email consent data, such as `suscribed` or `unsubscribed`, marketing opt-in level (set to `unknown)`, and the consent updated timestamp, to Shopify. This ensures marketing preferences remain consistent.

The integration syncs the data in the following way:

- Runs nightly, once a day.  
- Only processes consent changes that occurred in ODP since the last sync.
- Includes a 30-minute overlap to capture in-flight data changes.

ODP does not create new Shopify customers and only updates existing customers. 

### Map email marketing consent in ODP

The integration uses the following field mapping to map Shopify's consent system to ODP's consent management:

- The `shopify_accepts_marketing` field records whether a customer opted in to receive marketing emails from your Shopify store. This is a Boolean data type with the values `true`, `false`, and `null`.
  - `true` – Customer opted in to receive marketing communications.
  - `false` – Customer opted out of receiving marketing communications.
  - `null` – Consent status is unknown or not applicable.
- The `shopify_accepts_marketing_updated_at` field records when the marketing consent preference was last changed. This is a `Timestamp` (Unix epoch time) data type that lets you
  - Track when consent preferences were last updated. 
  - Track audit consent changes over time.
  - Determine if consent information is current or changed.

### Unknown consent 

When `shopify_accepts_marketing` returns a `null` value, it indicates one of the following scenarios:

- **Customer never provided consent preference** – New customers were not asked about marketing preferences.
- **Shopify state is ambiguous** – States like `pending`, `invalid`, or `not_subscribed` do not clearly indicate consent. 

If you receive unknown consent, do not assume consent, and track whether consent information transitioned from `null` to a defined state. 

There might be a delay in displaying updated consent information in the **Customer Profile > Identifiers** page on ODP. Wait a few minutes for consent changes to display in the UI.

##
