Access to information in Salesforce is critical to improving your customer’s experience. To ensure proper security and confidentiality, Salesforce utilizes OAuth authentication as a security model.
In this section, we will discuss how SmartFlows complied with Salesforce security model utilizing a Salesforce generated access token.
The Overall Flow
To generate a Salesforce OAuth access token, you will need the following information:
We need to have access-token to make an API call. In this process, we are using
- Salesforce username
- consumer key
- consumer secret
Please contact your Salesforce administrator if any of this info is required.
Grab an external webcall action
Configure your action
Add the following to your new external webcall action
- HeadersNo special headers are required for the request
- Username and PasswordThis information will be part of the body of the request, so we will leave these values blank.
- MethodSet this value to POST
- TimeoutThe default is 10 seconds
- URL of ServiceSet this value to https://test.salesforce.com/services/oauth2/token.
- Name/Value Parameters
- Enter the following name/value pairs:
- Grant_Type = Password
- Client_ID =
- Client_Secret =
- Username =
For more information on the response you will receive from Salesforce please visit the following https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_oauthtoken.htm
- To capture the access token value please map the desired variable to the value access_token.
You can now utilize your variable to access data from Salesforce.