Stitch contentful entries with shopify products api
Commerce pages with CMS copy and live catalog
Contentful marketing fields plus Shopify SKU inventory in parallel. For "stitch contentful entries with shopify products api", store CONTENTFUL_ACCESS_TOKEN, SHOPIFY_ACCESS_TOKEN in Secret Vault, call https://cdn.contentful.com/spaces/{{query.spaceId}}/entries from a Worker, and let Next.js / React hit only https://realcomposer.com/v1/workspace/stitch-contentful-with-shopify-products with an rc_live_ client token.
Serial Contentful and Shopify calls slow Next.js / React pages
Each extra Contentful and Shopify hop adds hundreds of milliseconds and another OAuth refresh path your UI must manage.
- One slow upstream blocking an entire page
- Partial failures leaving UI in inconsistent states
- Duplicate auth refresh logic per service
How RealComposer Solves This at the Edge
Add vault secrets for this pipeline
Store CONTENTFUL_ACCESS_TOKEN, SHOPIFY_ACCESS_TOKEN in the vault. Next.js / React never embeds the raw secret, only a revocable rc_live_ client token.
Target the real upstream URL
Configure headersTemplate to inject vault secrets, target https://cdn.contentful.com/spaces/{{query.spaceId}}/entries, and Add output mapping fields that mirror the JSON contract your screen already expects.
Call from Next.js / React
Allowed origins on the token should list every Next.js / React host that calls this URL.
// app/api route or client component
const res = await fetch('https://realcomposer.com/v1/workspace/stitch-contentful-with-shopify-products', {
cache: 'no-store',
headers: { Authorization: 'Bearer rc_live_your_token' }
});
{
"requestId": "req_stitch-c",
"upstreamLatencyMs": 142,
"audit": {
"region": "edge",
"trace": "stitch-contentful-with-shopify-products"
},
"payload": {
"id": "sample_id",
"status": "active",
"nested": {
"tags": [
"demo"
],
"internal": true
},
"unused_blob": {
"foo": "bar",
"bar": "baz"
}
}
}
{
"contentful_entryId": "sample",
"contentful_title": "sample",
"shopify_productId": "sample",
"shopify_title": "sample"
}
Recipe Specs
- HTTP method
- GET
- Upstream calls
- 2
- Edge cache TTL
- No caching
- Client auth
- Restricted client token
- Mapped output fields
- 4
- Payload
- 258 B to 113 B (-56%)
curl -X GET "https://realcomposer.com/v1/workspace/stitch-contentful-with-shopify-products" \ -H "Authorization: Bearer rc_live_client_token"
Developer Questions & Troubleshooting
Which Contentful credential belongs in the vault for this pipeline?
Point Next.js / React at /recipes/stitch-contentful-with-shopify-products edge URL. RealComposer answers OPTIONS with Access-Control headers for allowed origins.
Does POST traffic get cached?
stitch-contentful-with-shopify-products vault headers attach server-side, but Anthropic or OpenAI model and messages must come from the client body.
What happens if an upstream step times out?
Rotate vault secrets for stitch-contentful-with-shopify-products anytime; clients keep the same rc_live_ token.
Sources & Definitions Used in This Answer
Deploy this Next.js / React + Contentful, Shopify Recipe
Clone this pre-configured pipeline into your RealComposer workspace in one click. We pre-populate upstream URLs, headers, and mapping rules.