Set Up Custom B2B Checkout Integrations

After you create your Apex classes, set up your checkout integrations.

Insert your Apex class into RegisteredExternalService. Use the ApexClassId as ExternalServiceProviderId, and use the ExternalServiceProviderType included in the code sample.

Configure a provider for each type, and include these entries.

IdExternalServiceProviderIdExternalServiceProviderTypeDeveloperName
1uuxx00000001s9AAA01pxx0000004cGRAAYInventoryCHECK_INVENTORY
1uuxx00000001sAAAQ01pxx0000004cGQAAYShipmentCOMPUTE_SHIPPING
1uuxx00000001sBAAQ01pxx0000004cGPAAYTaxCOMPUTE_TAXES
1uuxx00000001sCAAQ01pxx0000004cGOAAYPriceCOMPUTE_PRICE

Insert the DeveloperName into StoreIntegratedService.

Use the ID from RegisteredExternalService for the Integration field and the ServiceProviderType matching the ExternalServiceProviderType from RegisteredExternalService.

IdIntegrationServiceProviderTypeStoreId
1ffxx000000021pAAA1uuxx00000001s9AAAInventory0ZExx00000002rRGAQ
1ffxx000000021qAAA1uuxx00000001sAAAQShipment0ZExx00000002rRGAQ
1ffxx000000021rAAA1uuxx00000001sBAAQTax0ZExx00000002rRGAQ
1ffxx000000021sAAA1uuxx00000001sCAAQPrice0ZExx00000002rRGAQ
1ffxx000000021tAAA2abxx00000001sDAAQPayment0ZExx00000002rRGAQ

Create a payment gateway, and locate the PaymentGatewayId.

A custom Apex call that makes outbound HTTP connections must reference a named credential to avoid creating hard-coded credentials within the code. Configure corresponding named credentials, referenced by the Apex class, after you finish your integration installation.