Developer guides

Displaying Sanity content in Shopify

Shopify shop domain added to sync

v2025-11-04

Sanity Connect now includes the Shopify shop domain when syncing to Sanity documents (products, productVariants, collections). If you've configured multiple Shopify stores to sync to a shared Sanity dataset, this field can be used to identify which store the product or collection came from.

The shop domain field will be added for all active syncs, which will add new data that your existing studio schemas does not define. When loading documents in the studio, you'll see a warning alerting you of the new data:

To remove the warning, you can add the new field to your Studio schema.

Example type:

Customize Shopify Metaobject Title

v2025-09-02

Sanity Connect enables you to customize the metaobject title field that appears in Shopify.

To update the Title, go to the Metaobjects tab within Sanity Connect and select the appropriate field by toggling the Title option.

Keep in mind that only fields with the 'single_line_text_field' type are eligible for selection when changing the Title.

A example of changing Title field

Customize Shopify metaobject page slugs

v2024-08-14

Sanity Connect syncs your content as metafields and metaobjects in Shopify. Shopify can host custom webpages for each of your metaobjects based on a theme template.

When you host pages on Shopify, the page URL is derived from your metaobject's handle. With this update, you can now customize the handle for your metaobjects.

On the Metaobjects tab in Sanity Connect, you can enable a setting to 'Use slug as handle.' When enabled, your metaobject's handle will be the value you have set in a slug-type field that you have configured on your document in Sanity. The first slug field found on the document is used. If there is no value for a slug field, then the handle defaults back to the Sanity document ID.

Shopify configuration for using a custom slug as a metaobject handle
Shopify configuration for using a custom slug as a metaobject handle

Diagnose and fix Shopify sync errors with error log and automated type updates

v2024-07-17

Sanity Connect syncs your content as metafields and metaobjects in Shopify. Two new tools let you troubleshoot issues when syncing data between these two platforms.

If we encounter an issue syncing content from Sanity to Shopify, an error log will appear on the Metafields or Metaobjects tabs within the Sanity Connect application. This error log will identify the individual documents that encountered an issue and what prompted the syncing issue.

The 'Edit Type' action allows you to resolve most type inference issues. This automatically converts the Shopify data types for string fields (between single_line_text_field and multi_line_text_field) and number fields (between number_integer and number_decimal).

Sanity Connect dashboard with alert for sync errors

Sync content to Shopify metaobjects

v2024-06-05

We're extending our Shopify integration to sync your Sanity documents and fields as Shopify custom data. Custom document types will sync as metaobjects. Custom fields on Products, Product Variants, and Collections will sync as metafields.

These metaobjects and metafields are available in your Liquid and Hydrogen-based Shopify storefronts.