Skip to content

Commit 990489d

Browse files
committed
Extension compatibility
1 parent 44f08b0 commit 990489d

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed

src/pages/app-development/app-submission-guidelines.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ The following requirements must be met for your app to be accepted. If your app
112112
- **Multi-flavor support**: Ensure compatibility between commerce flavors (PaaS & SaaS):
113113
- &#8203;<Edition name="saas" /> Use [IMS](/starter-kit/checkout/connect/#adobe-identity-management-service-ims) for authentication instead of [Commerce integrations (OAuth1)](/starter-kit/checkout/connect/#create-a-commerce-integration).
114114
- &#8203;<Edition name="saas" /> Configure [the Commerce Base URL](/starter-kit/checkout/connect/) to include tenantId without `/rest`.
115+
- For detailed guidelines on supporting both SaaS and PaaS, see [Extension Compatibility](./extension-compatibility.md).
115116

116117
- Quality assurance
117118
- **Test suite**: Ensure tests all tests are passing. Run `npm test` to validate.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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+
- &#8203;<Edition name="paas" /> IMS is necessary to utilize the Admin UI SDK. Adobe encourages adopting IMS authentication to ease migration to SaaS.
22+
- &#8203;<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+
- &#8203;<Edition name="paas" /> For PaaS, there are separate Core and Catalog GraphQL endpoints.
33+
- &#8203;<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+
- &#8203;<Edition name="paas" /> [PaaS REST API specification](https://developer.adobe.com/commerce/webapi/rest/quick-reference/).
38+
- &#8203;<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+
<Edition name="paas" />
43+
44+
For older versions of the starter kit, check if your code is adapted as follows:
45+
46+
- 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/).
47+
- 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:
48+
49+
```javascript
50+
- commerceGot(`rest/all/V1/oope_payment_method/`, {
51+
+ commerceGot(`V1/oope_payment_method/`, {
52+
```
53+
54+
## Commerce webhook
55+
56+
- &#8203;<Edition name="paas" /> Webhooks are created with [XML files](../webhooks/create-webhooks.md).
57+
- &#8203;<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).
58+
59+
## Commerce eventing
60+
61+
- &#8203;<Edition name="paas" /> You can register events through [XML files](../events/module-development.md#register-events) or REST endpoints. However, for plugin-type events, you may need to redeploy to generate plugins.
62+
- &#8203;<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).
63+
64+
## Admin UI SDK
65+
66+
- &#8203;<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:
67+
68+
```json
69+
"magento/commerce-backend-sdk": "3.0.0 as 2.0.0"
70+
```
71+
72+
- &#8203;<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. 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.
73+
74+
```javascript
75+
if (props.ims?.token) {
76+
// When running inside Experience Cloud Shell, IMS token and orgId can be accessed via props.ims.
77+
setImsToken(props.ims.token);
78+
setImsOrgId(props.ims.org);
79+
} else {
80+
// Commerce PaaS & SaaS retrieves IMS token via sharedContext from Admin UI SDK v3.0+
81+
// See https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/extension-points/#shared-contexts
82+
const guestConnection = await attach({ id: extensionId });
83+
const context = guestConnection?.sharedContext;
84+
setImsToken(context?.get('imsToken'));
85+
setImsOrgId(context?.get('imsOrgId'));
86+
}
87+
```
88+
89+
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).
90+
91+
## Out-of-process extensibility modules
92+
93+
- &#8203;<Edition name="saas" /> Modules are pre-installed.
94+
- &#8203;<Edition name="paas" /> Requires composer installation.
95+
- APIs function the same way in both environments:
96+
- [custom attributes](https://developer.adobe.com/commerce/services/cloud/guides/custom-attributes/)
97+
- [payment](../starter-kit/checkout/payment-reference.md)
98+
- [shipping](../starter-kit/checkout/shipping-reference.md)
99+
- [tax](../starter-kit/checkout/tax-reference.md)
100+
101+
## Storefront integration and testing
102+
103+
- &#8203;<Edition name="paas" /> Requires additional configuration for [EDS Storefront](https://experienceleague.adobe.com/developer/commerce/storefront/get-started/), such as the Catalog and Storefront Compatibility Package.
104+
- &#8203;<Edition name="saas" /> Does not provide the Luma Storefront but offers Admin and APIs. Instead, you can use the [EDS Storefront to connect to your Commerce instance](https://experienceleague.adobe.com/en/docs/commerce/cloud-service/storefront).

0 commit comments

Comments
 (0)