Development discussions around Shopify APIs
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?
Solved! Go to the solution
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!
Let me know if you need more information about this, thanks!
Hi, is there any update on this? thanks!
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!
User | RANK |
---|---|
10 | |
4 | |
3 | |
3 | |
3 |
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023