Foundry's Salesforce connector allows you to sync data between Salesforce and Foundry datasets.
This document refers to the latest version of the Salesforce connector. If you are editing an existing Salesforce connector, it may be a legacy version. Review the section on migration below for more information.
Capability | Status |
---|---|
Exploration | 🟢 Generally available |
Bulk import | 🟢 Generally available |
The connector models all available standard ↗ and custom Salesforce objects as Foundry datasets. Schemas are retrieved dynamically. The exploration view allows you to browse the data model and preview how Salesforce objects would appear once imported to Foundry.
The connector maps Salesforce API types to the following Foundry field types:
Salesforce | Foundry |
---|---|
Auto Number | STRING |
Lookup Relationship | STRING |
Master-Detail Relationship | STRING |
External Lookup Relationship | STRING |
Checkbox | BOOLEAN |
Currency | DECIMAL |
Date | DATE |
Date/Time | LONG |
STRING | |
Geolocation | STRING |
Number | DOUBLE |
Percent | DOUBLE |
Phone | STRING |
Picklist | STRING |
Picklist (Multi-Select) | STRING |
Text | STRING |
Text Area | STRING |
Text Area (Long) | STRING |
Text Area (Rich) | STRING |
Text (Encrypted) | STRING |
Time | INTEGER |
URL | STRING |
The connector leverages the Salesforce SOAP API ↗ that is subject to the Salesforce SOAP API Call Limits ↗.
Learn more about setting up a connector in Foundry.
Select a credential method to authenticate your Salesforce connection: JWT token or username-password.
You can use the OAuth 2.0 JSON Web Token (JWT) bearer flow ↗ to authorize Foundry to access data without interactively logging in on each request.
To enable JWT authentication, you must generate a certificate, upload it while creating a Connected App, then perform a one-time authorization of the integration user.
First, create a Salesforce user and verify it has access permission for APIs and any Salesforce objects you wish to modify. Be sure you are able to log in as the integration user, as you will need to authorize as this user in a future step.
Now, create a JWT certificate. The Salesforce JWT bearer flow ↗ requires an X.509 certificate and the associated private key. To generate a private key, use openssl at the command line and run the following commands:
Generate the x.509 public and private key pair:
Copied!1 2
% openssl genrsa 1024 | openssl pkcs8 -topk8 -inform PEM -out key.pem -nocrypt % openssl req -new -x509 -key key.pem -out cert.pem -days 3650
Export the certificate to a PFX store, convert to Base64, and copy to clipboard:
Copied!1
% openssl pkcs12 -export -in cert.pem -inkey key.pem | openssl base64 | pbcopy
Be sure to save the certificate value in a secure location. You will need to access the value later in the configuration.
In the Salesforce Lightning Experience setup page, scroll through the left side bar to select the Apps > App Manager entry under the Platform Tools section. In the App Manager page, create a new connected app by selecting New Connected App.
In the Basic Information section of the app creation page, fill in the following fields:
Then, follow these steps to set up the API (Enable OAuth Settings) section:
https://localhost:12345
. This will be used again later.cert.pem
X.509 certificate file generated above.Ignore the other sections, and finalize the connected app creation by selecting Save, then Confirm on the next page. Allow ten minutes to pass before attempting to use the connected app.
Once the connected app is created, save the Consumer Key (for example, 3MVG9FG3dv...) in a secure place. The key is available under the API (Enable OAuth Settings) section.
Authorize the integration user with one of the following options:
https://<salesforce-url>/services/oauth2/authorize?client_id=
<CONSUMER_KEY>
&redirect_uri=
<CALLBACK_URL>
&scope=api%20offline_access%20refresh_token&response_type=code&response_mode=query&nonce=bebmwgu22zh
<CONSUMER_KEY>
with your connected app consumer key and <CALLBACK_URL>
with the URL you entered during the API configuration step.<salesforce-url>
with your Salesforce instance URL (<site>.my.salesforce.com
).https://localhost:12345
(the CALLBACK_URL). Since the callback URL is not real, the browser will show an expected "Not Found” error.Continue setting up a Salesforce connector in Foundry using the JWT authentication configuration options below:
Name | Required | Description |
---|---|---|
This is a Salesforce sandbox account | Yes | Determines if the connection should be made to a Salesforce sandbox account. Sets the default value for Login URL : login.salesforce.com for standard accounts and test.salesforce.come for sandbox accounts. |
Username | Yes | Enter the username of the integration user. |
Base64 PFX certificate | Yes | Value obtained from generating a certificate. |
The certificate is password protected | No | Toggle on if the certificate store is password protected. |
Certificate password | No | The certificate store password. |
Specify the certificate subject | No | Leave off to use the first certificate in the store. Toggle on to specify a certificate to use if the certificate store contains multiple certificates. |
Certificate subject | No | The subject of the desired certificate. Used to locate the certificate in the store . If an exact match is not found, the store is searched for a certificate whose subject contains the supplied value. |
Consumer key | Yes | Enter the consumer key available in the settings of the connected app. |
To connect to Salesforce with the username-password ↗ authentication method, you must create a service user account and connected app in Salesforce. Then, add credentials for both into the Salesforce connector.
Follow the steps below to enable the username-password authentication flow.
Create a Salesforce user and verify it has access permission for APIs and any Salesforce objects you wish to modify. Note the user’s username and password for future reference.
Create a connected app:
In the Salesforce Lightning Experience setup page, scroll through the left side bar to select the Apps > App Manager entry under the Platform Tools section. In the App Manager page, create a new connected app by selecting New Connected App.
In the Basic Information section of the app creation page, fill in the following fields:
Then, follow these steps to set up the API (Enable OAuth Settings) section:
https://localhost:12345
. This field is required for configuration though the callback URL will not be used.Ignore the other sections and finalize the connected app creation by selecting Save, then Confirm on the next page. Allow two to ten minutes to pass before attempting to use the connected app.
Once the connected app is created, navigate to it from the App Manager page. Select Manage, then Edit Policies. Under OAuth Policies > Permitted Users select All users may self-authorize.
The username-password authentication method supports the following configuration options:
Name | Required | Description |
---|---|---|
This is a Salesforce sandbox account | Yes | Determines if the connection should be made to a Salesforce sandbox account. Sets the default value for Login URL : login.salesforce.com for standard accounts and test.salesforce.come for sandbox accounts. |
Username | Yes | The username of the account that the connected app is imitating. |
Password | Yes | The password of the account that the connected app is imitating. |
If you experience authorization problems when trying to connect from Foundry and see Failed: API security token required
in the Salesforce Login History of the user, you must add the user's security token to the end of the password.
The security token is an automatically generated key that must be added to the password to log in to Salesforce from an untrusted network. Salesforce does not allow users to view the security token within the application; instead, you must log in to Salesforce as the integration user and navigate to My Settings in the top right corner. Then, navigate to Personal > Reset My Security Token.
If a direct connection is running your Salesforce connector, you must add a network egress policy to allowlist the connection.
Choose to add an existing policy, or create a new policy.
To allowlist a direct connection for Salesforce, add the following policies:
Login URL: Requires DNS
, port 443
(HTTPS), and one of the following:
login.salesforce.com
(production)
ORtest.salesforce.com
(sandbox)Instance URL: Requires DNS
for <site>.my.salesforce.com
, port 443
(HTTPS).
SSL connections validate servers certificates. Normally, SSL validations happen through a certificate chain; by default, both agent and direct connection run times trust most industry standard certificate chains. If the server to which you are connecting has a self-signed certificate, or if there is TLS interception during the validation, the connector must trust the certificate. Learn more about using certificates in Data Connection.
The Salesforce connector supports the following configuration options:
Name | Required | Default | Description |
---|---|---|---|
API version | Yes | 50 | The Salesforce API version. |
Connected app credentials | Yes | JWT bearer token | Contains credentials needed to connect to Salesforce. Review the Authentication sections above for more information. |
Login URL | No | login.salesforce.com (production), or test.salesforce.com (sandbox) | The URL used to connect to retrieve OAuth tokens. |
Timeout | No | 60 | The duration of time before the HTTP client connection times out while waiting for a response. Time is in seconds. |
Proxy settings | No | No | The proxy configuration to use when connecting to Salesforce. |
Use the exploration view to sync tables. Additional configuration options are available when editing a sync.
During incremental syncs with the Salesforce connector, new data is synced if the incremental column value is greater than or equal to the previous observed maximum value. This behavior, though required for precision and correctness of synced data, will lead to duplicate rows in the output dataset. Incremental pipelines should always contain a deduplication step.
You can add row filters to a sync configuration to exclude data that does not fit a set criteria. Use the condition tree to define your filter:
ALL
: Requires all nodes nested beneath to be true.ANY
: Requires at least one of the nested nodes to be true.Be sure to Save your configurations to apply them to the sync.
If you already have a Salesforce connector, you may be running a legacy version. To identify your connector version, migrate to Connection settings > Connection details. If source configuration shows a Custom YAML section with a type: salesforce
field, you are using a legacy Salesforce connector. You must migrate to the latest version to receive Palantir support beyond bug fixes.
auth-method
or authentication-method
block in the custom YAML.
type: oauth2-jwt
, configure the new source with JWT authentication:
claim-sub
from the custom YAML becomes Username
in new connector configuration.x509-cert
is exported to PFX, then Base64 encoded and becomes Certificate
. Learn more about certificates in the JWT authentication section above.The certificate is password protected
and enter the Certificate password
.
claim-iss
from the custom YAML becomes becomes Consumer key
in the new connector configuration.type: oauth2-username-password
, configure the new source with username-password authentication:
username
from the custom YAML becomes Username
in the new connector configuration.password
from the custom YAML becomes becomes Password
in the new connector configuration.client-id
and client-secret
properties on the legacy source are not required by the new connector.auth-url
from the custom YAML becomes becomes Login URL
in the new connector configuration.auth-url
had a value of test.salesforce.com
in the custom YAML, toggle on Is Salesforce sandbox account
in the new connector configuration.After configuring a new Salesforce connector, create syncs for the objects that were previously synced by the legacy connector. Use the exploration view to bulk sync multiple objects at once and create new datasets.
If using the same API version, both the legacy and new Salesforce connectors will use the same schema; all downstream applications should continue to function if inputs are remapped.
You must migrate downstream pipelines to use the new sync datasets. Once you have confirmed that no other consumers require the legacy datasets, you can delete the datasets, associated syncs, and connections. Use Data Lineage to find where the legacy datasets are used in your environment.