Newer Version Available

This content describes an older version of this product. View Latest

ExternalServiceRegistration

Represents the External Service configuration for an org. This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

ExternalServiceRegistration components have the suffix .externalServiceRegistration and are stored in the externalServiceRegistrations folder.

Version

ExternalServiceRegistration components are available in API version 39.0 and later.

In API version 47.0 and earlier, external services supported Interagent and a limited subset of OpenAPI 2.0. As of API version 48.0, external services supports OpenAPI 2.0 but does not support InteragentHyperSchema. See “Enhanced External Services Considerations” in Salesforce Help.

Note

Fields

Field Name Field Type Description
description string Required. The external service description defined when the service is created.
label string The service name as it appears on the External Services wizard.
namedCredential string Required. The reference by name to be used for the service.
schema string Required. The content of the JSON schema in the OpenAPI 2.0 format. Nillable.
schemaType string The schema format. OpenAPI for Open API 2.0 or InteragentHyperSchema for API version 47.0 and earlier. If not specified, schema type is derived based on the schema content. Nillable.
schemaUrl string Required. The path should begin with "/" and be relative to the named credential endpoint.
status string Indicates whether the service registration is complete, valid, and ready to use (complete) or not (incomplete).

Declarative Metadata Sample Definition

The following is an example of an ExternalServiceRegistration component that references an external credit service.

1<?xml version="1.0" encoding="UTF-8"?>
2<ExternalServiceRegistration xmlns="http://soap.sforce.com/2006/04/metadata">
3  <label>BankService</label>
4  <namedCredential>Bank</namedCredential>
5  <schema>{
6  &quot;swagger&quot;: &quot;2.0&quot;,
7  &quot;basePath&quot;: &quot;/&quot;,
8  &quot;info&quot;: {
9    &quot;version&quot;: &quot;1.0&quot;,
10    &quot;title&quot;: &quot;External Service for demo bank&quot;,
11    &quot;description&quot;: &quot;### External Service for demo bank&quot;,
12    &quot;x-vcap-service-name&quot;: &quot;DemoBankRestServices&quot;
13  },
14  ...
15  &quot;paths&quot;: {
16  &quot;/accounts/{accountName}&quot;: {
17      ...
18    }
19  },
20  &quot;definitions&quot;: {
21    &quot;accountDetails&quot;: {
22      ...
23    },
24    &quot;errorModel&quot;: {
25      ...
26    }
27  }
28}</schema>
29  <schemaType>OpenApi</schemaType>
30  <schemaUrl>/accounts/schema</schemaUrl>
31  <status>Complete</status>
32</ExternalServiceRegistration>

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.