FME Version
Introduction
I know you're eager to unleash the power of your Salesforce data using the SalesforceConnector in FME. However, there is one important step you need to take care of before you get running. You will need to set up a new Salesforce Web Service and Web Connection in FME Workbench, and we're here to help you through it.
Requirements
- A Salesforce Administrator is required to create a Connected App in Salesforce.
- Access to your organization's Salesforce with permission to read data
Step-by-Step Instructions
Part 1: Create a Connected App in Salesforce
Before creating your new web connection in FME, you must generate a Client ID (Consumer Key in Salesforce) and a Client Secret in Salesforce. Your Salesforce administrator will need to create a Connected App in Salesforce in the App Manager (in Salesforce, go to Setup > Apps > App Manager and click on the New Connected App button).
We will summarize the key steps here. However, for detailed and the most up-to-date instructions on creating Connected Apps in Salesforce, please refer to the Salesforce Trailhead: Create a Connected App and the Salesforce Help Documentation for Connected Apps
Consider the following field settings when creating your Connected App:
- Enable OAuth Settings if your organization uses OAuth for Salesforce
- For FME, use https://localhost in the Callback URL
- If this web service will be used on FME Server as well, set an additional Callback URL https://<yourserverhost>/fmeoauth (For more details on configuring Web Services on FME Server see To configure a web service definition in FME Server in the Web Connections documentation.)
Creating a Connected App in Salesforce will look something like this:
Once the app is created in Salesforce, your admin can provide you with:
- A Consumer Key (Client Id) and Client Secret
- The Authorization URL for your organization's Salesforce. The default is set to https://login.salesforce.com/services/oauth2/authorize?response_type=code&scope=refresh_token full.
Part 2: Create a New Web Service
Let's create a new web service using the existing Salesforce web service that is included with FME Workbench as a template.
In FME Workbench, go to FME Options > Web Connections. Click on the Manage Services button:
From the Manage Web Services window, click on the Add Web Service button (the button with a + icon), select Create From, and select Salesforce. This will create a new web service using the included Salesforce web service template:
A pre-populated form called New Web Service (Created From Salesforce) is generated in which you want to replace the following parameters:
- The Web Service Name with something to help you identify your Salesforce service.
- The Client Id (Salesforce Consumer Key) provided by your Salesforce Administrator.
- The Client Secret provided by your Salesforce Administrator.
- Your salesforce login domain (can be obtained from the Authorization URL provided by your Salesforce Administrator) for the three required URLs in the service definition (i.e. https://MyDomainName.my.salesforce.com). Though login.salesforce.com might work, consider asking your Salesforce administrator if your organization is using a custom domain (My Domain in Salesforce).
Scroll down in the New Web Service form and click on the Test button. You will be prompted with an OAuth Web Service Authentication window. Enter your OAuth credentials to determine if you've successfully created your new Web Service. To learn more about Managing Web Services in FME, check out the FME Documentation.
Click Apply and Close to return to the FME Options > Web Connections window.
Part 3: Create a New Web Connection
Now let's create a new Web Connection using the new web service that was just created. In the FME Options > Web Connections window, click on the Add Connection button (the button with a + icon). In the resulting Edit Web Connection window:
- Select the Web Service that was created in the steps above (i.e. the Web Service Name).
- Enter a new Connection Name name for your new Web Connection.
Click Authenticate to login into your Salesforce instance using your OAuth credentials. You've now created a new Named Web Connection to your Salesforce instance! Check out the FME Documentation to learn more about Web Connections.
Now you're ready to use this Named Web Connection in the SalesforceConnector to query Salesforce data! Check out Using the SalesforceConnector to See Account Data on a Map to learn more about the SalesforceConnector.
Comments
0 comments
Please sign in to leave a comment.