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,
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.
I just tested this and observed the following behaviour:
Created draft order with no customer, marked it as paid which created a new order:
I then added a customer to the order:
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.