Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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!
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.
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.
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.
Hi @KarimTarek, is there any way to update the metafield without logged in rule?
@ss-dub you mean using FieldsRaven? It depends on the use case, but yes it's possible, give it a try!
@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
@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?
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.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024