Webhook Create Order doesn't have customer email

IvanPro
Shopify Partner
7 0 3

Sometimes webhook 'order/create' doesn't have customer email? Why this happens? Webhooks docs says that it will be here and shopify also ask for email on checkout page. Maybe I should use another webhook for this? 
My goal to send email to customer while order is created.  

PLease advice)

Replies 2 (2)

Zameer
Shopify Staff
297 31 90

Hey there,

 

Orders created through Shopify's online checkout require either an e-mail address or a phone number. It's also possible to create orders through the API where neither are present. 

 

If you are receiving webhook notifications for newly created orders where the e-mail parameter is blank, then there must not have been an e-mail associated with the order when it was created.

To learn more visit the Shopify Help Center or the Community Blog.

BogdanM
Shopify Partner
123 3 26

Hi,

 

Please look here.

I quote from that page: "The order might not have a customer and apps should not depend on the existence of a customer object. This value might be null if the order was created through Shopify POS."

 

Could this be your case?

Bogdan | WebShopAssist
User friendly apps with top-rated support
- SKUGen the SKU generator
- DPD Integration