Change imageUrl, company, email and password on Customers

Hello there :waving_hand: ,

I want my customers to be able to update the <imageUrl, company, emailAddress, password> fields on their Customer object using a form in their profile page. I searched for a couple hours in the Storefront API and the Customer Account API references but I didn’t find anything usable.

I’m using the Hydrogen + Oxygen stack that you offer.

company and emailAddress

  • I found out that using the Admin API, I can easly change the company and emailAddress fields on my Customers. Is it a good idea to implement Admin API calls in my application or I should use a third party hosting provider to act as a proxy [My store <—> Proxy server <—> Admin API] ?

imageUrl

  • For the imageUrl (profile picture) I didn’t find anything usable even in the Admin API. Why you have that field on Customer if we can’t update it?

password

  • What would be the best way to update the customer’s password in my case? Just wanna make sure I can actually offer the security level that my customers are asking for.

Hi @MD-MGNP :waving_hand:

Is it a good idea to implement Admin API calls in my application or I should use a third party hosting provider to act as a proxy [My store <—> Proxy server <—> Admin API] ?

Never expose admin rest api access directly to the frontend that isn’t designed to do that.

Always use a middleware to authenticate and proxy responses for sensitive apis.

imageURL

For the imageURL i think that’s only on the main customer object , not in the the storefront api,

So should be treated as it’s own standalone issue , either through feature request to shopify support or the storefront api feedback on github

https://github.com/Shopify/storefront-api-feedback/discussions

https://shopify.dev/docs/api/customer/2024-07/objects/Customer#field-imageurl

https://shopify.dev/docs/api/storefront/2024-07/objects/Customer

password

Passwords are managed by shopify and the customer, merchants basically get no say in that process aside from sending a password reset email. Not counting the multipass api features for Plus enterprise stores.

company and emailAddress

@MetafieldsGuru is “company and emailAddress” fields something your app can handle for headless storefronts?

You can also perhaps use a middleware automation app like mechanic to build a custom form

No off the shelf task for this exact use case but there is a demo task for a frontend to backend process

https://tasks.mechanic.dev/create-a-draft-order-from-the-cart

Also be aware, tangentially possibly useful, shopify-forms recently updated to send all entries to a metaobject

https://changelog.shopify.com/posts/shopify-forms-submissions-stored-in-metaobjects

Though I don’t think it’s possible to populate a shopify-forms form with prefilled customer info

Hi Paul,

Initially, our app was designed for backend data management. Recently we added a storefront-related part - the theme extensions for displaying metafields on the product/collection/etc page. While the app does this job flawlessly, it offers no features for custom forms or customer data collection.

Best regards,
Sasha from Metafields Guru

For the metafields-app’s maybe the HeliumCustomer Fields app can work with headless storefronts @Brett_Helium ?

or accentuate Custom Fields

Not sure of an off-the-shelf just works app for this, so would be good to have it out there.

Hey @PaulNewton thanks for the ping. Unfortunately the Customer Fields app doesn’t currently support headless so that only real option we could offer would be to use our APIs, however I am not sure there would be any real reason to do so over just using Shopify’s APIs.