Stop webhooks call for product updates originating from shopify API

Topic summary

A developer seeks to prevent Shopify webhooks from triggering when product updates originate from their own API calls rather than from shop owners. Currently, API-initiated updates trigger product/update webhooks, causing duplicate processing on their server.

Confirmed Limitation:

  • Shopify does not natively support filtering webhooks by update source (API vs. UI)
  • No official plans mentioned to add this functionality

Proposed Workarounds Discussed:

  1. Metafields approach (explored but deemed problematic):

    • Add custom “actor” metafield to track update source
    • Fails for updates because the field persists across subsequent user edits
    • Creates logical loops when trying to toggle between “API” and “UI” values
  2. Redis cache solution (suggested workaround):

    • Store product IDs in cache before API updates
    • Webhook handler checks cache and skips processing if ID exists
    • Use short TTL (few seconds) to avoid blocking legitimate user updates
  3. Timestamp-based filtering (alternative suggestion):

    • Compare webhook’s lastUpdatedAt with stored timestamp
    • Skip processing if time difference is too small (e.g., <10 seconds)
    • Prevents duplicate handling of rapid successive updates

Status: Unresolved by Shopify; developers implementing custom workarounds

Summarized with AI on October 29. AI used: claude-sonnet-4-5-20250929.

Sounds like an interesting solution yes, I didn’t know you could arbitrarily create product fields like that, aren’t you supposed to respect the fields listed in the Product API payload when you create/update a product via the API ?