generated from AdobeDocs/dev-site-documentation-template
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from AdobeDocs/kh_banner-notification
Banner notifications and customer mass actions
- Loading branch information
Showing
13 changed files
with
199 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,4 +32,4 @@ const remarkConfig = { | |
] | ||
], | ||
}; | ||
export default remarkConfig; | ||
export default remarkConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
src/pages/admin-ui-sdk/extension-points/banner-notification.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
title: bannerNotification | ||
description: Create a banner notification mass action in the Adobe Commerce Admin. | ||
keywords: | ||
- App Builder | ||
- Extensibility | ||
--- | ||
|
||
# bannerNotification | ||
|
||
The `bannerNotification` extension point defines the contents of banner notifications that display when customizing a mass action or order view button. | ||
|
||
## Example mass action customizations | ||
|
||
The following example defines success and error messages for multiple mass actions. | ||
|
||
```javascript | ||
bannerNotification: { | ||
getMassActions() { | ||
return { | ||
order: [ | ||
{ | ||
actionId: `${extensionId}::mass-action`, | ||
successMessage: 'Selected orders were updated successfully', | ||
errorMessage: 'App could not proceed with mass action on selected orders' | ||
} | ||
], | ||
product: [ | ||
{ | ||
actionId: `${extensionId}::mass-action`, | ||
successMessage: 'Selected products were updated successfully', | ||
errorMessage: 'App could not proceed with mass action on selected products' | ||
} | ||
], | ||
customer: [ | ||
{ | ||
actionId: `${extensionId}::mass-action`, | ||
successMessage: 'Selected customers were updated successfully', | ||
errorMessage: 'App could not proceed with mass action on selected customers' | ||
} | ||
] | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
| --- | --- | --- | --- | | ||
`customer.actionId` | Yes | The `actionId` of a customer mass action. | ||
where banner notification will be customized. It should be the same one that is defined in the customer mass action extension point. | ||
`customer.successMessage` | No | The success message to display when mass action is successful. A default message is displayed if this parameter is not defined. | ||
`customer.errorMessage` | No | The error message to display when mass action fails. A default message is displayed if this parameter is not defined. | ||
`order.actionId` | string | Yes | The `actionId` of an [order mass action](./order/mass-action.md). | ||
`order.successMessage` | No | The success message to display when mass action is successful. A default message is displayed if this parameter is not defined. | ||
`order.errorMessage` | No | The error message to display when mass action fails. A default message is displayed if this parameter is not defined. | ||
`product.actionId` | Yes | The `actionId` of a [product mass action](./product/mass-action.md). | ||
`product.successMessage` | No | The success message to display when mass action is successful. A default message is displayed if this parameter is not defined. | ||
`product.errorMessage` | No | The error message to display when mass action fails. A default message is displayed if this parameter is not defined. | ||
|
||
## Example order view button customization | ||
|
||
The following example defines success and error messages for a custom order view button. | ||
|
||
```javascript | ||
bannerNotification: { | ||
getOrderViewButtons() { | ||
return [ | ||
{ | ||
buttonId: 'order-custom-view-button::create-return', | ||
successMessage: 'Order View Button Success', | ||
errorMessage: 'Order View Button Error' | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
| --- | --- | --- | --- | | ||
`buttonId` | Yes | A `buttonId` defined in an order view button extension point. | ||
`successMessage` | No | The success message to display when the view button notification is successful. A default message is displayed if this parameter is not defined. | ||
`errorMessage` | No | The error message to display when the view button notification fails. A default message is displayed if this parameter is not defined. |
62 changes: 62 additions & 0 deletions
62
src/pages/admin-ui-sdk/extension-points/customer/mass-action.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
title: mass action | ||
description: Customize the customer grid mass action in the Adobe Commerce Admin. | ||
keywords: | ||
- App Builder | ||
- Extensibility | ||
--- | ||
|
||
# customer mass action | ||
|
||
The `customer mass action` extension point customizes customer grid mass actions in the Adobe Commerce Admin. | ||
|
||
## Example customization | ||
|
||
The following example creates mass actions labeled `First App Mass Action` and `Another Mass Action`. The `extensionId` value matches the ID specified at [app registration](../../app-registration.md). | ||
|
||
The `path` parameter specifies where to redirect an action. The Admin UI SDK provides the selected product IDs in a [`sharedContext`](../index.md#shared-contexts) when a merchant selects a mass action. Your implementation must read the selected items from the `sharedContext`. | ||
|
||
```javascript | ||
customer: { | ||
getMassActions() { | ||
return [ | ||
{ | ||
actionId: `${extensionId}::first-mass-action`, | ||
label: 'First App Mass Action', | ||
confirm: { | ||
title: 'First App Mass Action', | ||
message: 'Are you sure your want to proceed with First App Mass Action on selected customers?' | ||
}, | ||
path: '#/first-mass-action', | ||
customerSelectLimit: 1 | ||
}, | ||
{ | ||
actionId: `${extensionId}::another-first-mass-action`, | ||
label: 'Another Mass Action', | ||
title: 'Another Customers Mass Action', | ||
path: '#/another-mass-action' | ||
}, | ||
{ | ||
actionId: `${extensionId}::mass-action`, | ||
label: 'Mass Action', | ||
path: '#/mass-action', | ||
displayIframe: false | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
||
## Parameters | ||
|
||
| Field | Type | Required | Description | | ||
| --- | --- | --- | --- | | ||
| `actionId` | string | Yes | A unique ID assigned to the action. The recommended format is `<extensionId>::<actionName>`. | | ||
| `confirm.message` | string | No | The message displayed on the confirmation dialog for a mass action. | | ||
| `confirm.title` | string | No | The title of a dialog that confirms the mass action. | | ||
| `label` | string | Yes | The name of the action to display. | | ||
| `title` | string | No | An optional page title for the action. If not specified, the label is used. | ||
| `path` | string | Yes | The relative path in the application to redirect to the action. You might need to prepend `#/` to the path to ensure access to the correct page. | | ||
| `customerSelectLimit` | integer | No | Set the maximum number of customers that can be selected for a mass action. By default, the number is unlimited. | | ||
| `displayIframe` | boolean | No | Indicates whether an iFrame will be displayed at the relative path. The default value is `true`. [Mass actions without iFrames](../index.md#mass-actions-without-iframes) provides additional details. | | ||
| `timeout` | integer | No | Only relevant when `displayIframe` is set to `false`. Timeout by seconds to the request sent to application. Default value is 10 seconds. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters