Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Retrieving Customer Tags by Email at Checkout - Query Issue

Retrieving Customer Tags by Email at Checkout - Query Issue

muratx10
Shopify Partner
9 1 10

Hi everyone,

 

We’re using our own checkout extension and want to implement a feature that depends on customer tags. Specifically, we need to retrieve customer tags when a customer enters their email at checkout. Despite having all the necessary permissions granted by the store owner, our query to get the customer tags isn’t working. The request fails with the error: “Field ‘customers’ doesn’t exist on type ‘QueryRoot’”.

 

Interestingly, the same query works perfectly fine when run in the GraphiQL app. Our challenge is that the customer might not be logged in, but they still have an active account in Shopify. In this scenario, we need to query the customer by the entered email to check if they have specific tags.

 

Has anyone faced a similar issue or can suggest a way to achieve this? Any help would be greatly appreciated.

 

Thank you!

CleanShot 2024-07-29 at 7 .20.30@2x.jpg

CleanShot 2024-07-29 at 7 .18.41@2x.jpg

CleanShot 2024-07-29 at 7 .19.39.jpg

Reply 1 (1)

Liam
Community Manager
3108 344 904

Hi Muratx10,

 

Checkout UI extensions can't currently access customer tags, which is why the query is working on the GraphiQL tool but not within a checkout UI extension. I've flagged this as a feature improvement with our checkout team.

Liam | Developer Advocate @ 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 Shopify.dev or the Shopify Web Design and Development Blog