I’m developing a Shopify store with custom fields for customer registration.
Right now I’m handling custom data with a flow event that triggers upon registration and populates all the custom info from notes to custom metafields.
I’d like to create some sort of backend event that triggers before the account creation to check the data and display error messages to users. I saw that I could use the admin API with an app hosted on a third-party hosting service.
But I’d like to know if there is a way to catch the event and do what I want to do before the profile gets created and everything within Shopify infrastructure.
I looked at functions, webhooks and Shopify App but I gotta say, I’m a bit lost with all those options.
I also know I could do frontend validation but I’d like more robustness using backend implementation.
Shopify’s built-in customer registration process doesn’t offer a native way to intercept and validate data on the backend before an account is created. That means you can’t directly trigger a pre-account-creation event within Shopify’s infrastructure to block invalid registrations. Your best options are to implement robust frontend validation or build a custom registration flow on an external server that uses the Admin API to create customer accounts only after validating the data. Webhooks, Shopify Flow, and Shopify Functions only trigger after the customer has been created, so they won’t help with pre-validation. While it’s not ideal, a custom registration solution would give you the control you need to ensure data quality before creating a customer profile.
I wanted to ensure it is not possible before losing too much time testing stuff. You saved me some time.
I’ll create a robust front-end validation. It is not ideal but good enough to make it works.
Thank you Promer-Aila !