UserProvisioningPlugin Class

The UserProvisioningPlugin base class implements Process.Plugin for programmatic customization of the user provisioning process for connected apps.

UserProvisioning

Extending this class gives you a plug-in that can be used Flow Builder as a legacy Apex action, with the following input and output parameters.

Input Parameter NameDescription
userProvisioningRequestIdThe unique ID of the request for the plug-in to process.
userIdThe ID of the associated user for the request.
NamedCredDevNameThe unique API name for the named credential to use for a request. The named credential identifies the third-party system and the third-party authentication settings.
When the named credential is set in the User Provisioning Wizard, Salesforce stores the value in the UserProvisioningConfig.NamedCredentialId field.
reconFilterWhen collecting and analyzing users on a third-party system, the plug-in uses this filter to limit the scope of the collection.
When the filter is set in the User Provisioning Wizard, Salesforce stores the value in the UserProvisioningConfig.ReconFilter field.
reconOffsetWhen collecting and analyzing users on a third-party system, the plug-in uses this value as the starting point for the collection.
Output Parameter NameDescription
StatusThe vendor-specific status of the provisioning operation on the third-party system.
DetailsThe vendor-specific message related to the status of the provisioning operation on the third-party system.
ExternalUserIdThe vendor-specific ID for the associated user on the third-party system.
ExternalUsernameThe vendor-specific username for the associated user on the third-party system.
ExternalEmailThe email address assigned to the user on the third-party system.
ExternalFirstNameThe first name assigned to the user on the third-party system.
ExternalLastNameThe last name assigned to the user on the third-party system.
reconStateThe state of the collecting and analyzing process on the third-party system. When the value is complete, the process is finished and a subsequent call to the plug-in is no longer needed, nor made.
nextReconOffsetWhen collecting and analyzing users on a third-party system, the process may encounter a transaction limit and have to stop before finishing. The value specified here initiates a call to the plug-in with a new quota limit.

If you want to add more custom parameters, use the buildDescribeCall() method.

The following example uses the buildDescribeCall() method to add a new input parameter and a new output parameter. The example also demonstrates how to bypass the limit of the 10,000 records processed in DML statements in an Apex transaction.

The following are methods for UserProvisioningPlugin.

  • buildDescribeCall()

    Use this method to add more input and output parameters to those defined in the base class.

  • describe()

    Returns a Process.PluginDescribeResult object that describes this method call.

  • getPluginClassName()

    Returns the name of the class implementing the plugin.

  • invoke(request)

    Primary method that the system invokes when the class that implements the interface is instantiated.

Use this method to add more input and output parameters to those defined in the base class.

public Process.PluginDescribeResult buildDescribeCall()

Type: Process.PluginDescribeResult

Returns a Process.PluginDescribeResult object that describes this method call.

public Process.PluginDescribeResult describe()

Type: Process.PluginDescribeResult

Returns the name of the class implementing the plugin.

public String getPluginClassName()

Type: String

Primary method that the system invokes when the class that implements the interface is instantiated.

public Process.PluginResult invoke(Process.PluginRequest request)

Type: Process.PluginDescribeResult