ExternalDataSource

Represents the metadata associated with an external data source. Create external data sources to manage connection details for integration with data and content that are stored outside your Salesforce org.

Version 

Introduced in API version 51.0.

Supported SOAP API Calls 

create(), delete(), describeSObjects(), query(), retrieve(), update(), upsert()

Supported REST API Methods 

DELETE, GET, HEAD, PATCH, POST, Query

Fields 

AuthProviderId 

  • Type: ID
  • Required: No
  • Properties: Filter, Group, Nillable, Sort
  • Introduced: API version 29.0

CertificateId 

  • Type: reference

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: If you specify a certificate, your Salesforce org supplies it when establishing each two-way SSL connection with the external system. The certificate is used for digital signatures, which verify that requests are coming from your Salesforce org.

  • Relationship name: Certificate

  • Relationship type: relationship

  • Refers to: Certificate

    For best performance, verify that your remote HTTPS encrypted sites have OCSP (Online Certificate Status Protocol) stapling turned on.

    Note

CustomConfiguration 

  • Type: textarea

  • Required: No

  • Properties: Nillable

  • Introduced: API version 29.0

  • Description: A string of configuration parameters that are specific to the external data source’s type.

DeveloperName 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: The developer’s internal name for the external data source used in the API.

This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. This field is automatically generated, but you can supply your own value if you create the record by using the API.

When creating large sets of data, always specify a unique DeveloperName for each record. If no DeveloperName is specified, performance may slow while Salesforce generates one for each record.

Note

Endpoint 

  • Type: textarea

  • Required: No

  • Properties: Nillable

  • Description: The URL of the external system, or if that URL is defined in a named credential, the named credential URL. Corresponds to URL in the user interface.

A named credential URL contains the scheme callout:, the name of the named credential, and an optional path. For example: callout:``My_Named_Credential``/``some_path.

You can append a query string to a named credential URL. Use a question mark (?) as the separator between the named credential URL and the query string. For example: callout:``My_Named_Credential``/``some_path``?format=json.

FullName 

  • Type: string

  • Required: No

  • Properties: Create, Group, Nillable

  • Description: The full name of the associated type in Tooling API. The full name can include a namespace prefix. Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.

IsWritable 

  • Type: boolean

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Sort

  • Introduced: API version 35.0

  • Description: Lets the Lightning Platform and users in this org create, update, and delete records for external objects associated with the external data source. The external object data is stored outside the org. By default, external objects are read only. Corresponds to Writable External Objects in the user interface.

  • Default value: false

Language 

  • Type: picklist

  • Required: No

  • Properties: Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort

  • Description: The language of the external data source. The value for this field is the language value of the org.

  • Possible values:

    • en_US — English

    • de — German

    • es — Spanish

    • fr — French

    • it — Italian

    • ja — Japanese

    • sv — Swedish

    • ko — Korean

    • zh_TW — Chinese (Traditional)

    • zh_CN — Chinese (Simplified)

    • pt_BR — Portuguese (Brazil)

    • nl_NL — Dutch

    • da — Danish

    • th — Thai

    • fi — Finnish

    • ru — Russian

    • es_MX — Spanish (Mexico)

    • no — Norwegian

ManageableState 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: Indicates the manageable state of the specified component that is contained in a package.

  • Possible values:

    • beta — beta — Managed-Beta

    • deleted — deleted — Managed-Proposed-Deleted

    • deprecated — deprecated — Managed-Proposed-Deprecated

    • deprecatedEditable — deprecatedEditable — SecondGen-Installed-Deprecated

    • installed — installed — Managed-Installed

    • installedEditable — installedEditable — SecondGen-Installed-Editable

    • released — released — Managed-Released

    • unmanaged — unmanaged

MasterLabel 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Sort

  • Description: A user-friendly name for the external data source. The label is displayed in the Salesforce user interface, such as in list views.

Examples include Acme Team Marketing Site, or Acme SharePoint.

Metadata 

  • Type: complexvalue

  • Required: No

  • Properties: Create, Nillable, Update

  • Introduced: API version 51.0

  • Description: Provides access to the associated type and related fields in Tooling API.

NamedCredentialId 

  • Type: reference

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 54.0

  • Description: The Salesforce ID of the referenced named credential for an external data source. Required for Salesforce Connect adapters for Amazon DynamoDB, Amazon Athena, GraphQL, and OData 4.01. For connecting to other external data sources, the field must be null.

