Wondering if there is a way to allow customers to update metafields on the customer record, I was thinking i could write this via the admin API, but there doesn’t seem to be a scope for metafields on customers, so it looks like i would need to give access to write customers, which is a little too much scope for my liking.
Ideally I would like to add details (date of Birth, Products, etc) to their customer profile.
There is no native supported way to update any non-customer-address data from the frontend, without an order being placed; or someone creating a new customer account possibly with tags added to it’s forms during it’s creation from the frontend for use in logic.
If your not building an app yourself look at either customer-fields in the app store, or something like usemechanic to script a simple frontend form.
For shopify-flow there is also no actions like contact-form-submitted, or customer-updated etc etc that would let us do a workaround like using the address system to trigger the update-customer-metafield action.
Hypothetical spitball: there is the schedule-time trigger(minimum 24hrs) which could use the get-customer-data once every day reading in an overloaded address which you would want to blank as soon as it’s processed.
Thanks for you comments, I haven’t actually dabbled in app proxy and that might work from a validation standpoint (both of customer id and server), which then i can constraint further on access.
ill report back after i read the guides.
is this only available on partner portal or site as well?
effectively like a form sounds kind of right, I was hoping that flow had that functionality but it doesn’t.
I could definitely build the app, but it kind of seems like a missed opportunity for custom metafields, and was wondering if there is something out there.
Current working idea is to effectively create a webhook in javascript (using fetch), and then catch the webhook on a node server, validate the webhook payload and then use node to send it to metafields on the customer record.
I think latency should be ok-ish… only way to know is to test it out.
Ah, got you! For the Storefront API, you could do something like test the customer’s credentials with the customerAccessTokenCreate mutation, and keep track of their customer ID in a session.
@Chris_Sydney not sure if you are still looking for a solution to this.
We at Clouver ran into a similar problem and ended up creating an app that you can install that makes it possible for store customers to update their own metafields. You do need an AWS account (lambda functions to make shopify admin api calls) but all the backend and authentication setup is handled by the app.