The Baggu team has a rather unique challenge with how products are sync'd & merchandised across multiple Shopify instances. In order to enhance the disjointed experience we opted to stitch data together in a single location, enter Sanity.
Products are sync'd from a wholesale and retail storefront into a single Sanity instance. From there the client has the ability to merchandise many versions of products possible in both experiences. In the sync, we create a master product that allows for unique products to appear as nested variants under a larger category type (example Standard Bag has around ~80 products living inside the Standard Baggu experience). There is a lot of sales channel, merchandising logic happening in GROQ that ensure products are always correctly rendered between the Wholesale and Retail deployments of the experience.
The other large technical solve was for a Theme like experience. Something that I've rarely seen crafted inside of Sanity. The challenge was to build things like: headers, footers, carts, and theme* content types that could easily be enabled/disabled/swapped and even pushed to staging environments. This means the client can build entirely different deployments of the wholesale and retail versions of the website with relatively similar data. I wrote an article about the pattern which you can read here.
Bonus Points
- Data syncs into a single function that splits up products into the correct places inside of Sanity, creating products, product maps, product landings, colorways and colorway family associations
- Data is removed/sync'd to Algolia and Sanity depending on Sales Channel availability
- Modular page builder for pages/collections/products
- Navigate between products effortlessly without realizing you're changing product landings when `color picking`
- Custom search querying inside of the Sanity studio to give the client the tools they need to merchandise
- Custom Filter building at a global level that reduces in complexity as you navigate further into nested collection experiences.
- All Product Images + Video is actually served from Shopify as to reduce load on the Sanity experience and leverage some of the Shopify bill. This is handled in a 2 way sync where products are uploaded to both Shopify instances and then saved back