> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.syncbase.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 🔗 Metafields synchronization: how does it work?

You can 100% synchronize your Shopify metafields in Airtable thanks to SyncBase. This topic explains how it works.

# Metafields sync available for

Metafields synchronization is currently available for:

* Products
* Variants
* Orders
* Customers

|| Metafields for other objects (Collections, Companies, Locations, Pages, Blogs...) will be soon available. If you're interested feel send us a message on the live chat! 

# Adding a new metafield definition after the base generation

To add a new metafield definition:

1. Go to your Shopify settings.
2. Add a new definition.
3. Within Shopify, go to a product/variant/order/customer… and add an input to this new metafield. 
* Be sure to hit the “save” button to trigger a webhook.
4. The column should appears within the linked tab of your Airtable synced base!

You can now use Airtable to add new values for this metafield.

# Deleting a metafield definition

To delete a new metafield definition:

1. Go to your Shopify settings.
2. Delete the desired definition.
3. That’s it! Data won’t be updated anymore.

Optional: you can 100% delete the linked column in your Airtable synced base.

# Updating a metafield value within Airtable

You can absolutely update metafield values via Airtable! To do so, simply ensure the formatting matches Shopify's requirements.
For example, if a metafield definition has a type of “Color,” you’ll need to format the value as Shopify expects (e.g., `#colorcode`).

# Unstructured metafields

Unstructured metafields are definitions created by third party app (example: Google Shopping) or archived metafields definitions.
We do not currently sync them inside metafields tab.

# Metafields with reference types

Some Shopify metafields use **reference types** (for example: Product reference, Image reference, Collection reference, etc.). These metafields don’t store a simple value (text or number) but a **reference to another Shopify object**.

### How reference values look in Airtable

When a metafield uses a reference type, the value synced into Airtable follows this format:

* Image reference example `gid://shopify/MediaImage/57257873768781`
* Product reference example `gid://shopify/Product/10372488298805`

This format must always be respected.

### How to update a reference metafield value

To reference another object, you only need to **replace the ID at the end of the value**.

Example: `gid://shopify/Product/10372488298805` → change `10372488298805` to the ID of another product.

__Important notes__:
* The structure (`gid://shopify/ObjectType/`) must remain unchanged
* Only the numeric ID at the end should be modified
* This ID is the **unique Shopify object ID**

### How to find the correct Shopify object ID

There are two ways to find the correct ID to use.

###### Option 1: From your Airtable synced base

1. Open the related table (for example, **Products**, **Orders**, **Customers**, etc.)
2. Look for the **`[Object name] ID`** field (Example: *Product ID*, *Order ID*, *Customer ID)*
3. Copy the ID and use it in your metafield reference value

###### Option 2: From your Shopify admin URL

1. Open your Shopify admin
2. Navigate to the object you want to reference (product, order, customer, etc.)
3. Look at the URL in your browser (Example for a product`https://admin.shopify.com/store/yourstorename/products/10372488298805`)
4. The number at the end of the URL is the object ID

You can now safely use this ID inside your metafield reference value in Airtable.

See more in this article: [GID references in Syncbase](https://help.syncbase.app/en/article/gid-references-in-syncbase-how-to-use-them-in-your-synchronization-90s0p3/)

