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

ManuelRC
New Member
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 4 (4)
ManuelRC
New Member
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
Shopify Staff
836 99 211

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

ManRC
New Member
2 0 0

Hi @_JB,

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😞

  • Order/create fires
  • Order/update fires
  • Product/update fires

This is correct behaviour as far as I can see, but if I create a paid order with a customer, only:

  • Product/update fires

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?

Thanks,

Manuel.

 

ManRC
New Member
2 0 0

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.

Thanks,

Manuel.