Skip to content

Shopify Dude Fix

Shopify Product Webhook Payloads Aren’t Complete Variant Exports

Avoid incomplete catalog synchronization when products have many variants.

Quick answer: Treat product webhooks as change notifications and fetch authoritative variant data when a complete snapshot is required.
On this page

Why this happens

Product webhook payloads include full variant details for only the first 100 variants. Additional variant IDs can appear in variant_gids, so processing only the variants array can silently omit records.

Implementation

Queue the product ID after validating the webhook. Query the Admin GraphQL product variants connection using cursor pagination, and reconcile the complete result against the external catalog. Handle deleted products separately. Coalesce repeated updates and avoid treating a truncated payload as evidence of variant deletion.

Example

For a product with 150 variants, do not delete external records for variants 101 through 150 simply because their full details were absent from a webhook. Retrieve the current product snapshot and reconcile by variant ID only after all pages have been processed successfully.

Common misunderstanding: Receiving a successful products/update webhook does not guarantee a complete representation of the product.
How to test this:

  1. Create a development product with more than 100 variants
  2. update a late variant
  3. inspect the webhook
  4. reconcile using GraphQL
  5. simulate a failed page fetch and ensure no records are deleted
  6. test a genuine variant deletion.
Sources and further reading: Shopify reference ยท Further reading