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

# Import and sync Shopify products

> Use the Firmhouse Shopify import and synchronization feature to bulk import and link your Shopify products to their Firmhouse counterparts automatically.

If you have a large product catalog on Shopify it will be quite some work to manually create and link all these products to their counterpart in Firmhouse. To save you time and manual work, Firmhouse offers a Shopify import/synchronization feature.

Normally, Shopify products don't contain information about subscriptions, such as billing schedule. Firmhouse uses tags and metafields in Shopify to provide this information and create or update the products correctly in Firmhouse. This article explains how to add tags and metafields to your product and initiate an import.

## Understanding tags and metafields

Tags and metafields are used to provide information about how a product should appear in Firmhouse. They can be used both for creating new products as well as for updating existing products.

### Tags

In Shopify, tags are used to categorize a variety of objects. In this article we'll focus only on **product** tags but you can read about other uses in Shopify's article on [Creating and using tags in Shopify](https://help.shopify.com/en/manual/shopify-admin/productivity-tools/using-tags).

Most tags are valid only for specific project types (Plan-based or Smart order-based).

#### Tags for Plan-based projects

The following tags work with Plan-based projects:

* `FIRMHOUSE_ONE_TIME` - creates a one-time sale product in Firmhouse
* `FIRMHOUSE_SUBSCRIPTION` - creates a monthly/recurring product in Firmhouse

#### Tags for Smart-order-based projects

The following tags work with Smart order-based projects:

* `FIRMHOUSE_SHIPMENT_ONE_TIME` - creates a product that will be shipped only once
* `FIRMHOUSE_SHIPMENT_INTERVAL_<number>_<UNITS>` - creates a recurring product that will be shipped according to the specified interval (note that the `<UNITS>` part is plural and capitalized, e.g., `1_WEEKS`)
* `FIRMHOUSE_SHIPMENT_ON_BILLING_CYCLE` - creates a recurring product that aligns with the subscriber's unified shipment schedule (only relevant for setups where all recurring products are shipped together)

#### Tags for both project types

The following tags can be applied to both project types:

* `FIRMHOUSE_SUBSCRIPTION_DISCOUNT_<number>` - applies a discount percentage to products with recurring shipping created via `FIRMHOUSE_SHIPMENT_INTERVAL` or the `shipment` metafield (products with one-time shipping will not be affected)
* `FIRMHOUSE_SHOPIFY_PRICE_FOR_ONE_TIME` - the price of the product or variant in Shopify will be used for one-time products, overriding the `subscription_price` metafield (use this tag together with the metafield to set different prices for one-time and recurring products)

### Tips for using tags

If a tag is applied to a Shopify product with multiple variants, the setting will be applied to all variants (can be overridden by variant metafields).

If multiple tags for shipment or billing are applied to a Shopify product, this will create multiple Firmhouse products. For example, adding both `FIRMHOUSE_SHIPMENT_ONE_TIME` and `FIRMHOUSE_SHIPMENT_INTERVAL_1_MONTHS` to a product will create a one-time product and a recurring product. If the Shopify product has variants, two Firmhouse products will be created for each variant.

### Metafields

Just like tags, metafields can be added to many kinds of objects. In this article we'll focus on **product** and **variant** metafields. You can read about other uses in Shopify's article on [Metafields](https://help.shopify.com/en/manual/custom-data/metafields). First, [learn how to create custom metafield definitions](https://help.shopify.com/en/manual/custom-data/metafields/metafield-definitions).

All metafields used by Firmhouse use the `firmhouse` namespace. After you create a metafield, it will be "pinned" by default, meaning it will be visible in products and variants and you can directly set a value for it.

The following metafields are available:

| Key                     | Type & Accepted values                        | Example    | Details & limitations                                                                                                     |
| ----------------------- | --------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------- |
| shipment                | Single line text `<amount>_<units>`           | `1_weeks`  | -                                                                                                                         |
| subscription\_price     | Decimal                                       | `21.50`    | Affects all types of products                                                                                             |
| subscription\_discount  | Integer                                       | `50`       | Affects only recurring products                                                                                           |
| exclude\_from\_discount | Single line text `true`                       | `true`     | Accepts only `true`. Setting it to `false` will not make the product eligible for discount if it was previously excluded. |
| billing                 | Single line text `one_time` or `subscription` | `one_time` | Works only in **plan-based** projects                                                                                     |
| max\_commitment         | Single line text `<amount>_<units>`           | `2_years`  | Works only in **plan-based** projects                                                                                     |
| min\_commitment         | Single line text `<amount>_<units>`           | `3_months` | Works only in **plan-based** projects                                                                                     |
| grace\_period           | Single line text `<amount>_<units>`           | `14_days`  | Works only in **plan-based** projects                                                                                     |

Note that the `<units>` part in metafields is plural and **not capitalized** (e.g., `1_weeks`).

### Tips for using metafields

Metafields can be applied to both products and variants. If the same metafield is applied to a product and a variant at the same time, the value of the variant metafield will take priority.

Metafields override tags. If you add a `FIRMHOUSE_SUBSCRIPTION_DISCOUNT` tag and a `subscription_discount` metafield simultaneously, the metafield will take priority. There's one exception to this: `FIRMHOUSE_SHOPIFY_PRICE_FOR_ONE_TIME` overrides metafields.

Do **not** use tags and metafields that set product schedules simultaneously. This can lead to new products being created every time you sync. For example, if you have a Smart order-based project and you add the tag `FIRMHOUSE_SHIPMENT_1_WEEKS` and the metafield `shipment` with value `2_months`, every time you sync a new Firmhouse product will be created because metafields take priority.

## Performing a product import or sync

### Steps

1. In your Firmhouse project, go to **Apps**.
2. Click **Configure** on the **Shopify** app.
3. Click on the **Product sync** tab.
4. Under Sync settings, select the desired options in the **How to sync** and **What to sync** sections.
5. Click on **Start syncing**.
6. A summary of the sync will be shown in the **Sync History** below. Here, you can view the changes and settings for a specific synchronization.

<img src="https://mintcdn.com/firmhousebv/1awd07dPjhgQEJXn/images/docs-shopify-importing-and-syncing-products-sync-history-dev-aa.png?fit=max&auto=format&n=1awd07dPjhgQEJXn&q=85&s=3869b6cef32e619f48d62d63e941a9e7" alt="Sync History showing completed synchronizations" width="2880" height="2600" data-path="images/docs-shopify-importing-and-syncing-products-sync-history-dev-aa.png" />

## Sync settings

The following sync settings are available:

<img src="https://mintcdn.com/firmhousebv/1awd07dPjhgQEJXn/images/docs-shopify-importing-and-syncing-products-sync-settings-dev-aa.png?fit=max&auto=format&n=1awd07dPjhgQEJXn&q=85&s=aa466f50c2a9258f9c61bc446006f48e" alt="Sync settings showing How to sync and What to sync options" width="2880" height="2600" data-path="images/docs-shopify-importing-and-syncing-products-sync-settings-dev-aa.png" />

**How to sync** options include creating new products, skipping products without Shopify tags, updating existing products, deleting products without Shopify tags, grouping and updating Shopify variants, and creating an asset for every product.

When you enable **Grouping and updating Shopify variants**, Firmhouse will automatically create product groups for variants of the same Shopify product. The product group represents the parent Shopify product, and all variants of that product are grouped together. This means that if you have a Shopify product with multiple variants (like different sizes or colors), all those variants will be grouped together in the self-service center, making it easier for customers to see and compare their options for the same product.

For products that already exist in Firmhouse, select both **Update existing products** and **Grouping and updating Shopify variants**. Grouping by itself applies to newly created products but does not change existing product records.

If existing products remain ungrouped, enable the **Product Groups Admin Interface** in **New Features**, then open **Product Groups**. Use **Repair missing group assignments** to assign only ungrouped products. The advanced **Rebuild all Shopify group assignments** option replaces every available Shopify product's current grouping with the grouping from its Shopify parent product.

**What to sync** options include product image, product title, product price, product SKU, product tax rate, shipping settings of the product, billing settings of the product, and commitment terms of the product.

We recommend selecting only the options you need for a specific import.

## Shopify product availability and existing subscriptions

Shopify inventory levels and product statuses do not automatically change existing Firmhouse subscriptions. If a Shopify product is out of stock, archived, unpublished, or in draft, Firmhouse can still create the next recurring order for an existing subscription as long as that subscription is linked to a Firmhouse product.

Run a product sync when products or variants change in Shopify. With **Create new products** and **Update existing products** enabled, Firmhouse updates the linked product data and can mark products that are no longer active in Shopify as unavailable. Unavailable products cannot be added to new subscriptions from Firmhouse or the customer portal.

When a product is deleted in Shopify, Firmhouse receives the Shopify deletion webhook and updates matching Firmhouse products. Products are archived when they are safe to archive. If a product is still connected to active subscriptions or other usage, Firmhouse keeps the product and marks it unavailable instead.

Existing subscriptions need a separate review. If subscribers already have an unavailable or out-of-stock product, decide whether to pause those subscriptions, replace the product, remove the product, contact customers, or enable [Skip orders with unavailable products](/configure/subscription-options/skip-orders-with-unavailable-products) before the next renewal. A product sync updates the catalog connection, but it does not automatically change products that are already on active subscriptions.

If a recurring order was already created in Firmhouse but was not pushed to Shopify because a linked Shopify product is missing or unavailable, see [Order not created in Shopify](/configure/shopify/order-not-created-in-shopify).
