Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Order/created webhook not firing when order is assigned to customer

Order/created webhook not firing when order is assigned to customer

ManuelRC
Visitor
3 0 0

Hi,

I have created a number of test orders through the Shopify UI (as drafts but marked them as paid, so the order is created) - for info I have done this today 13/04/2021 between 11AM and 15.30PM - and I can see the order/created and order/updated webhooks firing when I create a basic order without a customer (product/updated webhook also fires by the way).

All good until here, but when I add a customer to the order the order/created or order/updated webhooks don't fire, only the product/updated does.

Can anyone advise? Seems like the order webhooks behave differently depending on the order being assigned to a customer. If this is intended behaviour, how do I get an order/created or order/updated webhook when the customer is present?

Also, out of curiosity, why does the product/updated webhook fire when an order is created?

Thanks in advance,

Manuel

Replies 2 (2)

ManuelRC
Visitor
3 0 0

Hi again - I raised a issue around this same topic, see: https://community.shopify.com/c/Shopify-APIs-SDKs/Order-created-webhooks-not-received/m-p/1129133#M6... which was in the end a bug which the Shopify team fixed.

It'd be great if someone could have a look at this issue I'm raising now, and take it seriously, as it's somehow related to the above (order webhooks triggering). It may be myself doing something wrong, but given the fact that in a few days working with the Shopify API I have already found a bug, I'm not sure.

Thanks.

_JB
Shopify Staff (Retired)
836 100 223

Hey @ManuelRC,

I just tested this and observed the following behaviour:

Created draft order with no customer, marked it as paid which created a new order:

  • Order/create fired
  • Order/update fired
  • Product/update fired

I then added a customer to the order:

  • Order/update fired

In this case I'm not sure why product/update is firing. It could be due to the inventory level changing, but I'm under the impression inventory changes shouldn't fire product webhooks. I'll look in to that further and let you know what I find.

In my test order/update definitely fired after adding a customer, and this is the expected behaviour. If you're still not seeing this behaviour on your end, please provide the order_id and I'll check the logs for more information.

JB | Solutions Engineer @ Shopify 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog