RegisteredExternalService registers an Apex-backed provider for a Salesforce Commerce extension or integration. It connects the provider implementation to either a specific Commerce extension point or an integration category. This metadata type is available only when a B2B Commerce or D2C Commerce license is enabled.
The registration is separate from the implementation. The provider code resides in an ApexClass; the registration identifies that class and the Commerce contract it implements. An extension point and an integration category are different ways to select provider behavior, not interchangeable labels.
Key Elements
| Element | What the Element Controls |
|---|---|
externalServiceProviderType |
Required. Selects Extension, Inventory, Price, Promotions, Shipment, or Tax. Use Extension with an extension point; use the other values for integrations. |
extensionPointName |
Selects the specific extension contract when the provider type is Extension. For example, Commerce_Domain_Pricing_CartCalculator identifies the Pricing Cart Calculator extension. Omit this element for an integration. |
externalServiceProvider |
Required. References the ApexClass implementing the provider. Salesforce's field definition and metadata example differ on whether this value is represented as a class ID or class name. |
masterLabel |
Required. Supplies the primary label for the registration. |
isApplication |
Records whether the extension provider is contained within a managed package. Defaults to false. |
isProtected |
An auto-generated value that defaults to false and does not affect this metadata type's behavior. It is not an access-control switch. |
Behavior and Constraints
The combination of externalServiceProviderType, extensionPointName, and externalServiceProvider determines how Salesforce interprets the registration.
-
Extension: Set
externalServiceProviderTypetoExtensionand specifyextensionPointName. The provider class extends the base class for that extension. The available Commerce extensions define the extension contracts. -
Integration: Set
externalServiceProviderTypetoInventory,Price,Promotions,Shipment, orTax, and omitextensionPointName.
The documented integration interfaces are:
sfdc_checkout.CartInventoryValidationsfdc_checkout.CartPriceCalculationssfdc_checkout.CartShippingChargessfdc_checkout.CartTaxCalculations
Although Promotions is an allowed provider type, the documented interface list does not identify a Promotions-specific interface. Do not infer an interface name from that enumeration value.
Extension points distinguish domain extensions from endpoint extensions. Domain extensions include cart calculation, checkout, pricing, inventory, shipping, and tax. Endpoint extensions include account addresses, cart items, catalog products, and search. Each extension point selects a specific contract; choosing another name does not merely relabel the same provider behavior.
isApplication records managed-package containment. isProtected has a different meaning: despite its name, it does not enable protection or change how the registration behaves.
Deployment and Retrieval
Components use the .registeredExternalService suffix and reside in the registeredExternalServices folder. The type inherits fullName from Metadata.
The registration and provider class are separate metadata components. Deploying the registration does not supply the Apex implementation. Deployment scope therefore depends on the selected provider and whether its class already exists in the destination. If it does not, include the provider class as well as the registration.
The documented package manifest illustrates this separation with TaxSample listed under ApexClass and TaxService listed under RegisteredExternalService. The registration example sets externalServiceProvider to TaxSample and externalServiceProviderType to Tax, without an extensionPointName.
The destination also needs the B2B Commerce or D2C Commerce license required for this metadata type. Do not treat isApplication or isProtected as substitutes for that prerequisite.
Relationships
The provider reference connects the registration to its implementation. The selected extension point or integration category determines which implementation contract that class must satisfy.
References
-
ApexClass:externalServiceProvider.
Documentation Inconsistencies
-
Class ID versus class name: Salesforce's field definition describes
externalServiceProvideras an Apex class ID, but its declarative metadata example supplies the class nameTaxSample. The dependency target isApexClass, but the documentation does not consistently distinguish the two representations. A record ID and a class name must not be treated as interchangeable. -
Extension-point value lists differ: The exposed schema enumeration includes
Commerce_Domain_Checkout_PlaceOrderandCommerce_Endpoint_Search_Suggestions, but Salesforce'sRegisteredExternalServicereference-page value list does not include those two entries.
Common Questions
How do I register a Commerce extension instead of an integration?
Set externalServiceProviderType to Extension, supply the appropriate extensionPointName, and reference an Apex provider class that extends the base class for that extension. For an integration, use one of the integration provider types and omit extensionPointName.
Do I need to deploy the Apex class with RegisteredExternalService?
The registration references a separate ApexClass and does not contain its implementation. Include the provider class in the deployment scope if it is not already present in the destination.
Does externalServiceProvider take an Apex class ID or a class name?
The documentation is inconsistent: the field definition says class ID, while the metadata example uses the class name TaxSample. Both identify the intended ApexClass dependency, but the representations are not interchangeable.
Does isProtected restrict access to a registered provider?
No. isProtected is auto-generated, defaults to false, and does not affect this metadata type's behavior. isApplication separately records whether the extension provider is contained within a managed package.