Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I am trying to capture customers' Birthday through custom fields in the create account page, where it works, but the data is stored in Customer Notes as this "Birthday: 13-10-2022"
I wish to extract the "DD-MM-YYYY" format and place it in a predefined customer Metafield that is called birthday.
I was trying to use the variable {{customer.note}} and remove first "Birthday: " like this:
Metafield value = { {{customer.note}} | remove_first: "Birthday: " }
Please see attached photos. It is not working, and I think this value shall be deeper in code, which am not that good at. I appreciate the support and any other solution is more than welcome.
Solved! Go to the solution
This is an accepted solution.
Clear the value field completely and paste this in it...
{{ customer.note | remove: "Birthday: " }}
Please let me know if it works.
Ideally, I think this should be saved inside the order itself. In the order meta fields or order notes.
Have you considered trying that? And how are you actually saving this in customer, I mean is it through an app? In which case - have you checked if the app has the option to customize how you want to save it?
Hope this helps!
Hey @thejustintharpe,
thank you first for your reply.
what am referring to does not have to be related to any order. It is regarding customers metafields.
am already capturing the Birthday in the customer's notes, but i just need to transform this from notes to metafields.
Ok. I think I kind of understand what you're talking about.
So I'm assuming you're on the Shopify Plus plan and are using automation for some stuff.
Please provide a bit more information on how you setup those - did you do it manually via theme code (maybe a developer helped you), or did you use an app from the Store?
Because then only I could dig deeper to try to find a solution.
Thank you for your support!
Yes, I did it through custom code in the customer registration liquid. The information is being transmitted correctly, the issue is only am not able to change this text "Birthday: 13-10-2022" in notes, to the customer metafield that I defined.
Yes am using flow, but am not on shopify plus, as flow is now available for almost all shopify plans. Please check the screenshots i used in the original post as they show what am intending to do, and where the code shall be updated.
I will include here a screenshot as well, as in my opinion, I shall be able to place a code here (see screenshot) that allows me to modify/extract characters out of the variable {{Customer.notes}}.
As mentioned, I do not need assistance capturing the information, but only transforming them to metafield. So from a text in {{Customer.notes}} to a specific customer metafield in the form of dd-mm-yyyy
thanks!
As far as I know, that can be done via the API. I don't think you can do it through your Shopify theme code.
P.S. I don't see any screenshots attached at all. Maybe it's an issue on Shopify's end. But please try sharing in the reply again if possible.
Ohh, did not know that you can not see the screenshots. They are for sure uploaded in the thread.
I will try attaching them here again.
Regarding the code for customer's birthday, it is already working. Am receiving customers' birthdays in customers' notes. I used the code here to do it: https://shopify.dev/themes/customer-engagement/additional-customer-information
Please let me know if the photos are not attached until now, as I can share them on a cloud in case this doesn't work.
This is an accepted solution.
Clear the value field completely and paste this in it...
{{ customer.note | remove: "Birthday: " }}
Please let me know if it works.
That simple! it works. This is exactly what I wanted. Thank you very much @thejustintharpe
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By 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, 2024