Authentication
- Updated: 2023/11/16
The Authentication action authenticates the automation session with Salesforce. This action is required before configuring subsequent actions for various Salesforce operations.
Note:
- Ensure that you enable the Allow OAuth Username-Password Flows toggle in OAuth and OpenID Connect Settings of your Salesforce environment as the OAuth 2.0 Username-Password Flow is blocked by default. For more information, see OAuth and OpenID Connect Settings..
- Use the Connected Apps method to set up OAuth access as Salesforce package does not support the External Client app method.
The following authentication types are available to connect to Salesforce:
- OAuth2 - Client Credentials: This authentication type uses the Salesforce authentication parameters such as Client ID, Client secret, and account credentials (username and password) to authenticate the session.
- Control room OAuth connection: This authentication type uses a pre-configured OAuth connection available in the Control Room for authentication.
Note: The examples and graphics provided on this page are for
representation purposes only and may not accurately reflect your specific instance. We do not
assume responsibility for their maintenance or
accuracy.
Prerequisites
- Ensure that the OAuth for the connected app in Salesforce has appropriate OAuth Access Policies set. See Manage OAuth Access Policies for a Connected App for more information about managing OAuth policies for connected apps in Salesforce.
- If the policy is set to Admin approved users are pre-authorized for a particular user, ensure that the Salesforce administrator has provided relevant permissions for the user.
Procedure
- Log in to the Control Room.
- Create a new bot or modify an existing bot. For more details, see Create your first bot.
- From the Actions pane, select and place it under the Start of the bot flow.
- In the Authentication Type field, select the authentication method from the drop down.
-
To view client ID and client secret details for OAuth2 - Client
Credentials authentication, complete the following steps:
-
To connect using OAuth2 - Client Credentials, complete the following steps:
-
To configure a Control room OAuth connection in Salesforce, complete the following steps:
- To connect using Control room OAuth connection, pick a Salesforce OAuth connection you have created and stored in the Control Room. For more details, see Configure OAuth connections in Control Room.
- Enter the API version. You can find the API version in your Salesforce Enterprise Edition setup. For more details, see Find Salesforce API version.
- Enter Default as the Session name.
-
Create either a Multiple or
Dictionary variable to store the response. You can do one
of the following:
- The authentication command returns a dictionary with 2 key-value pairs.
Authorization(credential type) andInstanceUrl(String type). TheAuthorizationis hidden, but you will be able to read theInstanceUrl. For example, you can use a message box to print of the value of ,$str_Authresponse{InstanceUrl}$, this returns the Salesforce URL. - You can select Multiple variable as shown below and map to a credential
variable and a string variable as keys.

Authorization returns a token, which is hidden as it is a credential type, this token can be passed directly in the Rest Web Services command.
- The authentication command returns a dictionary with 2 key-value pairs.
- Click Run to save and run your bot. Once authenticated, you will be able to use the token to call other Salesforce API services.
, and select 