Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions admin-ui-sdk/v2/customer/custom-mass-action/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# package directories
node_modules

# build
build
dist
.manifest-dist.yml

# Config
config.json
.env*
!.env.dist
.aio

# Adobe I/O console config
console.json

.idea
.aws.tmp.creds.json
.parcel-cache
.DS_Store
.vscode

64 changes: 64 additions & 0 deletions admin-ui-sdk/v2/customer/custom-mass-action/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Customer Mass Action — Admin UI SDK V2

Adds custom mass actions to the customer grid in the Adobe Commerce Admin panel.

When a merchant selects one or more customers and picks one of these actions from the mass actions dropdown, Commerce Admin either opens an iframe backed by your App Builder frontend (`view` actions), or calls a backend runtime action directly with no UI (`worker` actions).

## What you get

Three sample mass actions:

| Action | Type | Behavior |
|---|---|---|
| Customer Mass Action | `view` | Opens an iframe listing the selected customer IDs |
| Mass Action With Redirect | `view` | Opens an iframe showing the selected customer IDs in a combobox and closes on "Done" |
| Mass Action No iFrame | `worker` | Runs `mass-actions/massAction` as a backend runtime action — no UI is shown |

The mass action definitions live in `app.commerce.config.ts`. The iframe UI lives in `src/commerce-backend-ui-2/web-src/`. The worker action logic lives in `src/commerce-backend-ui-2/actions/massAction/index.js`.

## How it works

1. Merchant selects one or more customers in the customer grid and picks a mass action from the dropdown
2. For `view` actions, Commerce Admin opens the configured `path` inside an iframe backed by your App Builder web app; the app reads the selected IDs via the Admin UI SDK guest connection (`sharedContext.get('selectedIds')`)
3. For `worker` actions, Commerce Admin calls the configured `runtimeAction` directly with the selected IDs — no iframe is shown

## Prerequisites

- [Node.js](https://nodejs.org/) >= 24
- [Adobe I/O CLI](https://developer.adobe.com/runtime/docs/guides/tools/cli_install/) (`npm install -g @adobe/aio-cli`)
- An App Builder project on [Adobe Developer Console](https://developer.adobe.com/console/) with a workspace configured for your Commerce instance
- Adobe Commerce >= 2.4.7 with the [Admin UI SDK module](https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/) installed and enabled

## Setup

**1. Install dependencies**

```bash
npm install
```

**2. Connect to your App Builder workspace**

```bash
aio console org select
aio console project select
aio console workspace select
aio app use -g --no-input --overwrite
```

**3. Deploy**

```bash
aio app deploy
```

**4. Associate and install on Commerce**

Associate and install the app with your Commerce instance through the App Management UI in the Commerce Admin. See [App Management](https://developer.adobe.com/commerce/extensibility/app-management/) for the full walkthrough.

To verify the installation, navigate to **Stores → Configuration → Adobe Services → Admin UI SDK → Configure Extensions** and check the **Installed Extensions** tab — the app should appear there once successfully installed.

## More information

- [Admin UI SDK — Customer Mass Action](https://developer.adobe.com/commerce/extensibility/admin-ui-sdk/extension-points/customer/mass-action/)
- [App Management](https://developer.adobe.com/commerce/extensibility/app-management/)
51 changes: 51 additions & 0 deletions admin-ui-sdk/v2/customer/custom-mass-action/app.commerce.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* Copyright 2026 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import { defineConfig } from '@adobe/aio-commerce-lib-app/config'

export default defineConfig({
metadata: {
id: 'customer-custom-mass-action',
displayName: 'Adobe Commerce customer grid custom mass action',
version: '1.0.0',
description: 'Adobe Commerce customer grid custom mass action in admin panel',
},
adminUi: {
customer: {
massActions: [
{
id: 'customer-custom-mass-action::customer-mass-action',
label: 'Customer Mass Action',
type: 'view',
path: '#/customer-mass-action',
confirm: {
title: 'Mass Action',
message: 'Are you sure your want to proceed with Mass Action on selected customers?',
},
selectionLimit: 1,
},
{
id: 'customer-custom-mass-action::mass-action-with-redirect',
label: 'Mass Action With Redirect',
title: 'Customer Mass Action With Redirect',
type: 'view',
path: '#/mass-action-with-redirect',
},
{
id: 'customer-custom-mass-action::mass-action-no-iFrame',
label: 'Mass Action No iFrame',
type: 'worker',
runtimeAction: 'mass-actions/massAction',
},
],
},
},
})
5 changes: 5 additions & 0 deletions admin-ui-sdk/v2/customer/custom-mass-action/app.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extensions:
commerce/backend-ui/2:
$include: src/commerce-backend-ui-2/ext.config.yaml
commerce/extensibility/1:
$include: src/commerce-extensibility-1/ext.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "customer-custom-mass-action",
"displayName": "Adobe Commerce customer grid custom mass action",
"description": "Adobe Commerce customer grid custom mass action in admin panel",
"platform": "web",
"id": "customer-custom-mass-action",
"version": "1.0.0"
}
10 changes: 10 additions & 0 deletions admin-ui-sdk/v2/customer/custom-mass-action/install.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$schema: http://json-schema.org/draft-07/schema
$id: https://adobe.io/schemas/app-builder-templates/1

categories:
- action
- ui

extensions:
- extensionPointId: commerce/backend-ui/2
- extensionPointId: commerce/extensibility/1
Loading