Enabling two-way content syncing
Chord's Shopify sync service can synchronize your product and variant content between Contentful and Shopify. By default, changes are synced only from Contentful to Shopify. Chord also supports syncing from Shopify to Contentful, or in both directions simultaneously. To enable two-way sync, contact Chord.
Changing your sync settings after your store is live can have unintended consequences if your Shopify and Contentful product content is substantially different. This guide describes our suggested approach for changing your sync settings. First, let's review how content syncing works.
When you publish changes to a product or variant, Chord's sync service is notified via a webhook. The sync service retrieves the product or variant from both Contentful and Shopify and compares the two. If there are any differences in the product or variant properties, the platform where you published the product or variant is considered the source of truth, and those properties are synced to the other platform. Not all properties are synced (see the full list here).
For example, you have a product named "Small House Plant" in Shopify and Contentful. The price in Shopify is $12.99. The price in Contentful is also $12.99. If your store uses the default sync settings, changes are only synced from Contentful to Shopify, and not the other direction.
With this configuration, if you increase the price to $20.99 in Contentful and publish the product, the price in Shopify will be automatically updated to $20.99, because saving the product in Contentful triggers a product sync from Contentful to Shopify. Next, if you decrease the price in Shopify to $15.99 and publish the product, the price in Contentful won't be updated, because syncing from Shopify to Contentful isn't enabled. Now "Small House Plant" has a price of $20.99 in Contentful and $15.99 in Shopify.
The next time you publish "Small House Plant" in Contentful, perhaps after changing the description, the $15.99 price in Shopify will be overwritten by the $20.99 price in Contentful. That's because every time you save a product or a variant in a platform that's enabled with syncing, all fields will overwrite the fields in the other platform.
Content syncing is ideally enabled before your product content has been created in your store. If you're enabling it after you have product content in both Shopify and Contentful, you may want to enable it on a product-by-product basis, because there may be unexpected differences between your product content in Shopify and Contentful. If you contact Chord and ask to have two-way syncing enabled between Shopify and Contentful, we recommend the following approach.
The following sync settings are configurable by Chord:
- Direction of sync. You can sync content only from Contentful to Shopify, only from Shopify to Contentful, or two-way between Shopify and Contentful.
- Shopify sync mode. When syncing content from Shopify to Contentful, you can choose to do this selectively. This mode doesn't impact the syncing of content from Contentful to Shopify. There are two modes available, "allowlist" and "denylist". In the "allowlist" mode, Shopify products will only be synced to Contentful if they have a chord-sync tag. In the "denylist" mode, all Shopify products will be synced to Contentful unless they have a chord-no-sync tag.
- Tag syncing. By default, product tags are not synced.
- Description syncing. By default, product descriptions are not synced. This can be enabled.
If you are enabling syncing from Shopify to Contentful, and you have existing products in your storefront, we recommend starting with the "allowlist" Shopify sync mode. This will only sync products from Shopify to Contentful if the product has a tag in Shopify with the value chord-sync. If "allowlist" mode is enabled, you can enable syncing for one product at a time by adding a tag, publishing the product, and then verifying that the synced product content in Contentful is what you expected. You can read more about adding tags in Shopify here.
The "denylist" sync mode will sync all products from Shopify to Contentful unless the product has a tag in Shopify with the value chord-no-sync.
Product content syncing is always triggered by publishing the product, and the source of the "publish" action will be treated as the source of truth. Changing the Shopify sync mode from "allowlist" to "denylist" will not automatically sync all of your products from Shopify to Contentful. Products will still only be synced as you publish them individually.
These steps assume you already have content being synced from Contentful to Shopify. Syncing is configured by Chord for you when you created your storefront.
First, contact Chord to enable two-way syncing. We recommend requesting the "allowlist" sync mode.
Once two-way syncing is enabled by Chord in "allowlist" mode, test on a single product. To test, review the product and variant content in both Shopify and Contentful and verify the synced properties are the same in both platforms (review the list of synced properties here). If a property is different between Shopify and Contentful, determine which one is the correct version.
When Contentful has the correct content: If the product and variant content in Contentful is the content you would like to see in both platforms, first publish the product and variant in Contentful. This will sync the product and variant content from Contentful to Shopify. Then add a tag to the product in Shopify with the value chord-sync.
When Shopify has the correct content: If the product and variant content in Shopify is the content you would like to see in both platforms, first add a tag to the product in Shopify with the value chord-sync. Then publish the product in Shopify. This will sync the product and variant content from Shopify to Contentful.
Once you've confirmed your test product has been synced and has the content you want, you can follow the same process to sync your other products.