I’m dealing with a strange Shopify issue and neither I nor Shopify Support have been able to figure out what’s causing it.
For some customers, the order itself looks completely correct:
- Shipping address is correct
- Billing address is correct
However, when I open the customer page in Shopify Admin, I see two customer addresses:
A correct address with all the expected details.
A “Default” address that is almost identical to the correct address, except that the country is shown as Belgium (the store country, probably it shows it cause it cant be empty) and the province/state is missing (as we don’t have it in Belgium).
A few additional observations:
- When I query the customer via GraphQL, the country field on the “Default” address is actually null (missing entirely).
- Because the country is missing, any province/state information that exists on the correct address is also missing on the “Default” address.
- The “correct” address has a phone number, but the country code is missing from the phone number.
I’ve found many examples of this, but I can’t identify any pattern of why this happens.
Has anyone seen something similar? Any idea what could be creating customer addresses with a null country value?
Hey @ilan82 ,
This is usually caused by customer data being created and updated through an app, API, import or checkout flow where the country field is not being passed
correctly. I’d recommended checking any third party app customer imports and custom integration that modify customer addresses as null country value typically does not from standard shopify address entry.
Thank You
This is a classic sign of an external app feeding bad data into Shopify. Native Shopify checkout has very strict rules and will never let a null country value slip through. Because you are seeing this, a third-party tool or external payment gateway is creating these accounts behind the scenes using broken data.
What happens is a quick two-step error. First, an app; like a subscription tool, landing page builder, or social login; creates the customer profile but leaves the country field blank. Shopify accepts it and makes it the “Default” address with a blank country. A second later, the real checkout data arrives and adds the second, correct address, leaving you with duplicate clutter.
To find the culprit, open one of these glitched customer profiles and scroll down to the Timeline. Look at the very first event at the bottom. It will usually say exactly which app or channel created the account. That should point you right to the broken integration!
Hi @ilan82
This typically occurs for checkouts or an app that pre-creates a customer before the full address payload is validated, then Shopify creates a fallback default address record. I’ve seen this happen with draft orders, headless checkouts, and some loyalty or form apps that transmit partial address objects.
I’d start by looking at any custom checkout, tracking scripts, or apps that write to the customerCreate or customerUpdate mutations. Also check if they send phone or address fields without an explicit countryCode. Removing duplicates and requiring a full ISO country code at creation usually stops it.