You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file now declares extensions and redirects to an `ext.config.yaml` file.
141
141
142
142
## Add or update the `ext.config.yaml`
143
143
144
+
Add or update the `src/commerce-backend-ui-1/ext.config.yaml` file. The `commerce-backend-ui-1` directory contains the `actions` and `web-src` code.
145
+
144
146
Your extension configuration file should look like this:
145
147
146
148
```yaml
@@ -162,8 +164,12 @@ runtimeManifest:
162
164
inputs:
163
165
LOG_LEVEL: debug
164
166
annotations:
165
-
require-adobe-auth: false
167
+
require-adobe-auth: true
166
168
final: true
167
169
```
168
170
171
+
The package name must be `admin-ui-sdk`, and the action must be `registration`. The `function` can point to any route that returns the registration in the correct expected format.
172
+
173
+
We recommend securing the registration runtime action by setting `require-adobe-auth` to `true`. The Adobe Commerce instance will correctly load registrations securely based on the provided IMS credentials.
174
+
169
175
Complete this file with the actions from your app.
Copy file name to clipboardExpand all lines: src/pages/admin-ui-sdk/configuration.md
+38-24Lines changed: 38 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: Admin configuration and testing
3
-
description: Learn how to configure the Admin to enable local testing of your Admin customizations.
3
+
description: Learn how to configure the Admin to enable testing of your Admin customizations.
4
4
keywords:
5
5
- App Builder
6
6
- Extensibility
@@ -10,47 +10,61 @@ keywords:
10
10
11
11
The Adobe Commerce Admin UI SDK allows you to use a local server to view and test your Admin customizations before you submit your app to the Adobe Marketplace.
Navigate to **Stores** > Settings > **Configuration** > **Adobe Services** > **Admin UI SDK** and edit the **Local testing** screen. When you enable the local service, all calls are automatically redirected to the local server, instead of connecting to Adobe's App Registry. The values you specify must match the contents of your local `server.js` file.
15
+
## General configuration
16
16
17
-
[Test with a sample app](#test-with-a-sample-app) provides a sample `server.js` file.
17
+
The **General configuration** section enables the Admin UI SDK and refreshes registrations when changes are made.
18
18
19
-

19
+

20
20
21
-
1. Select **Yes** from the **Enable Admin UI SDK**menu.
21
+
The Admin UI SDK is disabled by default. To enable it, set the **Enable Admin UI SDK**field to **Yes**.
22
22
23
-
1. Select **Yes**from the **Enable Local Testing** menu.
23
+
The `Refresh registrations` button reloads all registrations from the registries. It is typically used when changes are made to the registration on the app builder application side or when a new app is added and published, to reflect these changes in the Admin.
24
24
25
-
1. Set the **Local Server Base URL** that points to your localhost, including the port.
25
+
## Database logging configuration
26
26
27
-
1.The **Mock Admin IMS Module**menu determines whether to send mock or real authentication credentials for the Adobe Identity Management Service (IMS). Ensure this value is set to **Yes** for early-stage testing. Set the value to **No** when you are ready to test with real credentials.
27
+
The **Database logging configuration**section allows you to save Admin UI SDK log entries for the specified retention period.
28
28
29
-
1. Set the **Mock IMS Token**. In the sample `server.js` file, this value is set to `dummyToken`.
1. Set the **Mock IMS Org ID**. In the sample `server.js` file, this value is set to `imsOrg`.
31
+
To save logs, set the **Enable Logs** field to **Yes**. By default, this field is set to **No**.
32
32
33
-
1. Save your configuration.
33
+
Set the minimum log level to save. Any logs at this level or higher will be stored. By default, the minimum level is set to **Warning**.
34
34
35
-
1. Clear the cache.
35
+
Set the retention period for logs to be cleaned from the database. This field specifies the number of days. By default, the retention period is set to 1 day.
36
36
37
-
```bash
38
-
bin/magento cache:flush
39
-
```
37
+
## Staging testing
38
+
39
+
The staging testing option provides a sandbox environment to test your applications using the Admin UI SDK in a real-world setting. This environment can be shared with colleagues for collaborative testing before publishing and deploying to production.
1. Select **Yes** from the **Enable testing** menu.
44
+
45
+
1. Set the **Testing mode** to **Staging**.
40
46
41
-
## Clean the Admin UI SDK cache
47
+
1. Select all app statuses to load.
42
48
43
-
The `admin_ui_sdk` cache type stores Admin customizations. As you develop these customizations, run the following command to ensure you are seeing the latest changes:
49
+
## Local testing
44
50
45
-
```bash
46
-
bin/magento cache:clean admin_ui_sdk
47
-
```
51
+
When you enable the local service, all calls are automatically redirected to the local server, instead of connecting to Adobe's App Registry. The values you specify must match the contents of your local `server.js` file.
48
52
49
-
## Test with a sample app
53
+

50
54
51
-
### Prerequisites
55
+
1. Select **Yes** from the **Enable testing** menu.
52
56
53
-
- An Adobe Commerce instance installed on the local machine.
57
+
1. Set the **Testing mode** to `Local testing`.
58
+
59
+
1. Set the **Local Server Base URL** that points to your localhost, including the port.
60
+
61
+
1. The **Mock Admin IMS Module** menu determines whether to send mock or real authentication credentials for the Adobe Identity Management Service (IMS). Ensure this value is set to **Yes** for early-stage testing. Set the value to **No** when you are ready to test with real credentials.
62
+
63
+
1. Set the **Mock IMS Token**. In the sample `server.js` file, this value is set to `dummyToken`.
64
+
65
+
1. Set the **Mock IMS Org ID**. In the sample `server.js` file, this value is set to `imsOrg`.
Copy file name to clipboardExpand all lines: src/pages/admin-ui-sdk/extension-points/customer/grid-columns.md
+86-15Lines changed: 86 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ keywords:
10
10
11
11
The `customer grid columns` extension point enables you to add columns to the grid on the **Customers** > **All Customers** page in the Adobe Commerce Admin. This extension point requires an [API Mesh](https://developer.adobe.com/graphql-mesh-gateway/gateway) for Adobe Developer App Builder instance to retrieve the data to be added to the custom columns.
12
12
13
-
You can use the [`aio api-mesh:describe` command](https://developer.adobe.com/graphql-mesh-gateway/gateway/command-reference/#aio-api-meshdescribe) to retrieve the values of the API key and mesh ID. The key is appended to the mesh endpoint URL.
13
+
You can use the [`aio api-mesh:describe` command](https://developer.adobe.com/graphql-mesh-gateway/gateway/command-reference/#aio-api-meshdescribe) to retrieve the value of the mesh ID.
14
14
15
15
## Example customization
16
16
@@ -20,8 +20,7 @@ You can use the [`aio api-mesh:describe` command](https://developer.adobe.com/gr
20
20
customer: {
21
21
gridColumns: {
22
22
data: {
23
-
meshId:'MESH_ID',
24
-
apiKey:'API_KEY'
23
+
meshId:'MESH_ID'
25
24
},
26
25
properties:[
27
26
{
@@ -35,12 +34,6 @@ customer: {
35
34
columnId:'second_column',
36
35
type:'integer',
37
36
align:'left'
38
-
},
39
-
{
40
-
label:'Third App Column',
41
-
columnId:'third_column',
42
-
type:'date',
43
-
align:'left'
44
37
}
45
38
]
46
39
}
@@ -50,6 +43,7 @@ customer: {
50
43
### Sample API Mesh configuration file
51
44
52
45
The following sample mesh configuration file defines the external source that contains the data to populate in the custom columns.
46
+
It leverages API Mesh [JSON Schemas handler](https://developer.adobe.com/graphql-mesh-gateway/mesh/basic/handlers/json-schema/).
53
47
54
48
```json
55
49
{
@@ -60,11 +54,15 @@ The following sample mesh configuration file defines the external source that co
@@ -77,9 +75,57 @@ The following sample mesh configuration file defines the external source that co
77
75
}
78
76
```
79
77
78
+
### Sample runtime action to retrieve data
79
+
80
+
The `get-customers` sample runtime action is referenced in the mesh configuration file. It defines the path to the runtime action that retrieves the data of custom columns.
81
+
82
+
It is important to add the `ids={args.ids}` as part of the query and handle this filtering in the runtime action. This allows Admin UI SDK to load only the necessary data needed to display in the grid columns in the Admin.
This sample`schema.json` fileis referenced in the mesh configuration file. It defines the response of the external `customerGridColumns` query that fetches column data.
128
+
The `schema.json`sample file, which is also referenced in the mesh configuration file, defines the response of the external `customerGridColumns` query that fetches column data.
83
129
84
130
```json
85
131
{
@@ -97,9 +143,6 @@ This sample `schema.json` file is referenced in the mesh configuration file. It
97
143
},
98
144
"second_column": {
99
145
"type": "integer"
100
-
},
101
-
"third_column": {
102
-
"type": "integer"
103
146
}
104
147
}
105
148
}
@@ -112,11 +155,39 @@ This sample `schema.json` file is referenced in the mesh configuration file. It
112
155
}
113
156
```
114
157
158
+
### Create or update your mesh
159
+
160
+
Use one of the following commands to create or update your mesh. Be sure to store the mesh ID provided.
161
+
162
+
```bash
163
+
aio api-mesh:create mesh.json
164
+
```
165
+
166
+
```bash
167
+
aio api-mesh:update mesh.json
168
+
```
169
+
170
+
### Customer data matching
171
+
172
+
The Admin UI SDK expects the customer ID in Adobe Commerce to correctly match the customer to the data and fill the correct cell.
173
+
174
+
A default value can be provided to be added to unmatched IDs, or in case data doesn't match, the expected type of the column. If a value is not provided, the cell is left empty.
175
+
176
+
In case of error, check the Adobe Commerce logs.
177
+
178
+
The following example provides a default value.
179
+
180
+
```javascript
181
+
"*": {
182
+
"first_column":"Default value",
183
+
"second_column":0
184
+
}
185
+
```
186
+
115
187
## Parameters
116
188
117
189
| Field | Type | Required | Description |
118
190
| --- | --- | --- | --- |
119
-
|`data.apiKey`| string | Yes | The API key assigned to the GraphQL mesh. |
120
191
|`data.meshId`| string | Yes | The ID of the mesh used to retrieve the column data.|
121
192
|`properties.align`| string | Yes | The alignment of the values in the column. One of `left`, `right`, `center`. |
122
193
|`properties.columnId`| string | Yes | The identifier used in the external dataset to identify the column. |
0 commit comments