b2c-business-manager-extensions
Business Manager Extensions Skill
This skill guides you through creating Business Manager (BM) extension cartridges to customize the admin interface.
Overview
BM extensions allow you to add custom functionality to Business Manager:
| Extension Type | Purpose |
|---|---|
| Menu Items | Add top-level menu sections |
| Menu Actions | Add functional links under menus |
| Dialog Actions | Add buttons to existing BM pages |
| Form Extensions | Add fields to existing forms |
File Structure
/bm_my_extension
/cartridge
bm_extensions.xml # Extension definitions (required)
/controllers
MyExtension.js # Controller for menu actions
/templates
/default
/extensions
mypage.isml # Custom BM pages
/static
/default
/icons
my-icon.gif # Menu icons
Basic bm_extensions.xml
<?xml version="1.0" encoding="UTF-8"?>
<extensions xmlns="http://www.demandware.com/xml/extensibility/2013-04-24">
<!-- Menu Item: Creates section in navigation -->
<menuitem id="my-tools" name="label.menu.mytools"
site="false" position="10">
<icon path="icons/my-icon.gif"/>
</menuitem>
<!-- Menu Action: Creates link under menu item -->
<menuaction id="my-dashboard" menupath="my-tools"
name="label.action.dashboard">
<exec pipeline="MyExtension" node="Dashboard"/>
<sub-pipelines>
<pipeline name="MyExtension"/>
</sub-pipelines>
</menuaction>
</extensions>
Menu Items
Create top-level navigation sections:
<menuitem id="custom-tools"
name="label.menu.customtools"
site="false"
position="10">
<description>Custom administration tools</description>
<icon path="icons/tools-icon.gif"/>
</menuitem>
| Attribute | Required | Description |
|---|---|---|
id |
Yes | Unique identifier |
name |
Yes | Resource key for display name |
site |
No | true = Site menu, false = Admin menu (default: true) |
position |
No | Sort order (higher = higher in list) |
Menu Actions
Add functional pages under menu items:
<menuaction id="product-export"
menupath="custom-tools"
name="label.action.productexport">
<description>Export products to CSV</description>
<exec pipeline="ProductExport" node="Start"/>
<sub-pipelines>
<pipeline name="ProductExport"/>
</sub-pipelines>
<icon path="icons/export-icon.gif"/>
</menuaction>
| Attribute | Required | Description |
|---|---|---|
id |
Yes | Unique identifier |
menupath |
No | Parent menu item ID |
name |
Yes | Resource key for display name |
Note: For controllers, use pipeline="ControllerName" and node="ActionName".
Dialog Actions
Add buttons to existing BM pages:
<dialogaction id="order-export-btn"
menuaction-ref="order-search"
xp-ref="OrderPage-OrderDetails">
<exec pipeline="OrderExport" node="Export"/>
<icon path="icons/export.gif"/>
<parameters>
<parameter name="OrderNo"/>
</parameters>
</dialogaction>
| Attribute | Required | Description |
|---|---|---|
id |
Yes | Unique identifier |
menuaction-ref |
Yes | Parent menu action ID |
xp-ref |
Yes | Extension point ID |
Common extension points: OrderPage-OrderDetails, ProductPage-Details, CustomerPage-Profile
Form Extensions
Add fields to existing BM forms:
<formextension id="order-search-extension">
<valueinput type="string" name="customOrderField">
<label xml:lang="x-default">Custom Field</label>
<label xml:lang="de">Benutzerdefiniertes Feld</label>
</valueinput>
<valueinput type="string" name="exportStatus">
<label xml:lang="x-default">Export Status</label>
<option>Pending</option>
<option>Exported</option>
<option>Failed</option>
</valueinput>
</formextension>
Controller Example
'use strict';
var ISML = require('dw/template/ISML');
var URLUtils = require('dw/web/URLUtils');
exports.Dashboard = function () {
ISML.renderTemplate('extensions/dashboard', {
title: 'My Dashboard',
data: getReportData()
});
};
exports.Dashboard.public = true;
exports.ProcessAction = function () {
var params = request.httpParameterMap;
var itemId = params.itemId.stringValue;
// Process the action
var result = processItem(itemId);
// Redirect back or show result
response.redirect(URLUtils.url('MyExtension-Dashboard', 'result', result));
};
exports.ProcessAction.public = true;
Template Example
<!DOCTYPE html>
<html>
<head>
<title>${pdict.title}</title>
<link rel="stylesheet" href="${URLUtils.staticURL('/css/bm-custom.css')}"/>
</head>
<body>
<div class="bm-content">
<h1>${pdict.title}</h1>
<table class="bm-table">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<isloop items="${pdict.data}" var="item">
<tr>
<td>${item.id}</td>
<td>${item.name}</td>
<td>
<a href="${URLUtils.url('MyExtension-ProcessAction', 'itemId', item.id)}">
Process
</a>
</td>
</tr>
</isloop>
</tbody>
</table>
</div>
</body>
</html>
Localization
Add resource bundles for labels:
templates/resources/bm_extensions.properties:
label.menu.customtools=Custom Tools
label.action.dashboard=Dashboard
label.action.productexport=Product Export
templates/resources/bm_extensions_de.properties:
label.menu.customtools=Benutzerdefinierte Werkzeuge
label.action.dashboard=Instrumententafel
label.action.productexport=Produktexport
Enabling the Extension
-
Add cartridge to Business Manager site's cartridge path:
- Administration > Sites > Manage Sites > Business Manager
- Add cartridge ID to cartridge path
-
Grant permissions to roles:
- Administration > Organization > Roles
- Select role > Business Manager Modules
- Enable your custom modules
Best Practices
- Prefix IDs with your organization name to avoid conflicts
- Use resource keys for all displayed text (localization)
- Keep cartridge separate - don't mix with storefront cartridges
- Test permissions with different user roles
- Don't reference internal BM URLs - they may change
Detailed Reference
- Extensions XML Reference - Complete XML schema and examples
More from salesforcecommercecloud/b2c-developer-tooling
b2c-docs
Search and read B2C Commerce Script API documentation and XSD schemas using the b2c CLI. Use this skill whenever the user needs to look up class methods, understand API signatures, find available properties on commerce objects (baskets, orders, products, customers), or check XML schema formats for imports. Also use when writing server-side scripts and needing API reference — even if they just say "what methods does Basket have" or "what fields can I import for products".
116b2c-webdav
List, upload, download, and manage files on B2C Commerce instances via WebDAV. Use this skill whenever the user needs to upload files to IMPEX directories, download exports from an instance, list remote files, create or delete directories, or zip/unzip files on the server. Also use when managing file transfers to sandboxes or browsing instance file systems -- even if they just say 'upload a file to the instance' or 'check what's in the IMPEX folder'.
103b2c-slas-auth-patterns
Implement SLAS authentication patterns in B2C Commerce including passwordless login (email OTP, SMS OTP, passkeys), session bridging between PWA Kit/Storefront Next and SFRA, hybrid authentication (B2C 25.3+), token refresh flows, trusted system on behalf of (TSOB), and JWT validation. Use this skill whenever the user asks about shopper authentication beyond basic login, token exchange flows, passwordless or biometric auth, keeping sessions alive across storefronts, handling 409 Conflict errors on token endpoints, refreshing shopper tokens, or validating JWTs — even if they don't mention SLAS by name.
90b2c-config
Inspect and debug CLI configuration, instance connections, and authentication. Use this skill whenever the user needs to check which dw.json or credentials are active, manage multiple instance profiles, retrieve OAuth tokens for scripting, troubleshoot authentication failures or connection errors, or integrate with VS Code or other editors. Also use when environment variables override config or the wrong sandbox is being targeted -- even if they just say 'why is it connecting to the wrong instance' or 'get me an access token'.
90b2c-controllers
Create storefront controllers using SFRA or classic patterns with server.get/post, middleware chains, and res.render/json. Use this skill whenever the user needs to build a page route, handle form submissions, create AJAX endpoints, extend or override existing controllers, or add middleware to a request pipeline. Also use when debugging route registration or response rendering -- even if they just say 'new page endpoint' or 'handle a POST request'.
86b2c-scapi-schemas
Browse and retrieve SCAPI OpenAPI schema specifications. Use this skill whenever the user needs to list available SCAPI APIs, inspect endpoint paths or request/response shapes, explore data models for products or orders, check which fields an API returns, or understand SCAPI versioning. Also use when looking up API details before building an integration -- even if they just say 'what fields does the product API return' or 'show me the SCAPI endpoints'.
84