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.
Sorry it's been a while, a parked this aspect of the application and I'm back to it now.
You said 'I then added a customer to the order', how did you do that? it seems that once the order is marked as paid a created so it stops being a draft, I can't add a customer afterwards.
Anyway, I'm still seeing an issue here.
If a create a paid order without a customer (example order number 4445838573729😞
This is correct behaviour as far as I can see, but if I create a paid order with a customer, only:
An example of an order where neither Order/create or Order/update fires is order number 4445828186273.
I am using store with URL 'manuel-test-store-appscenic-1.myshopify.com'. Please can you have a look at the logs for this?
Please ignore this.
Since I wrote my latest message I have become aware of the 'Webhook deliveries logs', this has helped me check that actually my application was receiving the webhooks but it was incorrectly filtering them out.