Registering and mapping a custom integration or extension to a store
Key Takeaway
A store runs your custom Apex only after you register the class with a RegisteredExternalService record and map it with a StoreIntegratedService record. A payment gateway needs only the StoreIntegratedService record.
A custom checkout integration or Commerce extension is only an Apex class until you tell Salesforce what the class provides and which store uses it. You do that in two steps: register and map. Integrations and extensions register differently, and payment gateways skip registering.
Register, then map
Setup has two steps after the Apex class exists: register, then map.
| Register | Map | |
|---|---|---|
| Record you insert | RegisteredExternalService | StoreIntegratedService |
| What it says | What the class provides | Which store uses the provider |
| What the record does | Marks the class as a provider of a certain type | Links that provider to one WebStore |
The store runs the custom Apex only when the class is both registered and mapped for that store.
RegisteredExternalService and StoreIntegratedService both need the B2B Commerce license and API version 49.0 or later.