Can users save and change customer metafields from the frontend?

Nalinda
Shopify Partner
34 0 12

Hi, Is it possible to allow users to save customer meatfields from the front end?

eg: User can save his favourite color from the frontend, and also possible to change it later

Also is it possible to sync Customer matafileds to Klaviyo?

Thank you!

Replies 8 (8)

KetanKumar
Shopify Partner
36904 3640 11985

@Nalinda 

Sorry you are facing this issue, it would be my pleasure to help you.

Welcome to the Shopify community!😊
Thanks for your good question.

Please share your site URL,
I will check out the issue and provide you a solution here.

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing

MetafieldsGuru
Shopify Partner
158 32 99

Hi @Nalinda ,

 

There is no default tool to create metafields from the front end. Due to safety concerns, it's not possible to edit metafields directly on the front end with the storefront API. One can create or update metafields only via the REST or GraphQL APIs. Which would require a sophisticated external integration to collect the data from your customers, process it and convert into metafields. You may want to consider using the customized registration form instead.

Check out Metafields Guru, the #1 ranked metafields app.

Bulk editor | Data import/export | Metafield sets | Browser extension

KarimTarek
Shopify Partner
34 0 10

As others mentioned, out of the box it's not possible. However a couple of months ago I built a niche app (FieldsRaven) for theme developers to make it possible.

 

Your use case is perfect fit for the app, if you're comfortable working with code it should be really simple, otherwise you'll need some dev help. Here is the quick start guide.

 

If you've any questions please let me know.

 

 

ss-dub
Visitor
2 0 0

Hi  @KarimTarek, is there any way to update the metafield without logged in rule?

KarimTarek
Shopify Partner
34 0 10

@ss-dub you mean using FieldsRaven? It depends on the use case, but yes it's possible, give it a try!

ss-dub
Visitor
2 0 0

@KarimTarek Thank you for the fast response. Yes, the question was for FieldsRaven. What I need is to save customer related fields such as DOB and Zip Code that we gather from other forms on the website, registration and checkout to the customer record. So I need to get this data without needing to have the customer logged in.

At the moment this is done with customer notes, but it should be changed with something more flexible. Hope it makes sense for you

KarimTarek
Shopify Partner
34 0 10

@ss-dub FieldsRaven needs an object ID – in your case customer.id – to attach the metafield to the right object, without having a logged in customer how would you know where to save the metafield?

JaviExpress
Shopify Partner
183 16 26

The app in my signature has a module, Custom Forms, that allows you to create custom registration and profile forms to collect additional information from your customers. This additional information is already saved in Shopify customer metafields, where you can use it to segment your customers (since Shopify segments admit conditions based on metafields). And it can also be pushed to Klaviyo at the same time that the forms are submitted thanks to the available integration.

Customer Accounts Concierge
Turn the account page into a beautiful and multifunctional customer portal. Integrate contents, tools, and CRM features from other apps to drive a longer, richer and more personalized customer experience: Profile, Order History, Loyalty, Wishlist, Social Login, Customer Forms.