Discussing APIs and development related to customers, discounts, and order management.
Hey,
Just found there are two attributes indicating the customers email related to a specific order, which are "contact_email" and "email". What the differences between them?
If I want to retrieve an order by both order name and the email address, which one should I use? Also consider the customer may checkout as a guest, which field is mandatory when customer making an order?
Thanks in advance
Hey there,
In most cases you'll find the email and contact_email on an order being the same thing, even if someone is checking out as a guest they'll still need to provide either an e-mail address or phone number depending on the shop's settings.
The main difference between the two is that in the event an email isn't provided on an order the email field won't be populated, but contact_email will consider other information like a customer account's email address so that the field doesn't necessarily end up being blank.
Josh | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog