|
| 1 | +--- |
| 2 | +title: Extension Compatibility |
| 3 | +description: Learn about how to develop and configure App Builder extensions to work seamlessly with both SaaS and PaaS versions of Adobe Commerce. |
| 4 | +keywords: |
| 5 | + - App Builder |
| 6 | + - Extensibility |
| 7 | +--- |
| 8 | + |
| 9 | +# App Builder Extension Compatibility |
| 10 | + |
| 11 | +When developing and configuring App Builder extensions, it is important to ensure that they work seamlessly with both SaaS and PaaS versions of Adobe Commerce. The following guide describes how to ensure that extensions are fully compatible, deployable, and functional across both environments. |
| 12 | + |
| 13 | +A key difference between SaaS and PaaS is how modules are installed on a Commerce instance. PaaS modules require installation, while SaaS modules are pre-installed. |
| 14 | + |
| 15 | +For a better understanding of the differences between SaaS and PaaS, refer to the [Feature Comparison](https://experienceleague.adobe.com/en/docs/commerce/cloud-service/feature-comparison). |
| 16 | + |
| 17 | +## IMS authentication |
| 18 | + |
| 19 | +You should use IMS authentication to connect to Commerce. |
| 20 | + |
| 21 | +- ​<Edition name="paas" /> IMS is necessary to utilize the Admin UI SDK. Adobe encourages adopting IMS authentication to ease migration to SaaS. |
| 22 | +- ​<Edition name="saas" /> IMS authentication is used and Commerce integration authentication is not available. |
| 23 | + |
| 24 | +For more information on enabling IMS authentication for your actions, see [IMS Authentication](../starter-kit/checkout/connect.md#adobe-identity-management-service-ims). |
| 25 | + |
| 26 | +## API integration |
| 27 | + |
| 28 | +Verify that your Commerce APIs are compatible with both environments by checking the following specifications. |
| 29 | + |
| 30 | +**GraphQL API** |
| 31 | + |
| 32 | +- ​<Edition name="paas" /> For PaaS, there are separate core and catalog services GraphQL endpoints. |
| 33 | +- ​<Edition name="saas" /> For SaaS, a single GraphQL URL is used, see the [GraphQL API specification](https://developer.adobe.com/commerce/services/reference/cloud/graphql/). |
| 34 | + |
| 35 | +**REST API** |
| 36 | + |
| 37 | +- ​<Edition name="paas" /> [PaaS REST API specification](https://developer.adobe.com/commerce/webapi/rest/quick-reference/). |
| 38 | +- ​<Edition name="saas" /> [SaaS REST API specification](https://developer.adobe.com/commerce/services/reference/cloud/rest/). |
| 39 | + |
| 40 | +**Adapt REST endpoint for older starter kit versions** |
| 41 | + |
| 42 | +For older versions of the starter kit, check if your code is adapted as follows: |
| 43 | + |
| 44 | +- To support both PaaS and SaaS, modify the `COMMERCE_BASE_URL` environment variable according to the [Commerce integration guide](https://developer.adobe.com/commerce/extensibility/starter-kit/checkout/connect/). |
| 45 | +- Ensure that your [adobe-commerce](https://github.com/adobe/commerce-checkout-starter-kit/blob/main/lib/adobe-commerce.js) HTTP client removes the `rest/all` prefix for compatibility with both deployment flavors. For example: |
| 46 | + |
| 47 | + ```javascript |
| 48 | + - commerceGot(`rest/all/V1/oope_payment_method/`, { |
| 49 | + + commerceGot(`V1/oope_payment_method/`, { |
| 50 | + ``` |
| 51 | +
|
| 52 | +## Commerce webhook |
| 53 | +
|
| 54 | +- ​<Edition name="paas" /> Webhooks are created with [XML files](../webhooks/create-webhooks.md). |
| 55 | +- ​<Edition name="saas" /> SaaS supports a predefined list of webhooks that you can configure in the [Admin interface](../webhooks/create-webhooks.md#define-webhook-properties) or create through [REST endpoints](../webhooks/api.md). |
| 56 | +
|
| 57 | +## Commerce eventing |
| 58 | +
|
| 59 | +- ​<Edition name="paas" /> You can register events through [XML files](../events/module-development.md#register-events) or [REST endpoints](../events/api.md). However, for plugin-type events, you may need to redeploy to generate plugins. |
| 60 | +- ​<Edition name="saas" /> SaaS supports a predefined list of events. You can manage events through the [Admin interface](../events/create-events.md) or [REST endpoints](../events/api.md). |
| 61 | +
|
| 62 | +## Admin UI SDK |
| 63 | +
|
| 64 | +- ​<Edition name="paas" /> Use the Admin UI SDK version `3.0` or higher to enable IMS authentication tokens from [the shared context](../admin-ui-sdk/extension-points/index.md#shared-contexts). Refer to [troubleshooting](../admin-ui-sdk/troubleshooting.md#issues-upgrading-to-major-admin-ui-sdk-version) if you encounter version restrictions: |
| 65 | +
|
| 66 | + ```json |
| 67 | + "magento/commerce-backend-sdk": "3.0.0 as 2.0.0" |
| 68 | + ``` |
| 69 | +
|
| 70 | +- ​<Edition name="saas" /> The Admin UI SDK and IMS modules are already configured. The [Admin interface](../admin-ui-sdk/configuration.md) works the same as it does in PaaS. |
| 71 | +- To enable Adobe authentication for actions called by the SPA, you can obtain IMS tokens that work in both PaaS and SaaS by using the following: |
| 72 | +
|
| 73 | + ```javascript |
| 74 | + if (props.ims?.token) { |
| 75 | + // When running inside Experience Cloud Shell, IMS token and orgId can be accessed via props.ims. |
| 76 | + setImsToken(props.ims.token); |
| 77 | + setImsOrgId(props.ims.org); |
| 78 | + } else { |
| 79 | + // Commerce PaaS & SaaS retrieves IMS token via sharedContext from Admin UI SDK v3.0+ |
| 80 | + // See https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/extension-points/#shared-contexts |
| 81 | + const guestConnection = await attach({ id: extensionId }); |
| 82 | + const context = guestConnection?.sharedContext; |
| 83 | + setImsToken(context?.get('imsToken')); |
| 84 | + setImsOrgId(context?.get('imsOrgId')); |
| 85 | + } |
| 86 | + ``` |
| 87 | +
|
| 88 | + For more information, see the [full example](https://github.com/adobe/commerce-checkout-starter-kit/blob/main/commerce-backend-ui-1/web-src/src/components/MainPage.js). |
| 89 | +
|
| 90 | +## Out-of-process extensibility modules |
| 91 | +
|
| 92 | +- ​<Edition name="paas" /> Requires composer installation. |
| 93 | +- ​<Edition name="saas" /> Modules are pre-installed. |
| 94 | +- APIs function the same way in both environments: |
| 95 | + - [custom attributes](https://developer.adobe.com/commerce/services/cloud/guides/custom-attributes/) |
| 96 | + - [payment](../starter-kit/checkout/payment-reference.md) |
| 97 | + - [shipping](../starter-kit/checkout/shipping-reference.md) |
| 98 | + - [tax](../starter-kit/checkout/tax-reference.md) |
| 99 | +
|
| 100 | +## Storefront integration and testing |
| 101 | +
|
| 102 | +- ​<Edition name="paas" /> EDS Storefronts require additional configuration, such as the Catalog and [Storefront Compatibility Package](https://experienceleague.adobe.com/developer/commerce/storefront/setup/configuration/storefront-compatibility/install/). PaaS also provides the [Luma Storefront](https://experienceleague.adobe.com/docs/commerce/frontend/guide/storefront/luma.html), which is not available in SaaS. |
| 103 | +- ​<Edition name="saas" /> You can use the [EDS Storefront to connect to your Commerce instance](https://experienceleague.adobe.com/en/docs/commerce/cloud-service/storefront) without installing any modules. SaaS environments do not have access to the Luma Storefront. |
0 commit comments