Create new product fires both a "products/update" as well as a "products/create"

Highlighted
Tourist
6 0 0

Hi, 

I've recently noticed that both our "products/update" as well as our "products/create" webhooks are called when a product is updated in the dashboard. This looks like it started somewhere around Sept 17.

Is this a bug or some sort of new behaviour?

To test and verify this, I created one create and one update webhook on a test shop:

        {
            "id": 929642414232,
            "address": "https://<redacted>.ngrok.io/update",
            "topic": "products/update",
            "created_at": "2020-09-22T20:56:58+02:00",
            "updated_at": "2020-09-22T20:56:58+02:00",
            "format": "json",
            "fields": [],
            "metafield_namespaces": [],
            "api_version": "2019-07",
            "private_metafield_namespaces": []
        },
        {
            "id": 929642578072,
            "address": "https://<redacted>.ngrok.io/create",
            "topic": "products/update",
            "created_at": "2020-09-22T20:57:04+02:00",
            "updated_at": "2020-09-22T20:57:04+02:00",
            "format": "json",
            "fields": [],
            "metafield_namespaces": [],
            "api_version": "2019-07",
            "private_metafield_namespaces": []
        }


I then created a new product, and this is what I get on my Ngrok inspection page:

iz-ps_0-1600802650695.png

Two requests, received almost at the same time, the first one sent by 34.75.22.139 and the second one by 35.185.79.43.

 

0 Likes
Highlighted
Shopify Staff
Shopify Staff
5 1 0

  Welcome to the forum!

It looks like both of those responses are from subscriptions with the products/update topic. If a products/create hook were firing, I'd expect to see that topic in one webhook. 

Is it possible that you have two separate products/update subscriptions, one of which is pointing at the CREATE address by mistake? This might happen if you have two different test apps installed on the same test shop.

0 Likes
Highlighted
Tourist
6 0 0

Hi,

 

Oops, sorry, that was a copy-paste mistake from my side. I deleted those webhooks and created new ones, this time making sure to use the correct topics and I get the same result as we see in our production integration (where we haven't changed any webhooks recently):

        {
            "id": 930600353944,
            "address": "https://<redacted>.ngrok.io/update",
            "topic": "products/update",
            "created_at": "2020-09-24T10:49:31+02:00",
            "updated_at": "2020-09-24T10:49:31+02:00",
            "format": "json",
            "fields": [],
            "metafield_namespaces": [],
            "api_version": "2019-07",
            "private_metafield_namespaces": []
        },
        {
            "id": 930600386712,
            "address": "https://<redacted>.ngrok.io/create",
            "topic": "products/create",
            "created_at": "2020-09-24T10:49:38+02:00",
            "updated_at": "2020-09-24T10:49:38+02:00",
            "format": "json",
            "fields": [],
            "metafield_namespaces": [],
            "api_version": "2019-07",
            "private_metafield_namespaces": []
        }
    ]

 

I still get two calls, from two different IPs, one hitting the /create endpoint and the other one hitting the /update endpoint, almost simultaneous.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
19 6 7

Hello, @iz-ps , thanks for the additional information. We're currently undergoing an investigation about what's going on here. We'll update once we have more information.

Highlighted
Tourist
6 0 0

Hi,

Any updates on this? I'm still receiving an extra "products/update" webhook request when creating new products.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
19 6 7

Hello @iz-ps,

We know that there is both a create and an update action sent when creating a product via the admin UI, which is why two webhooks are being sent in those cases. The corresponding team is investigating the issue and have been instructed to update this thread once it has been fixed.

Highlighted
Tourist
6 0 0

Hi @james-langille, awesome, thanks. I hope they can sort it out quickly  

0 Likes
New Member
1 0 1

We are also seeing the exact same behavior for order/updated + order/create. We get 2 events fired at the same time and order/updated it always coming in first.

 

Highlighted
Tourist
6 0 0

Hi again,

@james-langille is it possible to give some sort of ETA for when this will be fixed? 

0 Likes
Highlighted
Tourist
6 0 0

@james-langille Any updates on this? It is now close to one month since I reported this and I still get the same behaviour. Do I need to go through some other channel to get this created as a bug report or what?

1. Subscribe to products/create and products/update
2. Create a product
3. Receive a callback for the create event:

iz-ps_0-1603095903411.png

4. Boom, receive an unexpected callback for a non-existing update event. 

iz-ps_1-1603095939929.png

Are we supposed to live with this or are you working on fixing it? Any ETA?

0 Likes