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, currently the Custom Enterprise or Lite plan.
  • 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 will need to find:
    • 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 tile to open it; you should see two things imported from the BAR file:

    1. The flow, listed here as Salesforce_Retrieve.appzip, which contains the login for this integration.
    2. The schema for the mapping nodes in the flow, shown at the bottom as Salesforce_Schemas.shlibzip.
  3. Click Attached Policies at the top of the page and with the flow stopped, click Manage and then Create and attach a policy.
  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 policy is now attached to the flow, which can be started.
  10. Start the integration. (Select the menu of the Integration server’s tile on the Dashboard, then click Start.)
  11. 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.

Join The Discussion

Your email address will not be published. Required fields are marked *