Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null fields in purchase.pickup-point-delivery-option-generator.fetch #520

Open
victorvilarocket opened this issue Jun 18, 2024 · 3 comments
Assignees

Comments

@victorvilarocket
Copy link

victorvilarocket commented Jun 18, 2024

Describe the bug

We are using the new Pickup Points Delivery Option Generator API in our checkout and we are getting some null values when entering the address.

Screenshot 2024-06-18 at 13 44 30

Screenshot 2024-06-18 at 13 46 03

Screenshot 2024-06-18 at 13 47 23

Here's my fetch.graphql:

query FetchInput { deliveryAddress{ address1 address2 company provinceCode zip phone city countryCode longitude latitude } }

https://shopify.dev/docs/api/functions/reference/pickup-point-delivery-option-generator/graphql/input

Expected behavior

Address1, address2 and city should have values in the input purchase.pickup-point-delivery-option-generator.fetch.

Environment

MacOS
Shopify CLI version 3.60

@victorvilarocket
Copy link
Author

@mathiusj @davejcameron @FriedRiceNoodles @adampetro
can you help me here please?

@VictorNiharra
Copy link

cc @joshua-arts can you take a look pls?

@joshua-arts joshua-arts self-assigned this Aug 9, 2024
@joshua-arts
Copy link
Contributor

joshua-arts commented Aug 9, 2024

Hey @victorvilarocket!

The address here comes from the address that the buyer enters into the pickup points search field at checkout, which is not required to be a full address.

As an example, you can search for "Ontario, Canada" to find pickup points generally within the province, which doesn't have a city or a postal code attached. In this case, you'd see just a lat/long (which is general to ON), zone and country data.

We do our best to try and infer the postal code and city, but this is based on the buyer location and that does not always match up to the search result (and we won't send it through if it doesn't match the search country / zone).


Totally get the the typing here isn't super clear, and I think we can make improvements to the field and documentation to make it clear that you cannot rely on some fields being present all the time. At the bare minimum, you should always get a lat/long and a country.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants