Have your say in Community Polls: What was/is your greatest motivation to start your own business?
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.

Update customer

Solved

Update customer

radovanhodor
Tourist
11 0 3

Hi, is it possible to update Customer tags, metafield ?

via Storefront API, Customer API or with some any other news 

Accepted Solution (1)
SBD_
Shopify Staff
1831 273 421

This is an accepted solution.

My mistake, thanks for the clarification! That's not available using Storefront API or the new Customer API. If you're building on Hydrogen, one work around would be to hit the Admin API under the hood.

Scott | Developer Advocate @ Shopify 

View solution in original post

Replies 5 (5)

SBD_
Shopify Staff
1831 273 421

Hey @radovanhodor 

 

Yep, with the customerUpdate mutation.

Scott | Developer Advocate @ Shopify 

radovanhodor
Tourist
11 0 3

but this is admin API.

i was asking whether it is by these 2:

via Storefront API, Customer API (new updates, if i missed something).

I am using react hydrogen storefront.

 
SBD_
Shopify Staff
1831 273 421

This is an accepted solution.

My mistake, thanks for the clarification! That's not available using Storefront API or the new Customer API. If you're building on Hydrogen, one work around would be to hit the Admin API under the hood.

Scott | Developer Advocate @ Shopify 

radovanhodor
Tourist
11 0 3

How would u hit the Admin API under the hood

SBD_
Shopify Staff
1831 273 421

The process might look like passing a (verified) customer ID to a route which calls the Admin API to update customer tags. Be sure to keep this on the server side (in a loader or action).

 

Scott | Developer Advocate @ Shopify