Salesforce Data Source

You can connect to a Salesforce data source from  and create endpoints.
lac32
You can connect to a Salesforce data source from 
CA Live API Creator
 and create endpoints.
In this article:
 
 
Verify the Prerequisites
Before you connect to one of your Salesforce instances, verify that you have completed the following:
  • You know your Salesforce connection information.
    • You have a Salesforce user name and password. For example, [email protected]
    • You have a generated Salesforce security token.
      For more information about how to generate the security token, see the Salesforce documentation.
  • You have ensured that your Salesforce account has the API Enabled permission set.
  • You have determined which production, sandbox or dev environment you are going to use.
Install the JDBC Driver for Salesforce
If you have installed 
CA Live API Creator
 on Tomcat, copy the 
cdata.jdbc.salesforce.jar
 JAR file (the JDBC driver) from the 
databaseDrivers
 directory to the 
%{CATALINA_HOME}/lib
 directory. After you have installed the JDBC driver, the Salesforce data source is available as an option in the connection wizard when creating an API.
The self-contained, single-user version of 
CA Live API Creator
 that is based on Jetty includes the JDBC driver for Salesforce. The JDBC driver is located in the 
%JETTY_HOME%/caliveapicreator/lib/ext
 directory. If you have installed this version of 
CA Live API Creator
, no additional steps are required to install the JDBC driver.
For more information:
Connect to a Salesforce Database
You can connect to your Salesforce database using the following methods:
  • (If you have not created your API yet) When you create your API.
    For more information about creating your API, see Create your API.
  • (If you have an existing API) By adding a connection to a Salesforce data source.
    For more information about how to add a connection to a data source, see Database Connectivity
The following procedure details how to connect to your Salesforce database when creating your API.
Connect to one of your Salesforce instances using the Salesforce JDBC driver you have added as a library in API Creator.
  1. In the connection wizard, click 
    Salesforce
    .
  2. Complete the 
    Username
    Password
    , and 
    Security Token
     fields based on the information for your Salesforce account.
  3. (Optional) If you want to connect to a Salesforce sandbox environment, select the 
    Use Sandbox
     checkbox and then enter the name of the sandbox in the 
    Sandbox Name 
    field.
    Your username is appended with a period(.) followed by the sandbox name.
  4. Click 
    Continue
    .
You are connected to the Salesforce database.
Salesforce Supported Data Types
You can read and write the following Salesforce data types:
Data type
Modeled as...
Notes
base64
binary
boolean
boolean
byte 
Bitmask
date
SimpleDate
For more information about how to use this data type in JavaScript, see the Date, Time, Timestamp, and TimestampOffset.
datetime
SimpleTimestampOffset
For more information about how to use this data type in JavaScript, see the Date, Time, Timestamp, and TimestampOffset.
double
decimal
int
decimal
string
string
time
SimpleTime
For more information about how to use this data type in JavaScript, see the Date, Time, Timestamp, and TimestampOffset.
Salesforce requires Transport Layer Security (TLS) encryption protocol version 1.1 or higher. You can enable TLS 1.1 and TLS 1.2 explicitly by adding the following line to your startup command for Apache Derby or Tomcat:
(-Dhttps.protocols=TLSv1.1,TLSv1.2)
 
For more information: