Learn how to use the SalesforceRequest node in enterprise message flows in IBM® App Connect on IBM Cloud™, to directly access your Salesforce instance.
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
- 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
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.
- Extract the
SalesforceRetrieve.barfile 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.
- Click the Integration tile to open it; you should see two things imported from the BAR file:
- The flow, listed here as
Salesforce_Retrieve.appzip, which contains the login for this integration.
- The schema for the mapping nodes in the flow, shown at the bottom as
- The flow, listed here as
Attached Policiesat the top of the page and with the flow stopped, click
Create and attach a policy.
- Select the
Salesforcepolicy 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.
- 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
- Input the Salesforce user ID. This is the user ID you use to log in to Salesforce.
- 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.
- Input the consumer key and secret from Salesforce.
- Save the policy. The policy should look something like:
The policy is now attached to the flow, which can be started.
- Start the integration. (Select the menu of the Integration server’s tile on the Dashboard, then click Start.)
- Open the Integration server, copy the
HTTP InputURL 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
Credentialsto 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.