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

# Shopify Integration

> Sync your merch catalog and orders between Fanhaven and Shopify.

The **Shopify integration** connects your Fanhaven merch catalog with your Shopify store, enabling seamless inventory sync and unified order management.

## What it does

| Feature             | Description                                                      |
| ------------------- | ---------------------------------------------------------------- |
| **Product sync**    | Push merch items from Fanhaven to Shopify (or pull from Shopify) |
| **Inventory sync**  | Keep inventory counts in sync across both platforms              |
| **Order sync**      | Shopify orders are reflected in Fanhaven for unified reporting   |
| **Product mapping** | Map Fanhaven merch items to existing Shopify products            |

## Connecting Shopify

<Steps>
  ### Navigate to Integrations

  From the dashboard, go to **Settings → Integrations → Shopify**.

  ### Authorize the connection

  Click **Connect Shopify** and authorize Fanhaven to access your Shopify store. You'll be redirected to Shopify to approve the connection.

  ### Map your products

  Once connected, map your Fanhaven merch items to their Shopify counterparts. For new items, Fanhaven can create them in Shopify automatically.

  ### Configure sync settings

  Choose your sync preferences:

  * **Sync direction** — Fanhaven to Shopify, Shopify to Fanhaven, or bidirectional
  * **Inventory sync** — Real-time or periodic
  * **Order sync** — Automatically import Shopify orders into Fanhaven
</Steps>

## Product mapping

Product mapping links a Fanhaven merch item to a Shopify product. This is essential for keeping inventory accurate across both platforms.

### Auto-mapping

Fanhaven can automatically match products based on:

* Product name
* SKU
* UPC/barcode

### Manual mapping

For products that don't auto-match, manually link them:

1. Select the Fanhaven item
2. Search for the corresponding Shopify product
3. Confirm the mapping

<Info>Products that aren't mapped won't sync. Make sure to review your mappings after connecting to ensure everything is linked correctly.</Info>

## Inventory sync

Once products are mapped, inventory counts stay in sync:

* **POS sale in Fanhaven** → Shopify inventory decreases
* **Online sale in Shopify** → Fanhaven inventory decreases
* **Inventory adjustment in either platform** → The other platform updates

### Conflict resolution

If inventory changes happen simultaneously on both platforms, the most recent update takes priority. The sync log shows all changes for audit purposes.

## Webhooks

The Shopify integration uses webhooks to receive real-time updates:

* **Order created** — New Shopify orders are synced
* **Product updated** — Changes to Shopify products are reflected
* **Inventory updated** — Stock level changes trigger sync

## Best practices

* **Map all products** — Unmapped products create inventory blind spots
* **Monitor the sync log** — Check periodically for sync errors or conflicts
* **Use one source of truth for pricing** — Manage prices in one place and sync to the other to avoid discrepancies
* **Test before going live** — Use Shopify's development mode to test the integration before enabling it on your live store
