Newer Version Available
UserProvisioningPlugin Class
Namespace
Usage
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 Name | Description |
|---|---|
| userProvisioningRequestId | The unique ID of the request for the plug-in to process. |
| userId | The ID of the associated user for the request. |
| NamedCredDevName | The 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. |
| reconFilter | When 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. |
| reconOffset | When collecting and analyzing users on a third-party system, the plug-in uses this value as the starting point for the collection. |
| Output Parameter Name | Description |
|---|---|
| Status |
The vendor-specific status of the provisioning operation on the third-party system. |
| Details | The vendor-specific message related to the status of the provisioning operation on the third-party system. |
| ExternalUserId | The vendor-specific ID for the associated user on the third-party system. |
| ExternalUsername | The vendor-specific username for the associated user on the third-party system. |
| ExternalEmail | The email address assigned to the user on the third-party system. |
| ExternalFirstName | The first name assigned to the user on the third-party system. |
| ExternalLastName | The last name assigned to the user on the third-party system. |
| reconState | The 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. |
| nextReconOffset | When 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.
Example
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.
UserProvisioningPlugin Methods
The following are methods for UserProvisioningPlugin.
invoke(request)
Signature
public Process.PluginResult invoke(Process.PluginRequest request)
Parameters
- request
- Type: Process.PluginRequest