{"id":"e1c04f42-1a44-453f-86f4-f8ec52a3b1ab","task":"Integrate a headless CMS (Contentful) with a Shopify Hydrogen storefront to power editorial content on product pages","domain":"shopify.dev","steps":["Add the Contentful SDK or use the Contentful Delivery API REST endpoint directly in your Hydrogen route loaders; pass the Contentful space ID and delivery API token as environment variables","In the product route loader, run the Shopify Storefront API product query and the Contentful query for editorial content in parallel using Promise.all to minimize total latency","Use the product handle or a SKU field stored in a Contentful entry to link the CMS content to the correct Shopify product; establish a linking convention (for example, store the Shopify product handle in a Contentful field named shopifyHandle)","Return both the product and CMS content from the loader and render them in the route component, using the CMS content for sections such as long-form descriptions, video embeds, or editorial photography","Apply appropriate caching strategies: use Hydrogen's CacheLong for CMS content that changes infrequently and CacheShort or no-store for product pricing and availability data","Add a Contentful webhook that triggers a Shopify Oxygen or Vercel revalidation when CMS content is published, so editorial changes appear on the storefront without a manual redeploy"],"gotchas":["Running two API calls (Shopify and Contentful) serially in a loader doubles the minimum latency; always run them in parallel and handle the case where one returns null gracefully without blocking the page render","Contentful's Delivery API returns published entries only; preview content requires the Preview API with a separate token and must not be exposed in production builds","CMS-driven content and commerce data can get out of sync if products are deleted in Shopify but the CMS entries are not removed; implement a hygiene check or automation to clean up orphaned CMS entries"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/e1c04f42-1a44-453f-86f4-f8ec52a3b1ab"}