Additional address fields | Shopify

We are currently using the shopify/worldwide TS package - specifically the `splitAddress1` function, to determine whether, for countries that use additional address fields, all required fields have been filled out.

For example, in Germany, the additional fields are Street Name and Building Number. At checkout, these two values are concatenated into address1, and the package allows us to detect whether both have been provided.

Because we’re building an address validation app, we rely on this information to know when we should trigger validation. Our goal is to validate only once the customer has entered a complete address (i.e., all expected fields are filled).

The problem arises when a merchant’s checkout does not expose these additional fields. In those cases, our logic assumes the address is incomplete - since “Building Number” appears to be missing - without knowing that the checkout simply doesn’t include that field at all.

With this in mind: Is there a way for us to programmatically determine whether a particular checkout supports these additional address fields or not? It doesn’t appear to be something merchants can configure, and we haven’t found a clear way to detect it?

CC @Andrej_Mazhenkovski

Hey @paulygoldston

Trying to understand this issue - if you had a list of all countries that require/ have additional fields on the Shopify checkout page, would that be enough to build logic for validation?

Hey Liam, unfortunately not. We have the list of countries from the documentation but only some stores currently has these field.

So it’s impossible for us to know which stores are using the field or not.

For example, my test store doesn’t have it for Germany but our engineer’s test store does.

It must be a gradual roll out.

There are also some fields that are optional in some countries so we don’t know which merchants are using them.

Update (as I was responding haha!) - I had also reached out to the product team responsible via email and got a response overnight. I’ll forward to you in case you want to sanitize a response for here.

Update on this issue: I can confirm this discrepancy between stores is due to a beta flag that a small number of stores have. Our recommendation to devs is to assume stores do not have this enabled, and write for the standard address form with address1, address2 fields.

1 Like