GeneratedUserData Class

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

Auth

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.

The following are constructors for GeneratedUserData.

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

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

  • 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.

The following are properties for GeneratedUserData.

  • alias

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

  • email

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

  • 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.

  • firstName

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

  • 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.

  • lastName

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

  • 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.

  • 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.

  • 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.

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

public String alias {get; set;}

Type: String

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

public String email {get; set;}

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 execution user specified in the Run As field in the authentication provider definition.

public String emailEncodingKey {get; set;}

Type: String

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

public String firstName {get; set;}

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.

public String languageLocaleKey {get; set;}

Type: String

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

public String lastName {get; set;}

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.

public String localesIdKey {get; set;}

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.

public String timeZoneSidKey {get; set;}

Type: String

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.

public String username {get; set;}

Type: String