Register an Email
Adds an email address to the user's profile in Transmit
Description
This step is used to add a user’s email to their profile in Mosaic, either as a secondary email or as the primary email, overriding the existing one. It can be used as a known email for the user for email-based authentication flows. A registered email can be removed from the user using the Deregister an Email step and retrieved using the Get User Emails step. A user's emails can also be viewed from the user's profile in the Admin Portal (from Identity Management > Users), where they are listed as secondary emails.
The user's email must be available before initiating the step. For example, the user may enter their email in a registration form (using the Get Information From Client step). Before adding the email to the user profile, you should ensure the email is verified for this user. For example, you could perform an email OTP authentication or fetch the email from a trusted source.
The user context for the step may be provided implicitly by the journey if the user is already authenticated; otherwise, a user identifier must be specified in the step configuration.
If the step is successfully completed, the journey adds the email to the user’s profile and proceeds to the next step. However, setting a primary email may fail if the email is defined as unique at the tenant level and conflicts with another user. In the event of a failure, the journey follows a specified failure branch or, if none is specified, is aborted and an error is sent to the client.
Configuration
Field | Description |
---|---|
User Auth State | Indicates if the user has authenticated in this journey. If the user is authenticated (default), the user context is provided implicitly by the journey. If not, a user identifier must be configured. |
User Identifier | User identifier, specified as an expression. Only configured if the journey doesn't authenticate the user before invoking this step. |
Email to register, specified as an expression. It should be a verified email for this user. If set as primary, it will override the current primary email. | |
Error Output Variable | Name of the variable that stores any errors returned by step |
Failure Behavior | Determines the behavior in case of failure, which either aborts the journey or proceeds to a failure branch of the control flow (default). |
Example
Consider a registration form that collects the user's email, created using the Get Information From Client step. In our example, the step ID is regForm
, the input will be stored in regData
, and the schema contains email
.
After verifying the email (e.g., using an email OTP), the Register an Email step is used to add the email for this user. Since an email OTP was performed, the user is authenticated and the user context is provided by the journey. The email can be retrieved from the form output using regForm.email
:
![Description of the image](/069f21e6695b0be2d57e26efec2f977f/register_email_ex1.png)