How Do I Connect to a Salesforce Data Source?
This article describes how to connect to Salesforce.com as a data source. Salesforce uses a subset of SQL called SOQL to query data in your organization's account. For more information on the SOQL query language, see the Salesforce documentation here. As with all of our connectors, the Salesforce connector is designed to deviate from the SOQL query language as little as possible, and any query which is supported by Salesforce will also be supported by our products.
What is Needed to Establish the Connection
- A login to Salesforce.com
- A Security Token from Salesforce
Connecting Fluent to Salesforce
Connect Your Report Template to Salesforce
First, you must generate your Security Token from Salesforce.com. For instructions about how to generate a Security Token, see here.
From Microsoft Word, Excel, or PowerPoint, navigate to the Fluent tab. Click on the upper half of the Data Sources button. This will bring up the Connection Editor.
- In the Connection Editor window click on the New tab.
- Click on Salesforce in the Apps section. The Details pane will change to prompt you for your data source details.
- Enter a Name for your data source connection.
- Enter your Salesforce login username.
- Enter your Salesforce login password.
- Enter your Salesforce Security Token (generated above).
- (Optional) Enter the login URL for your Salesforce instance if it's different than the default https://login.salesforce.com
- Click Add, and then Test your connection. If all parameters and credentials are correct and a connection is made, you will receive a successful notification.
- Click on Close to save your information.
Other (Optional) Connection Editor Fields
Root Directory: This is the "default directory" for any Import Tag requests where the requested file does not have an absolute path. If left blank, Report Designer will use the directory where the data source file is located. If the data source is not a file it will use the directory where the template is located.
Notes
Be advised, Salesforce limits the number of API calls that you may execute in a 24-hour period based on your subscription level.
Troubleshooting
If you are running a version of Java which is less than version 8, you may see an exception like the one below:
net.windward.env.DataConnectionException: Failed to establish a connection to salesforce. Check your credentails
at net.windward.datasource.abstract_datasource.salesforce.SalesForceDataSource.<init>(SalesForceDataSource.java:40)
at net.windward.env.testhelpers.DBTestWrapper.createsalesforceDatasource(DBTestWrapper.java:86)
at net.windward.datasource.test.RunnableSalesForceThread.run(RunnableSalesForceThread.java:66)
at java.lang.Thread.run(Thread.java:744)
Caused by: com.sforce.ws.ConnectionException: Failed to parse detail: START_TAG seen ...</sf:exceptionMessage><sf:upgradeURL>... @1:752 due to: com.sforce.ws.ConnectionException: unable to find end tag at: START_TAG seen ...</sf:exceptionMessage><sf:upgradeURL>... @1:752
When creating your SalesForceDataSource(), you will need to enable TLS 1.1 in your Java runtime environment. To do this open the Java control panel, go to the Advanced tab, scroll down to Advanced Security Settings, and check the box that says Use TLS 1.1.