bw:salesforce_api

This is an old revision of the document!


Salesforce.com API

All information presented here is based on the Salesforce.com Classic edition. Instructions for the Lightning edition may be slightly different.

Setup

Before Salesforce can be used by Bizweaver, some connection information was be configured on the Salesforce.com site.

  1. Login to Salesforce.com
  2. In the left-side menu, go to Build > Create and click Apps.
  3. Scroll down to the “Connected Apps” section.
  4. Click [New].

Salesforce App Setup 1

  1. The “New Connected App” page is displayed.
  2. Enter a Connected App Name, an API Name, and a Contact Email.
  3. Select the “Enable OAuth” checkbox.
  4. Enter a “Callback URL.” This is required by web apps, but is not used by Bizweaver. The value shown in the image is acceptable.
  5. Select the desired “OAuth Scopes”. Access and Manage Your Data is typically all that is needed. Highlight the desired option and click the > button to add it to the selected list.
  6. This is all that is required. Click [Save] to create the new “App.”

Salesforce App Setup 2

OAuth Keys

  1. Return to Build > Create > Apps > Connected Apps.
  2. Click on the link for the App that was just created.
  3. Copy the Consumer Key (called Client ID in Bizweaver) and Consumer Secret (Client Secret in Bizweaver) values as you will need them in the Bizweaver connection setup.

Salesforce oAuth Keys

Create a REST Global Connection for Salesforce.com

  1. Create a new Global Connection by opening Global Connections, and selecting a new REST connection.
  2. Select oAuth 2 Authentication.
  3. Select Grant Type of “Password Grant.”
  4. Enter the Client ID (Consumer ID), Client Secret (Consumer Secret), Redirect URI (https://localhost), and the Salesforce user name.
  5. When you created a password in Salesforce.com you will have received a corresponding token via email. You will receive a new token any time you change your password. If you do not have the token, you can request a new token using the Resetting Your Security Token.
  6. The “password” used in the Bizweaver connection is your password + the token, all in one string. This removes location checking from your login request.

Salesforce Global Connection

Basic Salesforce Workflow

A typical Bizweaver workflow for Salesforce will always have two basic steps. Get a session access token and the web service call(s) to pull and push data.

Get Token Step

  1. Use the setup as shown in the image below. The Connection is the global connection created earlier. Be sure to select Production or Sandbox as appropriate.
  2. Click the Login Test … link to confirm that the connection is working correctly. A session access token will be displayed in the box to the right of the link.

Get Token Step

Manage Data Step(s)

  1. Add a new Web Service step to manage data. This should be the next step after the “Get Access Token” step.
  2. Use the “Select Service” drop-down to select “Salesforce.com”. Then use the drop-down just to the right to select “Manage Objects.” The display will change.
  3. “Authentication Required” should not checked on this step. The access token will be obtained from the preceding “Get Access Token” step.
  4. Click the “?” icon to retrive the token from the “Get Token” step.
  5. Set the “Sales Force Instance” to the appropriate value. See the “Find Your Salesforce Instance” section for instructions on how to find this value.
  6. Click the radio button for the action you wish to use. Options are Query, Add Record, Update, and Delete.
  7. Click the Refresh Object List link. A list of accessible objects (data sets) is displayed in the “Select Object” box.
  8. Select the desired object. Only one object can be selected at a time.
  9. The fields associated with the selected object are displayed in the “Select Fields” box.
  10. Select the checkbox for each value to be retrieved or used for other actions.

– Click [OK] to save the settings.

Manage Data Step

Other Information

Resetting Your Salesforce Security Token

In most cases, resetting your Salesforce.com password will automatically cause a new security token to be generated and emailed to you. You can also manually generate a new token if needed.

  1. Click on the drop-down on your user name in the upper-right corner of the page.
  2. Select My Settings.
  3. Under the “Personal” section you will see the “Reset My Security Token” option.
  4. Click this option to complete the generation process. The new token is sent to you via email.

Reset Security Token

To find your Salesforce edition and API version.

To find your Salesforce Instance

bw/salesforce_api.1550677383.txt.gz · Last modified: 2019/02/20 10:43 by runger