---
schema_version: "1"
id: f08db05273b94a0c1337b639aa4014c43623c7b3ab1a40b386aec0be77afe1c3
title: Using Anypoint Studio to Configure Salesforce Connector 11.5
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/salesforce-connector/11.5/salesforce-connector-studio.md
canonical_url: https://docs.mulesoft.com/salesforce-connector/11.5/salesforce-connector-studio
source_site: docs.mulesoft.com
content_type: documentation
content_hash: fa9aad1b0e347ab15821e97fd8d1c7d15ced5ac8327cd754a212b1b94b209924
description: MuleSoft Documentation Site
release: "11.5"
latest: false
---
---
product: Salesforce Connector
version: 11.5
---

# Using Anypoint Studio to Configure Salesforce Connector 11.5

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and
configuration files.

To add and configure a connector in Studio:

1.  [Create a Mule project](#create-mule-project).

2.  [Add the connector to your Mule project](#add-connector-to-project).

3.  [Configure a source for the connector’s flow](#configure-input-source).

4.  [Add a connector operation to the flow](#add-connector-operation).

5.  [Configure a global element for the connector](#configure-global-element)

6.  [Configure the other connector fields](#configure-other-fields).

When you run the connector, you can view the app log to check for problems, as described in
[View the App Log](#view-app-log).

If you are new to configuring connectors in Studio, see
[Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio).
If, after reading this topic, you need additional information about the connector fields, see the
[Salesforce Reference](https://docs.mulesoft.com/salesforce-connector/11.5/salesforce-connector-reference).

## Create a Mule Project

In Studio, create a new Mule project in which to add and configure the connector:

1.  In Studio, select **File > New > Mule Project**.

2.  Enter a name for your Mule project and click **Finish**.

## Add the Connector to Your Mule Project

Add Salesforce Connector to your Mule project to automatically populate the XML code with the
connector’s namespace and schema location and add the required dependencies to the project’s
`pom.xml` file:

1.  In the **Mule Palette** view, click **(X) Search in Exchange**.

2.  In **Add Modules to Project**, type `salesforce` in the search field.

3.  Click the connector name in **Available modules**.

4.  Click **Add**.

5.  Click **Finish**.

Adding a connector to a Mule project in Studio does not make that connector available to other
projects in your Studio workspace.

## Configure a Source

A source initiates a flow when a specified condition is met. A channel or topic must be published to
Salesforce before a subscription to the channel can be created.

You can configure one of these sources to use with Salesforce Connector:

- **On Deleted Object**

  Initiates your app when a Salesforce user deletes an object. Possible object types are `Contact`,
  `Lead`, `Account`, `Contracts`, `Opportunity`, or the name of a custom object.

- **On Modified Object**

  Initiates your app when a Salesforce user modifies an object. Possible object types are `Contact`,
  `Lead`, `Account`, `Contracts`, `Opportunity`, or the name of a custom object.

- **On New Object**

  Initiates your app when a Salesforce user creates a new object. Possible object types are
  `Contact`, `Lead`, `Account`, `Contracts`, `Opportunity`, or the name of a custom object.

- **Replay channel listener**

  Subscribes to a streaming channel. This source provides channel-related notification settings for
  new events and events stored by Salesforce within the 24-hour retention period. Events that occur
  in the specified channel source trigger the flow.

- **Replay topic listener**

  Subscribes to a topic. This source provides topic-related notification settings for new events and
  events stored by Salesforce within the 24-hour retention period. Events that occur on records in
  the specified topic trigger the flow.

- **HTTP > Listener**.

  Initiates a flow each time it receives a request on the configured host and port

- **Scheduler**

  Initiates a flow when a time-based condition is met.

> [!NOTE] A channel or topic must be published to Salesforce before a subscription to the channel
> can be created.

### Example of Configuring a Source

For example, to configure **On New Object** as a source:

1.  In the **Mule Palette** view, select **On New Object**.

2.  Drag **On New Object** to the Studio canvas.

3.  In the On New Object properties window, specify a value for the **Path** field.

4.  Optionally change the value of the **Display Name** field.

5.  Select an object type and optionally specify a UTC value in the **Since** field.

    If the server is in a different time zone, you must specify a value in the **Since** field. If
    you leave the field empty, the connector uses the local timestamp.

6.  Click the plus sign (**+**) next to the **Connector configuration** field to configure a global
    element that can be used by all instances of the **On New Object** source in the app.

7.  In the **TLS** tab, optionally specify the TLS information for the connector.

8.  In the **Advanced** tab, optionally specify reconnection information, including a reconnection
    strategy.

9.  Click **Test Connection** to confirm that Mule can connect with the specified server.

10. Click **OK**.

### Redelivery Policy

To configure a redelivery policy for a source, set the **Redelivery** field in the source’s
properties window to the maximum number of redelivery attempts allowed after an initial failure.

You can specify an object store for this policy. If you don’t specify an object store, Mule creates
a nonpersistent object store. The number of transactions used to interact with the object store
varies based on the number of retries configured for the redelivery policy.

For more information about configuring a redelivery policy, see
[Redelivery Policy](https://docs.mulesoft.com/mule-runtime/latest/redelivery-policy).

## Add a Connector Operation to the Flow

When you add a connector operation to your flow, you immediately define a specific operation for
that connector to perform.

To add an operation for Salesforce Connector, follow these steps:

1.  In the **Mule Palette** view, select **Salesforce** and then select the desired operation.

2.  Drag the operation onto the Studio canvas to the right of the source.

## Configure a Global Element for the Connector

When you configure a connector, configure a global element that all instances of that connector in
the app can use. Configuring a global element requires you to provide the authentication credentials
the connector uses to access the target Salesforce system.

You can reference a configuration file that contains ANT-style property placeholders (recommended),
or you can enter your authorization credentials in the global configuration properties. For
information about the benefits of using property placeholders and how to configure them, see
[Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview).

To configure a global element for Salesforce Connector, follow these steps:

1.  Select the name of the connector in the Studio canvas.

2.  In the configuration screen for the operation, click the plus sign (+) next to the **Connector
    configuration** field to access the global element configuration fields.

3.  In the **General** tab, select one of these authentication methods for your connection:

    - [Basic authentication](#basic)

    - [OAuth 2.0 authentication](#oauth)

    - [OAuth JWT authentication](#oauth-jwt)

    - [OAuth Client Credentials authentication](#oauth-client-credentials)

    - [OAuth SAML authentication](#oauth-saml)

    - [OAuth Username Password authentication](#oauth-username-password)

4.  In the **Apex** tab, optionally configure [Apex Settings](#apexsets).

5.  In the **Advanced** tab, optionally specify reconnection information, including a reconnection
    strategy.

6.  Click **Test Connection** to confirm that Mule can connect with the specified server.

7.  Click **OK**.

### Authentication

For all OAuth connections, you can specify an object store that stores each resource owner’s ID
data. If you don’t specify an object store, Mule automatically provisions the default object store.
The app interacts with the object store automatically when a new resource owner is authenticated,
the access token is refreshed, or the access token is invalidated.

All authentication types support mutual TLS. To use mutual TLS, you need a keystore file and a
password for the file. See
[Generate a Keystore File](https://docs.mulesoft.com/salesforce-connector/11.5/salesforce-connector-config-topics#generate-keystore) for more
information.

In Studio, when you configure the connector’s authentication method, specify the path to the
keystore file and the TLS password on the **Security** tab.

To set up a mutual TLS certificate in your Salesforce environment, see
[Set Up a Mutual Authentication Certificate](https://help.salesforce.com/s/articleView?language=en_US&id=security_keys_uploading_mutual_auth_cert.htm&type=5).

#### Basic Authentication

Basic authentication uses a username and password for authentication.

Important fields in the **General** tab include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Username</strong></p></td><td><div><div><p>Salesforce username.</p></div></div></td></tr><tr><td><p><strong>Password</strong></p></td><td><div><div><p>Corresponding password.</p></div></div></td></tr><tr><td><p><strong>Security token</strong></p></td><td><div><div><p>Corresponding security token.</p></div></div></td></tr><tr><td><p><strong>Callback path</strong></p></td><td><div><div><p>Path for the callback, for example, <code>/callback</code>.</p></div></div></td></tr><tr><td><p><strong>Authorization URL</strong></p></td><td><div><div><p>Web service URL responsible for user authentication. This is the URL for the endpoint configured to handle SOAP authentication requests. It defaults to the URL that contains the latest API version supported by the connector, for example, <code>https://login.salesforce.com/services/Soap/u/67.0</code>.</p></div></div></td></tr></tbody></table>

#### OAuth 2.0 Authentication

Use OAuth 2.0 to delegate user authentication to the service hosting the user account. For more
information, refer to
[Configuring OAuth 2.0 for Connectors](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2),
[Configuring OAuth 2.0 for Connectors on CloudHub](https://docs.mulesoft.com/connectors/introduction/intro-config-oauth2-cloudhub),
or [OAuth Support in the SDK](https://docs.mulesoft.com/mule-sdk/latest/oauth).

OAuth 2.0 delegates user authentication to the service hosting the user account.

Important fields in the **General** tab include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Consumer key</strong></p></td><td><div><div><p>Consumer key for the Salesforce-connected app. For information about generating a consumer key, refer to the <a href="https://help.salesforce.com/s/articleView?id=xcloud.connected_app_rotate_consumer_details.htm&amp;type=5">Salesforce documentation</a>.</p></div></div></td></tr><tr><td><p><strong>Consumer secret</strong></p></td><td><div><div><p>Password for the keystore.</p></div></div></td></tr><tr><td><p><strong>Listener config</strong></p></td><td><div><div><p>Configuration for the listener, for example, `HTTP_Listener_config.</p></div></div></td></tr><tr><td><p><strong>Callback path</strong></p></td><td><div><div><p>Path for the callback, for example, <code>/callback</code>.</p></div></div></td></tr><tr><td><p><strong>Authorize path</strong></p></td><td><div><div><p>Path for authorization, for example, <code>/authorize</code>.</p></div></div></td></tr><tr><td><p><strong>External call back url</strong></p></td><td><div><div><p>Callback URL, for example, <code>http://localhost:8085/callback</code>.</p></div></div></td></tr></tbody></table>

Important fields in the **Advanced** tab include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Api version</strong></p></td><td><div><div><p>API version used. Defaults to the latest API version supported by the connector.</p></div></div></td></tr></tbody></table>

#### OAuth JWT Authentication

OAuth JWT uses OAuth 2.0 with a JSON Web Token (JWT) request for user authentication.

Important fields in the **General tab** include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Consumer key</strong></p></td><td><div><div><p>Consumer key for the Salesforce-connected app. For information about generating a consumer key, refer to the <a href="https://help.salesforce.com/s/articleView?id=xcloud.connected_app_rotate_consumer_details.htm&amp;type=5">Salesforce documentation</a>.</p></div></div></td></tr><tr><td><p><strong>Key store</strong></p></td><td><div><div><p>Path to the keystore that signs data during authentication. See <a href="https://docs.mulesoft.com/salesforce-connector/11.5/salesforce-connector-config-topics#generate-keystore">Generate a Keystore File</a>.</p></div></div></td></tr><tr><td><p><strong>Store password</strong></p></td><td><div><div><p>Password for the keystore.</p></div></div></td></tr><tr><td><p><strong>Password</strong></p></td><td><div><div><p>Corresponding password.</p></div></div></td></tr><tr><td><p><strong>Certificate Alias</strong></p></td><td><div><div><p>Alias of the certificate to use if the specified keystore contains multiple certificates.</p></div></div></td></tr><tr><td><p><strong>Principal</strong></p></td><td><div><div><p>Username of the Salesforce user.</p></div></div></td></tr></tbody></table>

Important fields in the **Advanced** tab include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Api version</strong></p></td><td><div><div><p>API version used. Defaults to the latest API version supported by the connector.</p></div></div></td></tr></tbody></table>

#### OAuth Client Credentials Authentication

OAuth Client Credentials uses a client ID and client secret for authentication.

Important fields in the **General tab** include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Client id</strong></p></td><td><div><div><p>The OAuth client ID as registered with the service provider.</p></div></div></td></tr><tr><td><p><strong>Client secret</strong></p></td><td><div><div><p>The OAuth client secret that corresponds to the client ID.</p></div></div></td></tr></tbody></table>

Important fields in the **Advanced** tab include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Api version</strong></p></td><td><div><div><p>API version used. Defaults to the latest API version supported by the connector.</p></div></div></td></tr></tbody></table>

#### OAuth SAML Authentication

> [!NOTE] OAuth SAML currently uses only Salesforce as an identity provider. Refer to
> [Salesforce as a SAML Identity Provider](https://help.salesforce.com/s/articleView?id=xcloud.sso_sfdc_idp_saml_parent.htm&type=5)
> to enable Salesforce as an identity provider.

OAuth SAML uses OAuth 2.0 with a signed SAML 2.0 assertion to request an access token.

Important fields in the **General** tab include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Consumer key</strong></p></td><td><div><div><p>Consumer key for the Salesforce-connected app. For information about generating a consumer key, refer to the <a href="https://help.salesforce.com/s/articleView?id=xcloud.connected_app_rotate_consumer_details.htm&amp;type=5">Salesforce documentation</a>.</p></div></div></td></tr><tr><td><p><strong>Key store</strong></p></td><td><div><div><p>Path to the keystore that signs data during authentication. See <a href="https://docs.mulesoft.com/salesforce-connector/11.5/salesforce-connector-config-topics#generate-keystore">Generate a Keystore File</a>.</p></div></div></td></tr><tr><td><p><strong>Store password</strong></p></td><td><div><div><p>Password for the keystore.</p></div></div></td></tr><tr><td><p><strong>Password</strong></p></td><td><div><div><p>Corresponding password.</p></div></div></td></tr><tr><td><p><strong>Certificate Alias</strong></p></td><td><div><div><p>Alias of the certificate to use if the specified keystore contains multiple certificates.</p></div></div></td></tr><tr><td><p><strong>Principal</strong></p></td><td><div><div><p>Username of the Salesforce user.</p></div></div></td></tr></tbody></table>

Important fields in the **Advanced** tab include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Api version</strong></p></td><td><div><div><p>API version used. Defaults to the latest API version supported by the connector.</p></div></div></td></tr></tbody></table>

#### OAuth Username Password Authentication

OAuth Username Password authentication uses OAuth 2.0 with a user and password for authentication.

Important fields in the **General** tab include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Consumer key</strong></p></td><td><div><div><p>Consumer key for the Salesforce-connected app. For information about generating a consumer key, refer to the <a href="https://help.salesforce.com/s/articleView?id=xcloud.connected_app_rotate_consumer_details.htm&amp;type=5">Salesforce documentation</a>.</p></div></div></td></tr><tr><td><p><strong>Consumer secret</strong></p></td><td><div><div><p>Consumer secret for the connector to access Salesforce.</p></div></div></td></tr><tr><td><p><strong>Username</strong></p></td><td><div><div><p>Salesforce username.</p></div></div></td></tr><tr><td><p><strong>Password</strong></p></td><td><div><div><p>Corresponding password.</p></div></div></td></tr><tr><td><p><strong>Security token</strong></p></td><td><div><div><p>Corresponding security token.</p></div></div></td></tr></tbody></table>

Important fields in the **Advanced** tab include the following:

<table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Api version</strong></p></td><td><div><div><p>API version used. Defaults to the latest API version supported by the connector.</p></div></div></td></tr></tbody></table>

### Apex Settings

Salesforce Connector gets the names of the Apex classes and the associated methods that can be
invoked when you connect to Salesforce.

To configure Apex settings in Studio:

1.  Click the **Apex** tab in the global element properties screen.

2.  Enter the following information:

    <table><colgroup><col> <col></colgroup><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><p><strong>Fetch All Apex SOAP Metadata</strong></p></td><td><div><div><p>Fetches the metadata of all the Apex SOAP classes. Takes precedence over Apex Class Name settings.</p></div></div></td></tr><tr><td><p><strong>Fetch All Apex REST Metadata</strong></p></td><td><div><div><p>Fetches the metadata of all the Apex REST classes. Takes precedence over Apex Class Name settings.</p></div></div></td></tr><tr><td><p><strong>Apex Class Names</strong></p></td><td><div><div><p>List of Apex class names to use for limiting the set of classes you fetch and the methods that they expose. This setting can accelerate the fetch process if you don’t need to fetch many classes. Valid values:</p></div><div><ul><li><p><strong>None</strong></p><div><p>No classes are specified for DataSense to acquire.</p></div></li><li><p><strong>From a message</strong></p><div><p>Enables you to specify the class name using an expression.</p></div></li><li><p><strong>Create object manually</strong></p><div><p>Enables you to create a list of class names for DataSense to acquire. DataSense acquires only those classes and their associated methods.</p></div></li></ul></div></div></td></tr></tbody></table>

## Configure Additional Connector Fields

After you configure a global element for Salesforce Connector, configure the other required fields
for the connector.

The following example shows four operations of the many you can configure for Salesforce Connector,
as well as the important fields for these operations:

<table><colgroup><col> <col></colgroup><thead><tr><th>Operation</th><th>Description</th></tr></thead><tbody><tr><td><p>Create</p></td><td><div><div><p>Adds one or more new records to your organization’s data. Important fields include:</p></div><div><ul><li><p><strong>Type</strong></p><div><p>Salesforce object type</p></div></li><li><p><strong>Records</strong></p><div><p>Function editor expression</p></div></li></ul></div></div></td></tr><tr><td><p>Query</p></td><td><div><div><p>Executes a query against the specified object and returns data that matches the specified criteria. Important fields include:</p></div><div><ul><li><p><strong>Salesforce query</strong></p><div><p>Salesforce query to retrieve objects</p></div></li><li><p><strong>Parameters</strong></p><div><p>Values for placeholders in the Salesforce query</p></div></li></ul></div></div></td></tr><tr><td><p>Update</p></td><td><div><div><p>Updates one or more existing records in your organization’s data. Important fields include:</p></div><div><ul><li><p><strong>Type</strong></p><div><p>Salesforce object type</p></div></li><li><p><strong>Records</strong></p><div><p>Function editor expression that produces a collection of Salesforce objects to update</p></div></li></ul></div></div></td></tr><tr><td><p>Delete</p></td><td><div><div><p>Deletes one or more records from your organization’s data. Important fields include:</p></div><div><ul><li><p><strong>Records To Delete IDs</strong></p><div><p>Function editor expression that produces a collection of Salesforce objects to delete</p></div></li></ul></div></div></td></tr></tbody></table>

## View the App Log

To check for problems, you can view the app log as follows:

- If you’re running the app from Anypoint Platform, the output is visible in the Anypoint Studio
  console window.

- If you’re running the app using Mule from the command line, the app log is visible in your OS
  console.

Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the
app log in the default location `MULE_HOME/logs/<app-name>.log`.

## Next Step

After completing Studio setup, see
[Additional Configuration Information](https://docs.mulesoft.com/salesforce-connector/11.5/salesforce-connector-config-topics).

## See Also

- [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors)

- [Salesforce Help](https://help.salesforce.com)
