Syncing section-based blog post content across multiple stores is possible via the Admin API, but it is more complex than copying traditional body_html. The key issue is that section content lives in sections_data, which stores references to products, collections, pages, and articles by Shopify ID; those IDs differ between stores.
Main points raised:
Recommended approach: copy sections_data and replace store A resource IDs with the equivalent IDs in store B.
This implies maintaining an external ID-mapping layer, which was seen as added overhead.
A tested workaround used handles instead of IDs by changing a section setting from a product picker to a URL field, parsing the handle, and resolving it with Liquid all_products.
Concerns with the workaround:
Poorer merchant UX, since users lose the native product picker.
Reduced portability across themes, because it relies on custom content types.
Risk of hitting the Liquid all_products limit (20 unique products per page), which could break pages with many sections.
Current outcome:
No ideal built-in sync solution was identified.
Options left were manual duplication, maintaining external ID mappings, or using a third-party builder.
An additional unresolved question asked whether replacing shopify://shop_images/... with an origin-store image URL would hotlink the original image or re-import it into Shopify’s CDN.
We’ve been looking at the developer preview and are excited about deploying this on upcoming projects.
One of the use cases we’re considering is syncing content across multiple plus stores. If a user creates a blog post on one site, we want to copy that to another site using the API.
On current non-sectioned pages that would be fairly straightforward, as most of the content would reside in the body_html property.
How could this be approached on sectioned blog posts (assuming the two stores share a common theme)?
Thanks for getting in touch and we’re glad to hear you’re excited to start using the new theme architecture on your projects. The use-case you’ve described should be possible, but it will be slightly more complex than how you would presently transfer content like a blog post across different Shopify stores.
Since all of the store data (like blog post content) is accessible through the Admin API it will be possible to copy content from one store to another. However, you’ll be copying sections_data (instead of body_html) which contains references to resources such as products, collections, etc. by ID, and IDs (unlike handles) cannot be the same across shops. This means that during the process of copying sections_data you’ll need to replace the product/etc. IDs of shop A with the IDs of the equivalent product/etc. in shop B.
Hope this helps Chris- there’s some more info on this on our help docs here.
Thanks @Liam - that makes sense, but would require that we maintain some form of mapping of IDs between the sites. This is of course possible, but there’s an overhead. We know the handles are going to be the same between the two sites, so if we had the handle we could smooth this.
I have an alternative solution which I’ve tested and appears to work, but would greatly appreciate your thoughts.
Taking the ‘Featured product’ type:
Change the ‘static > type’ from ‘product’ to ‘custom’
The user can no longer choose a product, so we add a new ‘url’ field to the schema. Prompt the user to pick a product from this → this gives us a handle, not an ID.
Filter the url to parse off the handle
Pass the handle to ‘all_products’ to get the product
This seems to work well, and gives us the handle via the API:
The process you’ve described would work but we wouldn’t recommend this approach because it leads to bad UX (adopting a URL picker instead of a product picker), and using the custom content type means the content would not be portable across themes. The lack of portability across themes may not a concern in the short-run, but when you make major redesigns theme portability could be helpful.
Additionally using the all_products global carries the risk of running into the “20 per page” limit described here which makes it likely that pages with a lot of sections will error out.
Another question on this. If we were having to sync images - obviously there’s no files API. If we were to replace the ‘shopify://shop_images/’ in the below with the URL/path of the originating site, would this work? Would it reference the original URL or would it import it anew into the CDN?