Skip to main content

Shopify Integration

Connect your Shopify store with ZenFlow to automatically import orders, sync inventory, and streamline your fulfillment operations.
This integration supports Shopify stores from any country. Compatible with Shopify and Shopify Plus.

Features

Import Orders

Automatically import paid orders from Shopify

Update Status

Mark orders as fulfilled and send tracking info

Inventory Sync

Real-time stock synchronization to Shopify

Product Mapping

Link Shopify products with your ZenFlow catalog

Setup Guide

Step 1: Connect Your Store

  1. Go to Settings > Integrations in ZenFlow
  2. Click Connect Shopify
  3. Enter your store domain (e.g., mystore.myshopify.com)
  4. You’ll be redirected to Shopify to authorize the app
  5. Accept the requested permissions
ZenFlow requests permissions to read/write orders, products, and inventory. These are necessary for bidirectional sync.

Step 2: Configure Sync Settings

After connecting, set your preferences:
Order Settings:
- Sync orders: Yes/No
- Import only paid: Yes/No
- Default warehouse: [Select]

Inventory Settings:
- Sync stock: Yes/No
- Direction: ZenFlow -> Shopify

Step 3: Map Products

Link your Shopify products with ZenFlow:
  1. Go to Integrations > Shopify > Product Mapping
  2. ZenFlow will attempt to auto-match by SKU
  3. For unmatched products, manually select the ZenFlow product

Order Flow

API Reference

Start Authorization

POST /api/v1/integrations/shopify/auth/start
Request:
{
  "shop_domain": "mystore.myshopify.com",
  "warehouse_id": 1
}
Response:
{
  "success": true,
  "data": {
    "authorization_url": "https://mystore.myshopify.com/admin/oauth/authorize?..."
  }
}

Get Connection Status

GET /api/v1/integrations/shopify/status
Response:
{
  "success": true,
  "data": {
    "connected": true,
    "shop_domain": "mystore.myshopify.com",
    "shop_name": "My Store",
    "status": "active",
    "sync_orders": true,
    "sync_stock": true,
    "last_sync_at": "2024-01-20T15:45:00Z"
  }
}

Update Configuration

PUT /api/v1/integrations/shopify/config
Request:
{
  "sync_orders": true,
  "sync_stock": true
}

Manually Sync Orders

POST /api/v1/integrations/shopify/sync/orders
Request:
{
  "date_from": "2024-01-01",
  "date_to": "2024-01-31"
}

Sync Stock to Shopify

POST /api/v1/integrations/shopify/sync/stock
Syncs all inventory levels for mapped products to Shopify.

List Product Mappings

GET /api/v1/integrations/shopify/mappings
Response:
{
  "success": true,
  "data": {
    "mappings": [
      {
        "id": 1,
        "product_id": 100,
        "product_sku": "PROD-001",
        "shopify_product_id": "7654321098765",
        "shopify_variant_id": "43210987654321",
        "shopify_sku": "PROD-001",
        "sync_stock": true,
        "last_stock_sync": "2024-01-20T15:45:00Z"
      }
    ]
  }
}

Create Product Mapping

POST /api/v1/integrations/shopify/mappings
Request:
{
  "product_id": 100,
  "shopify_product_id": "7654321098765",
  "shopify_variant_id": "43210987654321",
  "sync_stock": true
}

Delete Mapping

DELETE /api/v1/integrations/shopify/mappings/:id

Disconnect Store

DELETE /api/v1/integrations/shopify/disconnect

Webhook Events

ZenFlow automatically receives these webhooks from Shopify:
TopicDescriptionZenFlow Action
orders/createNew order createdImports order if paid
orders/paidPayment confirmedImports order for fulfillment
orders/updatedOrder updatedRecords changes
orders/cancelledOrder cancelledCancels order in ZenFlow
orders/fulfilledOrder fulfilledRecords fulfillment
products/createProduct createdRecords for mapping
products/updateProduct updatedUpdates mapping info
products/deleteProduct deletedRemoves mapping
inventory_levels/updateStock updatedRecords change (if bidirectional)
app/uninstalledApp uninstalledRevokes credentials

Product Mapping

Automatic Matching

ZenFlow attempts to match products automatically using:
  1. SKU (exact match)
  2. Barcode (if configured in Shopify)

Manual Mapping

For products that don’t auto-match:
  1. Go to Integrations > Shopify > Product Mapping
  2. Filter by “Unmapped”
  3. Select the corresponding ZenFlow product

Multi-Variant Products

Each Shopify variant maps to a separate product in ZenFlow:
ShopifyZenFlow
Blue Shirt (S)SHIRT-BLUE-S
Blue Shirt (M)SHIRT-BLUE-M
Blue Shirt (L)SHIRT-BLUE-L
Red Shirt (S)SHIRT-RED-S

Status Mapping

Shopify StatusZenFlow Status
unfulfilledReady to pick
partialIn progress
fulfilledShipped
restockedCancelled

Troubleshooting

Orders Not Importing

Make sure sync_orders is enabled in the configuration. Go to Integrations > Shopify > Settings.
By default, only orders with paid status are imported. Verify the order has confirmed payment in Shopify.
Webhooks are registered automatically. If there are issues, disconnect and reconnect the integration.

Stock Not Syncing

The product must be properly mapped. Verify a mapping exists in Product Mapping.
Each mapping has a sync_stock flag. Make sure it’s enabled for products you want to sync.
ZenFlow syncs with the primary Shopify location. If you have multiple locations, verify which one is set as primary.

Authorization Error

If authorization fails, verify you accepted all requested permissions. Try disconnecting and reconnecting.
Shopify tokens are long-lived. If expired, disconnect and reconnect the integration.

Rate Limits

OperationLimit
API calls2 requests/second
Token bucket40 tokens
ZenFlow handles rate limits automatically with exponential backoff and respects Shopify’s “leaky bucket” algorithm.

Required Scopes

The integration requests the following permissions:
  • read_orders, write_orders - Read and update orders
  • read_products, write_products - Read and update products
  • read_inventory, write_inventory - Manage stock levels
  • read_locations - Read inventory locations
  • read_fulfillments, write_fulfillments - Manage fulfillments

Support