> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runalloy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Shopify

> Integration details and setup guide for the Shopify connector in Alloy Automation.

## Pre-Built Tooling

| Category                            | Details                                                                                                                                                                                                         |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Authentication**                  | OAuth 2.0 (Authorization Code with refresh tokens) or Private App Access Token                                                                                                                                  |
| **Two-Way Sync**                    | Yes                                                                                                                                                                                                             |
| **Events Supported**                | Yes                                                                                                                                                                                                             |
| **Realtime**                        | Yes (via Webhooks)                                                                                                                                                                                              |
| **Supports Rate Limiting**          | Yes (GraphQL-based rate limiting)                                                                                                                                                                               |
| **Authentication Scopes Supported** | Extensive: `read_products`, `write_products`, `read_orders`, `write_orders`, `read_customers`, `write_customers`, `read_fulfillments`, `write_fulfillments`, `read_inventory`, `write_inventory`, and many more |

***

## Objects Supported

Alloy Automation supports syncing the following objects from **Shopify**:

* **Shop** - Store information
* **Customers** - Customer records and addresses
* **Products** - Products, variants, and inventory
* **Orders** - Orders, line items, and fulfillments
* **Fulfillment Orders** - Fulfillment workflows
* **Product Variants** - SKU-level product data
* **Collections** - Product collections

***

## Set Up Guide

### Trial Access

| Question                                           | Answer                                                                                                                                        |
| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| **Offers free trial?**                             | Yes. Shopify offers a 3-day free trial, then \$1/month for 3 months for new merchants. [Start free trial](https://www.shopify.com/free-trial) |
| **Requires paid sandbox**                          | No. Development stores (free forever) are available for Shopify Partners.                                                                     |
| **Requires partnership to obtain authentication?** | No for basic access. Yes for distributing apps publicly (requires Shopify Partner account).                                                   |

***

### Authentication (OAuth 2.0)

For customers who want to completely whitelabel their OAuth experience, you can provide your own developer keys instead of using Alloy Automation's.

<step>
  ## Step 1: Create a Shopify Partner Account

  1. Visit **Shopify Partners** ([https://partners.shopify.com/](https://partners.shopify.com/))
  2. Click **Join Now** and fill out the registration form
  3. Verify your email and complete your profile
  4. Access your Partner Dashboard
  5. This allows you to create development stores and custom apps
</step>

<step>
  ## Step 2: Create a Development Store (for Testing)

  1. In your Partner Dashboard, go to **Stores**
  2. Click **Add store** > **Create development store**
  3. Fill in store details (store name, purpose, etc.)
  4. Select **Developer Preview** for the latest Shopify features
  5. Your dev store URL will be: `https://your-store-name.myshopify.com`
  6. Use this store for testing your integration
</step>

<step>
  ## Step 3: Create a Custom App

  1. Log into your Shopify store (or development store)
  2. Navigate to **Settings** > **Apps and sales channels**
  3. Click **Develop apps** > **Allow custom app development**
  4. Click **Create an app**
  5. Name your app (e.g., "Alloy Integration")
  6. Select an app developer from your team
</step>

<step>
  ## Step 4: Configure API Scopes

  1. In your custom app, click **Configuration**
  2. Under **Admin API integration**, click **Configure**
  3. Select the OAuth scopes needed for your integration:
     * **Products**: `read_products`, `write_products`
     * **Orders**: `read_orders`, `write_orders`
     * **Customers**: `read_customers`, `write_customers`
     * **Fulfillments**: `read_fulfillments`, `write_fulfillments`
     * **Inventory**: `read_inventory`, `write_inventory`
  4. Click **Save**
</step>

<step>
  ## Step 5: Install and Retrieve Access Token

  1. Click **Install app** to install it on your store
  2. After installation, go to **API credentials**
  3. Copy the **Admin API access token**
  4. Also note:
     * **API key** (Client ID)
     * **API secret key** (Client Secret)
     * **Shop name** (your-store-name)
  5. For public apps, configure the redirect URL: `https://api.runalloy.com/api/strategy/connector/shopify/callback`
</step>

<step>
  ## Step 6: Connect to Alloy Automation

  1. In Alloy Automation, configure your Shopify connector
  2. For Private Apps: Provide the **Access Token**
  3. For OAuth Apps: Provide **Client ID**, **Client Secret**, and **Shop Name**
  4. Test the connection by fetching shop information
</step>

***

## Use Cases

### 1) Automated order fulfillment

Sync Shopify orders with warehouse management systems, 3PLs, or fulfillment platforms to automatically create shipments, update tracking information, and mark orders as fulfilled.

### 2) Real-time inventory synchronization

Keep product inventory levels synchronized across Shopify and other sales channels, ERP systems, or inventory management platforms to prevent overselling and maintain accurate stock counts.

### 3) Customer data platform integration

Sync Shopify customer data with marketing automation, CRM, or analytics platforms to build comprehensive customer profiles and enable personalized marketing campaigns.

### 4) Product catalog management

Manage product information, variants, pricing, and images across Shopify and PIM systems, e-commerce platforms, or marketplaces, ensuring consistency across all sales channels.

### 5) Order analytics and reporting

Extract order, customer, and product data from Shopify to build custom reports, dashboards, or integrate with business intelligence tools for advanced analytics and insights.

***

## API Gotchas

* **GraphQL Rate Limiting:** Shopify uses a cost-based rate limiting system for GraphQL APIs. Each query has a cost based on complexity. Monitor the `extensions.cost` field in responses to track usage against your bucket (default: 1000 points, refills at 50 points/second).

* **API Versioning:** Shopify uses dated API versions (e.g., `2025-07`). Versions are supported for at least 12 months. Always specify the version in your API URL: `/admin/api/2025-07/graphql.json`. Test thoroughly when upgrading versions.

* **Webhook Verification:** Shopify webhooks include an HMAC signature in the `X-Shopify-Hmac-SHA256` header. Always verify webhooks to ensure they originated from Shopify and haven't been tampered with.

* **Pagination Cursors:** Shopify GraphQL uses cursor-based pagination with `pageInfo` containing `hasNextPage` and `endCursor`. You must use the cursor from the previous response to fetch the next page. Do not construct cursors manually.

* **Product Variant Limits:** Shopify allows up to 100 variants per product. If you need more, consider splitting into multiple products or using product options creatively. This limit affects bulk variant creation operations.

> For questions or troubleshooting, contact **[support@runalloy.com](mailto:support@runalloy.com)**.
