Connecting to Salesforce
Salesforce is the most popular cloud CRM with a focus on sales and support. Skyvia supports importing data to and from Salesforce, exporting Salesforce data to CSV files, replicating Salesforce data to relational databases, and synchronizing Salesforce data with other cloud CRMs and relational databases. Skyvia supports Salesforce Professional or Trial edition or higher. Please note that if you use Salesforce Professional or Trial edition, you need to clear the Use Bulk API check box in the connection settings.
Salesforce-Specific Features and Limitations
Skyvia supports External ID mapping for Salesforce foreign key fields. External ID in Salesforce is a field that has the External ID attribute, meaning that it contains unique record identifiers from a system outside of Salesforce. Skyvia allows you to map object references using the referenced object External ID field values. For more details see Mapping.
When the not equals operator is used in filters for Salesforce, records with an empty (null) value in the compared field are also returned. This behavior is different from the behavior of this operator for database, but this is the normal Salesforce behavior.
If you use Lookup mapping by a Salesforce Id field, you need to provide 18-character ID values for lookup, not 15-character ones. In other Skyvia features, for example, Query, or when inserting data, Skyvia supports both 18-character and 15-character ID values.
If you want to know how Skyvia uses Salesforce API calls, check Salesforce API and API Calls Usage.
You can create a Salesforce connection in Skyvia by clicking +NEW in the top menu and selecting Connection in the menu on the left.
The Select Connector page opens, which contains all the available connectors — their names and types. You need to find and select Salesforce from available connectors to open Connection Editor page. On this page, when creating a Salesforce connection, first, you need to specify the name for your connection and, second, the environment type you want to use.
Then you need to select the authentication kind. Skyvia supports two kinds of authentication for Salesforce: User Name & Password, and OAuth.
User Name & Password Authentication
To use the User Name & Password authentication, you need to specify your Salesforce username, password and security token, and they will be stored in the connection data.
Environment — this parameter specifies Salesforce environment type, which can be Production, Custom, or Sandbox. Check this page to know more about Salesforce environments.
User — Salesforce user name. It is available only if the User Name & Password authentication is selected.
Password — Salesforce password. It is available only if the User Name & Password authentication is selected.
|Security Token — Salesforce security token (an automatically generated key used to log in to Salesforce from an untrusted network). It is available only if the User Name & Password authentication is selected. To generate the security token, log in to the Salesforce website, click Setup, then select My Personal Information||Reset My Security Token.|
OAuth 2.0 Authentication
The OAuth 2.0 authentication allows you to avoid storing your Salesforce username and password on our website. You just authenticate directly to the Salesforce website. The OAuth Token is generated and will be used for authentication.
To use the OAuth 2.0 authentication, perform the following steps:
- Select OAuth 2.0 authentication from the drop-down list.
Click Sign In with Salesforce.
In the opened window, enter your Salesforce credentials and click Log In.
- After the OAuth token has been generated, click Create Connection.
Environment — this parameter specifies Salesforce environment type, which can be Production, Custom, or Sandbox.
OAuth Token — token for authentication to Salesforce. It is available only if the OAuth 2.0 authentication is selected.
Metadata Cache — this parameter determines for how long the cached metadata for the connection are considered valid. By default, Skyvia caches metadata of available objects in cloud sources. Whenever necessary, you can reset metadata cache for a connection manually in the Connection Editor by clicking the Clear now link. The following values are available for this parameter:
- Disabled — metadata cache is not created; metadata are queried automatically whenever required.
- One Hour — metadata cache expires one hour after the last refresh.
- One Day — metadata cache expires one day after the last refresh.
- One Week — metadata cache expires one week after the last refresh.
- One Month — metadata cache expires one month after the last refresh.
- Infinite — cache never expires/resets automatically. Default value.
If necessary, you may click Advanced Settings and set additional connection parameters:
Use Bulk API — this parameter specifies whether to use Salesforce Bulk API to load data to Salesforce. If you clear this check box, Skyvia will use SOAP API to load data to Salesforce instead of Bulk API. SOAP API are slower on large volumes of data.
By default, Bulk API are disabled for Salesforce Professional or Trial accounts, and user cannot enable them manually. You must either clear the Use Bulk API check box if you connect to Salesforce Professional or Trial account, or ask Salesforce support to enable Bulk API for your account.
Command Timeout — this parameter specifies the wait time in seconds before terminating the attempt to execute a command and produce an error. Usually you don’t need to change the default value for this parameter, but in some cases, when command execution takes much time, and this causes timeout errors, you may need to increase this value.
Include Deleted — this parameter determines whether to return deleted records from recycled bin. Please note that deleted records will be returned for all the requests to Salesforce via a connection with this check box selected. This includes using this connection as a source connection for import, in lookups, in the Query tool, in Backup, etc. Besides, it will increase API calls use.
Supported Actions and Actions Specifics
Salesforce connector supports the following actions:
- Execute Command in Source, Lookup, and Target Data Flow components.
- Execute Query in Source Data Flow components.
- Lookup in Lookup Data Flow components.
- Insert in Target Data Flow components.
- Update in Target Data Flow components.
- Delete in Target Data Flow components.
- Upsert in Target Data Flow components.
This action is specific to Salesforce and Zoho CRM connectors. It uses Salesforce native UPSERT mechanism, which allows inserting records if such record does not exist in Salesforce, and updating the record if such a record is found. Salesforce uses External ID fields to check whether a matching record already exists in Salesforce. External ID in Salesforce is a custom field that has the “External ID” attribute and uniquely identifies records. There can be multiple External Id fields in a Salesforce object.
To configure the Upsert action, first, you need to select the table to load data to. The Salesforce object you select must have an External Id field. Then you need to select an External Id field of this table to use. Finally, you need to map action parameters. For the Upsert action, parameters correspond to the target table columns that allow inserting data. You need to map at least the parameters corresponding to the required target table fields, and the parameter corresponding to the selected External ID field. Parameters for columns that you don’t want to load data to can be simply deleted from the mapping or ignored.