Customer has null created_at and updated_at fields in an Order webhook message

Solved
JiajinZhao
New Member
3 0 0

Hi, 

We are using Shopify webhooks to get order updates, and an order webhook message contains a Customer field.

Lately, we are seeing some order webhooks contain a customer with null created_at  and updated_at fields, and we have some logic based on the updated_at field, so this is causing some problems.

May I ask why the created_at and updated_at of a customer would be null?

And I didn't see this problem before, is there a new change on the Shopify side that is causing this behavior? 

Accepted Solution (1)

Accepted Solutions
L_J_K
Shopify Staff
363 54 65

This is an accepted solution.

Hey @JiajinZhao 

 

Indeed there is some expected behaviour in which those values would be null on orders/create and orders/updated. For example, they would be null when a test orders/create or orders/update webhook notification is sent from the Admin.

 

Additionally I note that if a draft order is created without a customer (and the Draft Order is then turned into an Order) then orders/create & orders/updated will fire,  and there will not be a customer present in the received webhook.

 

That said, there hasn't been any changes with the Webhook behaviour as far as I'm aware. If this is still a persistent for you, please free to share some example Order Id's (via DM if it's easier) and I can take a look at them - there may be a particular scenario that explains why they would be null. Thanks!

 

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!

View solution in original post

Replies 3 (3)
JiajinZhao
New Member
3 0 0

Let me know if you need more information about this, thanks!

JiajinZhao
New Member
3 0 0

Hi, is there any update on this? thanks! 

L_J_K
Shopify Staff
363 54 65

This is an accepted solution.

Hey @JiajinZhao 

 

Indeed there is some expected behaviour in which those values would be null on orders/create and orders/updated. For example, they would be null when a test orders/create or orders/update webhook notification is sent from the Admin.

 

Additionally I note that if a draft order is created without a customer (and the Draft Order is then turned into an Order) then orders/create & orders/updated will fire,  and there will not be a customer present in the received webhook.

 

That said, there hasn't been any changes with the Webhook behaviour as far as I'm aware. If this is still a persistent for you, please free to share some example Order Id's (via DM if it's easier) and I can take a look at them - there may be a particular scenario that explains why they would be null. Thanks!

 

| API Support @ Shopify |
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution!

View solution in original post