pre-user-registration
trigger to add end-user supplied data (like a user’s phone number or location) from the signup prompt to user_metadata
. Optionally, you can validate this data and show a validation error in the prompt.
Prerequisites
- Tenant has a Custom Domain verified
- Tenant has a Page Template set
Add A Field To The Signup Prompt
Use the Management API to insert a custom field into a prompt using one of the Entry Points. This example adds the following content to theulp-container-form-content-start
insertion point:

Create An Action In The Pre-User Registration Trigger
You can build a custom pre-user registration action by going to Actions > Library > Build Custom.
onExecutePreUserRegistration
handler:
api.validation.error
method, then deploy the action:
Add The Action To The Flow
Navigate to Actions > Flows > Pre User Registration > Add Action > Custom, then drag and drop your new action into the registration flow and select Apply.
Test The Action
Sign up for an account in your test flow and leave the First Name field blank. You will see an error on submit:

Verify That The Data Was Saved On user_metadata
Navigate to User Management > Users, then confirm the data has been saved by viewing the Details tab: