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.

Hi,

Basically I’ve setup webhooks for when a user creates or updates a product.
This webhook calls my server and updates the state of my app which is
tracking those changes.
But sometimes my app is the one initiating those product creates & updates
through a call to the Shopify api. In these situations I don’t want the
shopify webhook to tell me again about those changes, because I’ve already
updated the state of my app accordingly. These webhook calls are
duplicating those changes.
My solution right now is to keep deleting & re-creating these shopify
webhooks when the product create & update are not done by a user.
But this is cumbersome, it generates traffic to your api for nothing and
it’s error prone..