Chapter 14. Connect to Salesforce
In an integration, to connect to Salesforce, you must register your Fuse Online environment as a Salesforce client application. This authorizes Fuse Online to access Salesforce. With registration in place, you create a Salesforce connection, which you can then add to any number of integrations. For details, see the following topics:
14.1. Register Fuse Online as a Salesforce client application
In an integration, to connect to Salesforce, the first thing you must do is register your Fuse Online environment as a client application that can access Salesforce. This lets you create any number of integrations that connect to Salesforce. In other words, you need to register a particular Fuse Online environment with Salesforce only once.
In each Fuse Online environment, there can be only one registration of Fuse Online as a Salesforce client application. However, while each Salesforce connection uses the same registration, it can use different user credentials.
You are logged in to Fuse Online. The URL for accessing Fuse Online is in the email message that welcomed you to the Red Hat Fuse Online Evaluation program.
In Fuse Online:
- In the left panel, click Settings.
- On the Settings page, near the top, to the right of the callback URL, click to copy the callback URL for your Fuse Online environment to the clipboard. You will need this URL toward the end of this procedure.
- To the right of the Salesforce entry, click Register to display the Client ID and Client Secret fields.
In another browser tab, log in to your Salesforce account and follow the steps below to create a connected app. These instructions assume that you are using the Salesforce Classic user interface. To switch from the Salesforce Lightning Experience interface, click your profile icon and select Switch to Salesforce Classic. For additional information, see the Salesforce documentation for Create a Connected App.
- In Salesforce, in the upper right, click Setup.
- In the left panel, select Build > Create > Apps.
- Scroll down to Connected Apps and click New.
- Enter the required information and then select Enable OAuth Settings.
In the Callback URL field, paste your Fuse Online URL, which you copied at the beginning of this procedure. For example:
For OAuth Scopes, add:
- Access and manage your data (api)
- Allow access to your unique identifier (openid)
- Perform requests on your behalf at any time (refresh_token, offline_accesss)
- Select Configure ID token and then Include Standard Claims.
- Scroll down and click Save.
- Scroll up to see that Salesforce indicates a short wait:
- Click Continue.
- Copy the consumer key that Salesforce provides.
- Return to your Fuse Online Settings page and paste the Salesforce-provided consumer key into the Fuse Online Salesforce Client ID field.
- Return to Salesforce and copy the consumer secret that Salesforce provides.
- Return to your Fuse Online Settings page and paste the Salesforce-provided consumer secret into the Fuse Online Salesforce Client Secret field.
- Click Save and then click Ok.
14.2. Create a Salesforce connection
To create an integration that accesses data in Salesforce, you must first create a Salesforce connection. After you create a Salesforce connection, you can use it in multiple integrations.
- You are logged in to Fuse Online. The URL for accessing Fuse Online is in the email message that welcomed you to the Red Hat Fuse Online Evaluation program.
- Fuse Online is open in a web browser.
You must have already registered your Fuse Online environment as an application that can access Salesforce.
Be sure to wait 2 - 10 minutes after registering your Fuse Online installation as a Salesforce client before you try to create a Salesforce connection.
- In Fuse Online, in the left panel, click Connections to display available connections.
- In the upper right, click Create Connection to display the available connectors. A connector is a template for creating one or more connections.
- Click the Salesforce connector.
Click Connect Salesforce to display a Salesforce authorization page. You might need to log in to Salesforce before you see the authorization page.Note
The following error indicates that Salesforce does not have the correct Fuse Online callback URL:
If you get this error message, then in Salesforce, ensure that the Fuse Online callback URL is specified according to the instructions in Register with Salesforce.
- Click Allow to return to Fuse Online.
In the Connection Name field, enter your choice of a name that helps you distinguish this connection from any other connections. For example, enter
SF Connect 1.
In the Description field, optionally enter any information that is helpful to know about this connection. For example, enter
Sample Salesforce connection that uses my Salesforce login credentials.
- In the upper right, click Create to see that the connection you created is now available. If you entered the example name, you would see that SF Connect 1 appears as a connection that you can choose to add to an integration.
14.3. Add a Salesforce connection to an integration
In an integration, you can connect to Salesforce to start or finish the integration, or in the middle of an integration. To connect to Salesforce, add a Salesforce connection to the integration.
- On the page that displays available connections, click the Salesforce connection that you want to add to the integration. When the integration uses the connection you select to connect to Salesforce, Fuse Online uses the credentials defined in that connection.
- Click the action that you want the selected connection to perform. Each Salesforce connection that you add to an integration performs only the action you choose.
- Specify the Salesforce object that the action operates on, for example, it might be a contact, lead or price book entry. Click in the Object field to select from a list of Salesforce objects or enter the name of the object.
- Click Done to add the connection to the integration.
The connection appears in the integration flow in the location where you added it.