New customer error: 'email': ['has already been taken']} & search.json sends empty {'customers': []}

New customer error: 'email': ['has already been taken']} & search.json sends empty {'customers': []}

GirijaMurugan
Tourist
4 0 0

Hello,

we are facing the below issue when we try to find an account by email after creating the customer with a few seconds delay,

  • When we make a GetCustomer API (Get call) using the same email with the account is created already (with a few seconds delay) it gives an empty response.
  • But, the create customer Post call is returning  'email': ['has already been taken']} for the same email.

However, after a few minutes when we make the same Get call, it responds with the customer object. Can someone share your thoughts on this behavior of Shopify GetCall?

Thanks!

Replies 2 (2)

GirijaMurugan
Tourist
4 0 0

Below are the X-Request-ID 's for both CreateCustomer and GetCustomerByEmail for reference,

CreateCustomer X-Request-ID : c15dc6c2-9593-46a7-a5fa-b154edaaba28

GetCustomerByEmail  X-Request-ID : dc1dff47-6638-4659-98a3-fa44a2560419

 

HunkyBill
Shopify Partner
4853 60 558

All I know is from a lot of API use over the years, the Customer objects are managed separately from other aspects of Shopify resources, like products and orders. So that is why you used to get orders delivered by webhooks without Customer records! They had shipped incomplete objects back in the day. I am sure that happens less these days, but I also see in my code, from time immemorial that I also used to get orders with no shipping address. Imagine that. How to deal with that? So is that because the Customer, with their shipping address, is a resource that was once again unavailable at the time of the object handling?

All I am saying is, if you are playing with Customer resources, and you expect instant, correct answers to any questions, you might want to think twice. It appears the wiring of Customer inside the platform is subject to some strange quirks of timing and "readiness". Of course, that could just be bunk too. YMMV.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com