Using the SalesforceRequest node in enterprise integrations in IBM App Connect on IBM Cloud

Learn how to use the SalesforceRequest node in enterprise message flows in IBM® App Connect on IBM Cloud®, to directly access your Salesforce instance.

Scenario

Sales reps in your company are using Salesforce for customer data. You want an enterprise message flow to directly access your Salesforce data for use in its processing, and want the message flow to run in IBM App Connect on IBM Cloud. In App Connect on IBM Cloud plans that provide enterprise capabilities, you can now deploy message flows that use the SalesforceRequest node to directly access your Salesforce instance.

First, find or create everything you need

  • An instance of App Connect on IBM Cloud that provides enterprise capabilities (that is, the Lite plan or one of the Enterprise plans)
  • A Salesforce account with either IBM App Connect Enterprise v11 or IBM Integration Bus v10 configured as a connected app; see the instructions in the product documentation. (For the BAR file in this example, you do not need to do steps 6 and 7, because the BAR file is preconfigured with the Security Identity sf1.)
  • You need to find the following information:
    • securityIdentity – The name of the security identity that is used to authenticate a connection to a Salesforce system, where securityIdentity is the value of the Security Identity property in the SalesforceRequest node. In the provided BAR file this is sf1.
    • UserId – The Salesforce user ID.
    • Password – The password for accessing the Salesforce system, suffixed with the security token that was sent to you by Salesforce when you reset your security token (in Step 4).
    • ClientIdentity – The name of the consumer key of your connected app.
    • ClientSecret – The consumer secret of your connected app.

Procedure

  1. Extract the SalesforceRetrieve.bar file from the SalesforceRetrieve.bar_.zip archive and then import the BAR file into your instance of App Connect on IBM Cloud. This creates an Integration server.
  2. Click the Integration server tile to open it; you should see two things imported from the BAR file:

    (Click image to view full size.)

    1. The flow, listed here as Salesforce_Retrieve.appzip, which contains the credentials for this integration.
    2. The schema for the mapping nodes in the flow, shown at the bottom as Salesforce_Schemas.shlibzip.
  3. To open the Policies view, click the Policies icon .
  4. Select the Salesforce policy type and then give the policy a name. This name can be anything and is only used as a way of identifying the policy in the UI.
  5. Input the security identity. The security identity is set on the SalesforceRequest node in the BAR file. If you are using the demo BAR file, use sf1.
  6. Input the Salesforce user ID. This is the user ID you use to log in to Salesforce.
  7. Input the Salesforce password. This is the password for accessing the Salesforce system suffixed with the security token sent to you by email when signing up for Salesforce; for example, myPassword0123456789.
  8. Input the consumer key and secret from Salesforce.
  9. Save the policy. The policy should look something like the following:

    (Click image to view full size.)

  10. To attach the policy to the integration server for the uploaded bar file, complete the following steps:
    1. Click the 'Used by' cell of the row for the policy that you want to attach.
    2. In the Apply policy dialog, select the integration servers that you want to attch the policy to, and then click Apply.
  11. Return to the dashboard and then start the integration server.

When the integration server shows Running, it is ready to use.

Finally, test your integration:

Open the integration server, copy the HTTP Input URL and then navigate to that address in a web browser. You will need to input the credentials because HTTPS is being used. You can find these by clicking Credentials to the right of the URL in the Integration server.

The test data from Salesforce is returned in the web browser, proving the flow is working as expected.