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 will 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 will need the following information:

  • Salesforce Username
  • Password
  • Consumer Key
  • Consumer Secret

Please contact your Salesforce administrator if you have any questions about these items.

Configure Your Action

  1. Add an External Webcall action to your SmartFlow.
  2. Configure the action values as follows:
    • Headers: No special headers are required for the request
    • Username and Password: This information will be part of the body of the request, so we will 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 will receive from Salesforce, check out Salesforce OauthToken documentation.

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.