Identify the layer that solves the problem before selecting a build approach. A product-layout change does not automatically require a rebuild; reliable order synchronization needs an operating plan beyond theme styling.
One merchant needs a product-page change and receives a headless proposal. Another needs reliable order operations and receives a theme adjustment. Identify the layer, business operation and failure path before pricing customization and its ongoing operation.
Presentation: evaluate Liquid sections first
For product information layout or merchant-editable blocks, inspect the theme's sections, blocks and editor settings. Evaluate app assets and theme compatibility. An existing app can be appropriate when its workflow, permissions, recurring cost, support and removal path fit the store. Rebuilding a stable capability needs an operational reason.
Operations: server-side app and Admin GraphQL
Specialized order or inventory workflows may justify a custom service with narrowly scoped access. Remix can host server-side app routes; choosing Remix does not itself create a headless storefront. Pin an API version and handle pagination, query cost and mutation userErrors. An HTTP success does not guarantee the business mutation succeeded. Keep Admin credentials server-side.
Independent buying experience: Storefront API
Headless changes the customer-facing application, hosting and data flow. Storefront API supports customer-facing product and cart operations; privileged Admin work needs its own server boundary. Budget for content editing, search, analytics, app compatibility and route management. The customer journey must justify those additional responsibilities.
Design webhook intake before synchronization
Use Shopify's supported verification for the raw request and validate authenticity. Persist a durable inbox row with a unique shop-and-delivery key before acknowledging receipt. Duplicates are normal; arrival order is not a reliable business-state order. The sketch is pseudocode: every helper represents infrastructure the application must implement.
// Pseudocode: helpers represent application-owned infrastructure.
const event = await verifyShopifyWebhook(request)
await inbox.insertIfAbsent({
shop: event.shop,
deliveryId: event.deliveryId,
topic: event.topic,
resourceId: event.resourceId,
}) // Durable inbox + unique key scoped to shop and delivery.
return new Response(null, { status: 200 })
// Worker atomically claims inbox rows, fetches current Admin state,
// applies idempotent writes, then marks done; failures remain retryable.
// Scheduled reconciliation repairs missing or stale records.
Deduplication must not lose work
Recording a delivery ID and crashing before publishing a separate queue message can lose the update. A durable inbox or transactional outbox keeps intake coupled to pending work. A worker atomically claims rows, retries failures and records completion. Delivery deduplication alone does not make the external write safe after a lost response; use an operation key or idempotent upsert where the destination supports it.
Reconcile against the authoritative state
For order-sensitive changes, fetch current Admin state rather than blindly replaying stale payloads. Schedule bounded reconciliation with pagination, access limits and a durable progress cursor advanced after successful processing. Decide which system owns conflicting fields. Expose last successful synchronization, actionable failure state and replay controls for an operator. Do not promise exactly-once delivery or a fixed latency without evidence.
Make the decision reviewable
- Which layer changes: presentation, operations or buying experience?
- Does an existing capability fit?
- Who owns access, data and monitoring?
- What happens on retries, duplicates and conflicts?
- Who maintains API upgrades, costs and the removal path?
Acceptance should include a duplicate delivery, stale event, destination outage and reconciliation repair. The custom option earns its cost by solving a specific requirement with an operating plan, not by adding a preferred framework.
Distinguish delivery identity from event correlation
Shopify's delivery verification guidance distinguishes X-Shopify-Webhook-Id for delivery deduplication from X-Shopify-Event-Id for correlating deliveries from the same merchant action across subscriptions. Do not automatically collapse correlated deliveries into one business operation; define each subscription's responsibility. Saving an identity alone does not complete the work.
Inspect current state and the GraphQL result
A synchronization worker can fetch current order state rather than letting arrival order dictate the local record. This small illustrative query needs the appropriate API version and access; it is not a complete synchronization service.
query OrderForSync($id: ID!) {
order(id: $id) {
id
name
updatedAt
}
}
Check transport and GraphQL errors before trusting the result. For a mutation, inspect its userErrors as well. A missing order needs an explicit policy after errors and access are checked; an incomplete response must not automatically delete the destination record. Scope the external upsert key to shop and order ID.
Test the worker at commitment boundaries
- Crash after durable intake: work remains available for a new claim.
- Crash after the external write but before completion: retry without an unintended extra side effect.
- Older update arrives later: consult authoritative state before replacing newer data.
- Reconciliation stops midway: do not advance progress before the corresponding work succeeds.
These are acceptance and operating checks. They make custom development estimable and maintainable, while also exposing when a theme change or existing app is enough.
References: theme architecture, webhooks, Admin GraphQL and Storefront. Share the store URL, blocked workflow and connected systems through contact to scope the appropriate layer.
A concise acceptance checklist
- A defined presentation, operations or independent-storefront scope.
- Documented permissions, API version and operating cost.
- Durable webhook intake before acknowledgement with suitable deduplication.
- GraphQL-result checks, reconciliation and a replay path.