This is a relationship field.

  • Relationship name: NamedCredential
  • Relationship type: relationship
  • Refers to: NamedCredential

NamespacePrefix 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The namespace of the external data source. An external data source can be in an extension namespace different than the object.

OauthRefreshToken 

  • Type: textarea

  • Required: No

  • Properties: Nillable

  • Description: The OAuth refresh token. Used to obtain a new access token for an end user when a token expires.

OauthScope 

  • Type: string

  • Required: No

  • Properties: Filter, Nillable, Sort

  • Description: Specifies the scope of permissions to request for the access token.

OauthToken 

  • Type: textarea

  • Required: No

  • Properties: Nillable

  • Description: The access token issued by the external system.

Password 

  • Type: textarea

  • Required: No

  • Properties: Nillable

  • Description: The password to be used by your org to access the external system. Ensure that the credentials you use have adequate privileges to access the external system, perform searches, return data, and return information about the external system’s metadata.

PrincipalType 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Restricted picklist, Sort

  • Description: Determines whether you’re using one set or multiple sets of credentials to access the external system.

  • Possible values:

    • Anonymous — Anonymous

    • PerUser — Per User

    • NamedUser — Named Principal

    • NamedCustomPrincipal — Named Custom Principal

Protocol 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Restricted picklist, Sort

  • Description: The authentication protocol that’s required to access the external system.

  • Possible values:

    • NoAuthentication — No Authentication

    • Oauth — OAuth 2.0

    • Password — Password Authentication

    • AwsSv4 — AWS Signature Version 4

    • Jwt — JWT

    • JwtExchange — JWT Token Exchange

    • Custom — Custom

    • Basic — Basic Authentication

Repository 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Used for SharePoint Online. If metadata isn’t accessible, use this field to create tables and default table fields.

Type 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Restricted picklist, Sort

  • Description: For Salesforce Connect, specifies the adapter that connects to the external system. The valid values are:

  • ApexClassId—DataSource.Provider class that defines the custom adapter created via the Apex Connector Framework

For Files Connect, specifies the data source type. The valid values are:

If Chatter is enabled, you can also specify SimpleURL to access data hosted on a web server that doesn’t require authentication.

For Digital Lending Configurator, the valid value is:

For the federated search external data source type, the valid value is:

For Transaction Management in Revenue Cloud, the valid values are:

For SalesAgreement in Manufacturing Cloud, the valid values are:

These values are reserved for internal use:

Username 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The username to be used by your org to access the external system. Ensure that the credentials you use have adequate privileges to access the external system, perform searches, return data, and return information about the external system’s metadata.

Version 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Reserved for future use.

Custom Configuration for the Salesforce Connect Cross-Org Adapter 

The following sample JSON-encoded configuration string defines parameters that apply when the external data source’s type is set to SfdcOrg.

1{"apiVersion":"32.0","environment":"CUSTOM", "searchEnabled":"true","timeout":"120"}

The parameters correspond to these fields in the user interface:

  • apiVersion—API Version
  • environment—Connect to
  • searchEnabled—Enable Search
  • timeout—Connection Timeout

Custom Configuration for the Salesforce Connect OData 2.0 or 4.0 Adapter 

The following JSON-encoded configuration string defines parameters that apply when the external data source’s type is set to OData or OData4.

1{"inlineCountEnabled":"true","csrfTokenName":"X-CSRF-Token",
2"requestCompression":"false","pagination":"CLIENT",
3"noIdMapping":"false","format":"ATOM",
4"searchFunc":"","compatibility":"DEFAULT",
5"csrfTokenEnabled":"true","timeout":"120",
6"searchEnabled":"true"}

The parameters correspond to these fields in the user interface.

  • compatibility—Special Compatibility
  • csrfTokenEnabled—CSRF Protection
  • csrfTokenName—Anti-CSRF Token Name
  • format—Format
  • inlineCountEnabled—Request Row Counts
  • noIdMapping—High Data Volume
  • pagination—Server Driven Pagination
  • requestCompression—Compress Requests
  • searchEnabled—Enable Search
  • searchFunc—Custom Query Option for Salesforce Search
  • timeout—Connection Timeout

Custom Configuration for the Salesforce Connect Custom Adapter 

The following sample JSON-encoded configuration string defines the parameter that applies when the external data source’s type is set to the ID of a DataSource.Provider class.

1{"noIdMapping":"false"}

The noIdMapping parameter corresponds to the High Data Volume field in the user interface.