Shopify Integration

Sync products, orders, and inventory with your Shopify store.

Overview

The Shopify integration enables bidirectional sync between your Shopify store and Hyperfold. Products flow from Shopify into Hyperfold's semantic catalog, while agent-generated orders flow back to Shopify for fulfillment.

Setup

# Connect Shopify store
$ hyperfold integrate add shopify
> [OAuth] Opening Shopify authorization...
> Select your store and approve permissions
> [Verify] Checking API scopes...
 Shopify connected!
  Store:     acme-sports.myshopify.com
  Products:  1,489
  Locations: 2
# Or with API credentials
$ hyperfold integrate add shopify \
  --store="acme-sports.myshopify.com" \
  --api-key="shpat_xxx" \
  --api-secret="yyy"
# Required Shopify scopes:
# - read_products, write_products
# - read_orders, write_orders
# - read_inventory, write_inventory
# - read_locations

Product Sync

Import and sync products from Shopify:

# Initial product sync
$ hyperfold catalog product-import --source=shopify
> [Shopify] Fetching products (1,489 total)...
> [Transform] Converting to Hyperfold schema...
> [Enrich] Generating semantic embeddings...
> [Store] Writing to Firestore...
 Synced 1,489 products
# Enable automatic sync via webhooks
$ hyperfold integrate configure shopify --sync=webhook
> [Webhook] Registering product/create webhook...
> [Webhook] Registering product/update webhook...
> [Webhook] Registering product/delete webhook...
 Auto-sync enabled
# Field mapping (customize in config)
$ cat shopify-mapping.yaml
mappings:
  products:
    shopify_field: hyperfold_field
    id: product_id
    title: name
    body_html: description
    vendor: attributes.brand
    product_type: semantics.category
    variants[].price: pricing.list_price
    variants[].sku: sku
    variants[].inventory_quantity: inventory.quantity

Order Sync

Sync agent-generated orders back to Shopify:

# Configure order sync (Hyperfold → Shopify)
$ hyperfold integrate configure shopify
Order Sync Settings:
  Direction:        [to_shopify]
  Create orders:    [yes]
  Update status:    [yes]
  Include agent_id: [yes]
# Order sync flow:
# 1. Agent creates order in Hyperfold
# 2. Hyperfold creates corresponding Shopify order
# 3. Fulfillment updates sync back to Hyperfold
# View sync status
$ hyperfold integrate status shopify
ORDER SYNC:
  Last sync:        2 minutes ago
  Orders synced:    8,234
  Pending sync:     3
  Errors:           0
# Manual order sync
$ hyperfold integrate sync shopify --orders
> [Sync] Syncing 3 pending orders to Shopify...
 Orders synced

Inventory Sync

Keep inventory levels synchronized in real-time:

# Configure real-time inventory sync
$ hyperfold integrate configure shopify --inventory=realtime
> [Config] Setting up inventory webhooks...
> [Config] Configuring inventory locations...
 Real-time inventory sync enabled
  Hyperfold Shopify: On product update
  Hyperfold Shopify: On order completion
# Inventory location mapping
$ cat inventory-locations.yaml
locations:
  - shopify_location_id: "123456789"
    hyperfold_warehouse: "warehouse_west"
    priority: 1
  - shopify_location_id: "987654321"
    hyperfold_warehouse: "warehouse_east"
    priority: 2
# Check inventory sync
$ hyperfold integrate inventory-check shopify
INVENTORY COMPARISON:
  Products checked:  1,489
  In sync:           1,482
  Out of sync:       7
# Force inventory reconciliation
$ hyperfold integrate sync shopify --inventory --force