# tSalesforceConnection

Opens a connection to Salesforce.

This component is not shipped with your Talend Studio by default. You need to install it using the Feature Manager. For more information, see [Installing features using the Feature Manager](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/install-features-to-talend-studio).

## tSalesforceConnection Standard properties

These properties are used to configure tSalesforceConnection running in the Standard Job framework.

The Standard tSalesforceConnection component belongs to the Business and the Cloud families.

The component in this framework is available in all Talend products.

## Basic settings

| Properties | Description |
| --- | --- |
| Property Type | Select the way the connection details<br>will be set.<br><br><ul> <li> <p> <span>Built-In</span>: The connection details will be set                                locally for this component. You need to specify the values for all                                related connection properties manually.</p> </li> <li> <p> <span>Repository</span>: The connection details stored                                centrally in <span><span>Repository</span><abbr> &gt; </abbr><span>Metadata</span></span> will be reused by this component. </p> <p>You need to click                                the <span>[...]</span> button next to it and in the pop-up                                    <span>Repository Content</span> dialog box, select the                                connection details to be reused, and all related connection                                properties will be automatically filled in.</p> </li> </ul> |
| Connection type | Select the type of the connection from the drop-down list. The connection<br>properties will vary according to the connection type you choose.<br><br><ul> <li> <p><span>Basic (deprecated)</span>: This option uses the legacy                        username, password, and security token ("SOAP API login()") to authenticate                        with Salesforce. Salesforce will retire support for SOAP API login() in API                        versions 31.0 through 64.0 starting with the Summer ‘27 release, and it is                        not available in API versions 65.0 and later. As such, Basic authentication                        is deprecated and may stop working in the near future regardless of the                        selected API version.</p> </li> <li> <p><span>OAuth</span>: This option uses OAuth (Open Authorization)                        2.0 protocol to authenticate the user with the <span>Json Web Token                           Flow</span> OAuth 2.0 authentication flow type. To use this option,                        you need to create a connected app in Salesforce to configure a Salesforce                        authentication provider.</p> <p>For more information about the OAuth authentication flow, see <a href="https://help.salesforce.com/articleView?id=remoteaccess_authenticate.htm&amp;type=5" target="_blank">Authenticate Apps with OAuth</a>.</p> <p>For more information about how to create a connected app in Salesforce, see                           <a href="https://help.salesforce.com/articleView?id=connected_app_create.htm&amp;type=5" target="_blank">Create a Connected App</a>.</p> </li> </ul> |
| User Id | The Salesforce username.<br><br>This property is available only when the Basic connection type is selected. |
| Password | The Salesforce password associated with the username.<br><br>This property is available only when the Basic connection type is selected. |
| Security Token | The Salesforce security token. For more information, see [Reset Your Security Token](https://help.salesforce.com/articleView?id=user_security_token.htm&type=5).<br><br>This property is available only when the Basic connection type is selected. |
| Issuer | The OAuth Consumer Key, generated when your<br>connected app is created and shown in the connected app detail page in Salesforce.<br>For more information, see [Create a Connected App](https://help.salesforce.com/articleView?id=connected_app_create.htm&type=5).<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Subject | The Salesforce username.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Audience | Json Web Token audience.<br><br>You can set your own Json Web Token audience.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Expiration time (in seconds) | The expiration time of the assertion (in seconds) within five minutes.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Key store | The path to the keystore file in Java Keystore (JKS) format.<br><br>The keystore file can be generated by creating a certificate signed by Salesforce<br>and then exporting it to keystore. For more information, see [Generate a Self-Signed Certificate](https://help.salesforce.com/articleView?id=security_keys_creating.htm&type=5).<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Key store password | The keystore password.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Certificate alias | The unique name of the certificate signed by Salesforce.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Mutual authentication | Select this option to enable mutual authentication for establishing connections to<br>Salesforce. For more information about mutual authentication in Salesforce, see<br>[Set Up a Mutual Authentication<br>Certificate](https://help.salesforce.com/s/articleView?id=sf.security_keys_uploading_mutual_auth_cert.htm&type=5).<br><br>If you are using this option:<br><br><ul> <li> <p>On the component side, use a <a href="https://help.qlik.com/talend/r/en-US/8.0/components/keystore/tsetkeystore">tSetKeystore</a> component to                           provide the mutual authentication keystore and keystore password.</p> </li> <li>On the metadata side, go to <span><span>Window</span><abbr> &gt; </abbr><span>Preferences</span><abbr> &gt; </abbr><span>Talend</span><abbr> &gt; </abbr><span>Security</span><abbr> &gt; </abbr><span>SSL</span></span>, and set the corresponding keystore configuration.</li> </ul><br><br>By default, this option is not selected. |
| Mutual auth keystore (Deprecated) | Enter the path to the mutual authentication keystore file, a password protected<br>file containing keys and certificates.<br><br>This option is deprecated, it is recommended to use a [tSetKeystore](https://help.qlik.com/talend/r/en-US/8.0/components/keystore/tsetkeystore) component to provide the mutual<br>authentication keystore and keystore password.<br><br>This option is available when both the Basic connection<br>type and the Mutual authentication check box are<br>selected. |
| Mutual auth keystore password | Enter the password for the mutual authentication keystore file.<br><br>This option is available when both the Basic connection<br>type and the Mutual authentication check box are<br>selected. |

## Advanced settings

| Properties | Description |
| --- | --- |
| Salesforce URL | The Webservice URL required to connect to Salesforce.<br><br>Information noteWarning: Due to a [breaking change](https://help.salesforce.com/s/articleView?id=release-notes.rn_security_mutual_authentication.htm&release=246&type=5) in the latest versions of<br>Salesforce, if you use the Basic connection type with<br>mutual authentication, you need to adjust the endpoint to prevent errors while<br>running the Job. Example:<br>https://MyDomainName.my.salesforce.com:8443/services/Soap/u/version |
| API version | The Salesforce API version.<br><br>This property is available only when<br>the OAuth connection type is selected. |
| Bulk Connection | Select this check box if you need to use bulk data processing function. |
| Use or save the connection session | Select this check box and in the Session directory field<br>displayed, specify the path to the connection session file to be saved or<br>used.<br><br>This session file can be shared by different Jobs to retrieve a connection session<br>as long as the correct user ID is provided by the component. This way, you do not<br>need to connect to the server to retrieve the session.<br><br>When an expired session is detected, if the correct connection information (the<br>user ID, password, and security key) is provided, the component will connect to<br>the server to retrieve the new session information and update the connection<br>session file.<br><br>This property is available only when the Basic connection type is selected. |
| Need compression | Select this check box to activate SOAP message compression, which can result in<br>increased performance levels. |
| Use Http Chunked | Select this check box to use the HTTP<br>chunked data transfer mechanism.<br><br>This<br>property is available only when the Bulk<br>Connection check box is cleared. |
| Trace HTTP message | Select this check box to output the HTTP<br>interactions on the console.<br><br>This<br>property is available only when the Bulk<br>Connection check box is selected. |
| Client Id | Enter the ID of the real user to differentiate between those who use the same<br>account and password to access the Salesforce website. |
| Timeout | Enter the intended number of query timeout in milliseconds in Salesforce. |
| Use Proxy | Select this check box to use a SOCKS proxy server, and in the<br>Host, Port, User<br>Id, and Password fields displayed, specify<br>the connection parameters of the SOCKS proxy server.<br><br>Information noteNote: To use a proxy of any allowed type (including HTTP proxy, HTTPS proxy, and<br>SOCKS proxy), use the tSetProxy component. |
| tStatCatcher Statistics | Select this checkbox to gather the Job processing metadata at the Job level<br>as well as at each component level. |

## Global Variables

| Variables | Description |
| --- | --- |
| ERROR\_MESSAGE | The error message generated by the component when an error<br>occurs. This is an After variable and it returns a string. |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component is more commonly used with other Salesforce components. |

**Related concepts**

* [Upserting Salesforce data based on external IDs](https://help.qlik.com/talend/en-US/components/8.0/salesforce/tsalesforceinput-tsalesforceconnection-tlogrow-upserting-salesforce-data-based-on-external-ids-standard-component-the-job "Here is an example of using Talend components to insert and update Salesforce Contact object data based on the mapping relationship with external IDs of the Account object.")