Getting Your Access Token from Salesforce
Overview
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 discuss how SmartFlows complied with Salesforce security model utilizing a Salesforce generated access token.
Overall Flow
You need to have access token to make an API call. To generate a Salesforce OAuth access token, you need the following information:
- Salesforce Username
- Password
- Consumer Key
- Consumer Secret
Contact your Salesforce administrator if you have any questions about these items.
Configure Your Action
- Add an External Webcall action to your SmartFlow.
- Configure the action values as follows:
- Headers: No special headers are required for the request
- Username and Password: This information is part of the body of the request, so we leave these values blank
- Method: Set this value to POST
- Timeout: The default is 10 seconds
- URL of Service: Set 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 =
- Password=
For more information on the response you receive from Salesforce, see the Salesforce OauthToken documentation.
To capture the access token value, map the desired variable to the value access_token.
You can now utilize your variable to access data from Salesforce.