GeneratedUserData Class

Stores the output of the Generate User Data invocable action, which you can access in Flow Builder.

Namespace

Auth

Usage

For single sign-on (SSO) implementations that use the authentication provider framework, you must set up a registration handler that creates and updates users who log in via the identity provider. In some cases, the identity provider doesn't return enough information to create a user record in Salesforce. If you use Flow Builder for your registration handler, you can use the Generate User Data invocable action to help you create complete user records. This action generates placeholder data for all required fields for the User object.

The Auth.GeneratedUserData class stores the output of this action. Use the output as an Apex-defined variable in the flow. When you create a user, reference specific properties from this class to set values for required fields.

For more information, see these resources in Salesforce Help.

GeneratedUserData Constructors

The following are constructors for GeneratedUserData.

GeneratedUserData(firstName, lastName, email, username, alias, languageLocaleKey, localesIdKey, emailEncodingKey, timeZoneSidKey)

The Generate User Data action in Flow Builder uses this constructor to create an instance of the Auth.GeneratedUserData class.

Signature

public GeneratedUserData(String firstName, String lastName, String email, String username, String alias, String languageLocaleKey, String localesIdKey, String emailEncodingKey, String timeZoneSidKey)

Parameters

firstName
Type: String
Stores a generated placeholder value for the user's first name. The generated value is placeholder-first-name.
lastName
Type: String
Stores a generated placeholder value for the user's last name, also known as family name. The generated value is placeholder-last-name.
email
Type: String
Stores a generated placeholder value for the user's email address. The generated value is placeholder-email@example.com.
username
Type: String
Stores a generated placeholder value for the user's username. The generated value is placeholder-username<unique 14-character number>@example com, such as placeholder-username17370000000000@example com.
alias
Type: String
Stores a generated placeholder value for the user's alias. The generated value is alias.
languageLocaleKey
Type: String
Stores the default value for the user's language, such as en_US for English. The default value is the language for the registration handler execution user. The execution user is specified in the Run As field in the authentication provider definition.
localesIdKey
Type: String
Stores the default value for the user's locale, defined using two-letter International Organization for Standardization (ISO) codes. For example, en_US indicates English (United States). The default value is the language for the registration handler execution user. The execution user is specified in the Run As field in the authentication provider definition.
emailEncodingKey
Type: String
Stores the default value for the email encoding type for the user, such as UTF-8. The email encoding type determines how Salesforce encodes characters in outgoing emails. The default value is the email encoding key for the registration handler execution user. The execution user is specified in the Run As field in the authentication provider definition.
timeZoneSidKey
Type: String
Stores the default value for the user's time zone, such as GMT-07:00) Pacific Daylight Time (America/Los_Angeles). The time zone is defined using region and key city according to ISO standards. The default value is the time zone for the registration handler execution user. The execution user is specified in the Run As field in the authentication provider definition.

GeneratedUserData Properties

The following are properties for GeneratedUserData.

alias

Stores a generated placeholder value for the user's alias. The placeholder value is alias.

Signature

public String alias {get; set;}

Property Value

Type: String

email

Stores a generated placeholder value for the user's email address. The placeholder value is placeholder-email@example.com.

Signature

public String email {get; set;}

Property Value

Type: String

emailEncodingKey

Stores the default value for the email encoding type for the user, such as UTF-8. The email encoding type determines how Salesforce encodes characters in outgoing emails. The default value is the email encoding key for the execution user specified in the Run As field in the authentication provider definition.

Signature

public String emailEncodingKey {get; set;}

Property Value

Type: String

firstName

Stores a generated placeholder value for the user's first name. The placeholder value is placeholder-first-name.

Signature

public String firstName {get; set;}

Property Value

Type: String

languageLocaleKey

Stores the default value for the user's language, such as en_US for English. The default value is the language for the registration handler execution user. The execution user is specified in the Run As field in the authentication provider definition.

Signature

public String languageLocaleKey {get; set;}

Property Value

Type: String

lastName

Stores a generated placeholder value for the user's last name, also known as family name. The placeholder value is placeholder-last-name.

Signature

public String lastName {get; set;}

Property Value

Type: String

localesIdKey

Stores the default value for the user's locale, defined using two-letter International Organization for Standardization (ISO) codes. For example, en_US indicates English (United States). The default value is the language for the registration handler execution user. The execution user is specified in the Run As field in the authentication provider definition.

Signature

public String localesIdKey {get; set;}

Property Value

Type: String

timeZoneSidKey

Stores the default value for the user's time zone, such as (GMT-07:00) Pacific Daylight Time (America/Los_Angeles). The time zone is defined using region and key city according to ISO standards. The default value is the time zone for the registration handler execution user. The execution user is specified in the Run As field in the authentication provider definition.

Signature

public String timeZoneSidKey {get; set;}

Property Value

Type: String

username

Stores a generated placeholder value for the user's username. The placeholder value is placeholder-username<unique 14-character number>@example com, such as placeholder-username17370000000000@example com.

Signature

public String username {get; set;}

Property Value

Type: String