@salesforce/b2c-cli 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/dev.js +8 -8
- package/bin/run.js +5 -7
- package/content/guidance/b2c/b2c-business-manager-extensions/SKILL.md +361 -0
- package/content/guidance/b2c/b2c-business-manager-extensions/references/EXTENSIONS-XML.md +458 -0
- package/content/guidance/b2c/b2c-controllers/SKILL.md +301 -0
- package/content/guidance/b2c/b2c-controllers/references/CLASSIC-PATTERNS.md +335 -0
- package/content/guidance/b2c/b2c-controllers/references/SFRA-PATTERNS.md +400 -0
- package/content/guidance/b2c/b2c-custom-api-development/SKILL.md +281 -0
- package/content/guidance/b2c/b2c-custom-api-development/references/CONTRACT.md +142 -0
- package/content/guidance/b2c/b2c-custom-api-development/references/IMPLEMENTATION.md +153 -0
- package/content/guidance/b2c/b2c-custom-api-development/references/TESTING.md +118 -0
- package/content/guidance/b2c/b2c-custom-caches/SKILL.md +279 -0
- package/content/guidance/b2c/b2c-custom-job-steps/SKILL.md +520 -0
- package/content/guidance/b2c/b2c-custom-job-steps/references/CHUNK-ORIENTED.md +377 -0
- package/content/guidance/b2c/b2c-custom-job-steps/references/JOBS-XML.md +212 -0
- package/content/guidance/b2c/b2c-custom-job-steps/references/STEPTYPES-JSON.md +373 -0
- package/content/guidance/b2c/b2c-custom-job-steps/references/TASK-ORIENTED.md +344 -0
- package/content/guidance/b2c/b2c-custom-objects/SKILL.md +327 -0
- package/content/guidance/b2c/b2c-custom-objects/references/OCAPI-SEARCH.md +298 -0
- package/content/guidance/b2c/b2c-forms/SKILL.md +242 -0
- package/content/guidance/b2c/b2c-forms/references/FORM-XML.md +409 -0
- package/content/guidance/b2c/b2c-hooks/SKILL.md +500 -0
- package/content/guidance/b2c/b2c-hooks/references/OCAPI-SCAPI-HOOKS.md +403 -0
- package/content/guidance/b2c/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +169 -0
- package/content/guidance/b2c/b2c-hooks/references/SYSTEM-HOOKS.md +433 -0
- package/content/guidance/b2c/b2c-isml/SKILL.md +320 -0
- package/content/guidance/b2c/b2c-isml/references/EXPRESSIONS.md +366 -0
- package/content/guidance/b2c/b2c-isml/references/TAGS.md +443 -0
- package/content/guidance/b2c/b2c-localization/SKILL.md +344 -0
- package/content/guidance/b2c/b2c-localization/references/PATTERNS.md +407 -0
- package/content/guidance/b2c/b2c-logging/SKILL.md +352 -0
- package/content/guidance/b2c/b2c-logging/references/LOG-FILES.md +282 -0
- package/content/guidance/b2c/b2c-metadata/SKILL.md +406 -0
- package/content/guidance/b2c/b2c-metadata/references/SYSTEM-OBJECTS.md +320 -0
- package/content/guidance/b2c/b2c-metadata/references/XML-EXAMPLES.md +366 -0
- package/content/guidance/b2c/b2c-onboarding/SKILL.md +154 -0
- package/content/guidance/b2c/b2c-ordering/SKILL.md +391 -0
- package/content/guidance/b2c/b2c-page-designer/SKILL.md +410 -0
- package/content/guidance/b2c/b2c-page-designer/references/ATTRIBUTE-TYPES.md +436 -0
- package/content/guidance/b2c/b2c-page-designer/references/META-DEFINITIONS.md +340 -0
- package/content/guidance/b2c/b2c-querying-data/SKILL.md +289 -0
- package/content/guidance/b2c/b2c-querying-data/references/PERFORMANCE-APIS.md +74 -0
- package/content/guidance/b2c/b2c-scapi-admin/SKILL.md +53 -0
- package/content/guidance/b2c/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +440 -0
- package/content/guidance/b2c/b2c-scapi-admin/references/INTEGRATION-PATTERNS.md +518 -0
- package/content/guidance/b2c/b2c-scapi-admin/references/OAUTH-SCOPES.md +337 -0
- package/content/guidance/b2c/b2c-scapi-shopper/SKILL.md +56 -0
- package/content/guidance/b2c/b2c-scapi-shopper/references/CHECKOUT-FLOW.md +466 -0
- package/content/guidance/b2c/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +351 -0
- package/content/guidance/b2c/b2c-scapi-shopper/references/COMMON-PATTERNS.md +390 -0
- package/content/guidance/b2c/b2c-scapi-shopper/references/SCOPES.md +290 -0
- package/content/guidance/b2c/b2c-slas-auth-patterns/SKILL.md +420 -0
- package/content/guidance/b2c/b2c-slas-auth-patterns/references/PASSKEYS.md +126 -0
- package/content/guidance/b2c/b2c-slas-auth-patterns/references/SESSION-BRIDGE.md +267 -0
- package/content/guidance/b2c/b2c-slas-auth-patterns/references/TOKEN-LIFECYCLE.md +367 -0
- package/content/guidance/b2c/b2c-webservices/SKILL.md +318 -0
- package/content/guidance/b2c/b2c-webservices/references/FTP-SERVICES.md +524 -0
- package/content/guidance/b2c/b2c-webservices/references/HTTP-SERVICES.md +578 -0
- package/content/guidance/b2c/b2c-webservices/references/SERVICES-XML.md +351 -0
- package/content/guidance/b2c/b2c-webservices/references/SOAP-SERVICES.md +587 -0
- package/content/guidance/b2c-cli/b2c-am/SKILL.md +277 -0
- package/content/guidance/b2c-cli/b2c-bm-users-roles/SKILL.md +210 -0
- package/content/guidance/b2c-cli/b2c-cap/SKILL.md +131 -0
- package/content/guidance/b2c-cli/b2c-cip/SKILL.md +116 -0
- package/content/guidance/b2c-cli/b2c-cip/references/KNOWN_TABLES.md +105 -0
- package/content/guidance/b2c-cli/b2c-cip/references/SALES_ANALYSIS.md +50 -0
- package/content/guidance/b2c-cli/b2c-cip/references/STARTER_QUERIES.md +147 -0
- package/content/guidance/b2c-cli/b2c-code/SKILL.md +146 -0
- package/content/guidance/b2c-cli/b2c-config/SKILL.md +462 -0
- package/content/guidance/b2c-cli/b2c-content/SKILL.md +176 -0
- package/content/guidance/b2c-cli/b2c-debug/SKILL.md +138 -0
- package/content/guidance/b2c-cli/b2c-docs/SKILL.md +301 -0
- package/content/guidance/b2c-cli/b2c-ecdn/SKILL.md +135 -0
- package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +97 -0
- package/content/guidance/b2c-cli/b2c-ecdn/references/SECURITY.md +75 -0
- package/content/guidance/b2c-cli/b2c-import-set-migrations/SKILL.md +265 -0
- package/content/guidance/b2c-cli/b2c-job/SKILL.md +64 -0
- package/content/guidance/b2c-cli/b2c-job/references/EXPORT.md +121 -0
- package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +55 -0
- package/content/guidance/b2c-cli/b2c-job/references/RUN-AND-MONITOR.md +119 -0
- package/content/guidance/b2c-cli/b2c-logs/SKILL.md +249 -0
- package/content/guidance/b2c-cli/b2c-metrics/SKILL.md +315 -0
- package/content/guidance/b2c-cli/b2c-mrt/SKILL.md +207 -0
- package/content/guidance/b2c-cli/b2c-mrt/references/BUNDLE-COMMANDS.md +203 -0
- package/content/guidance/b2c-cli/b2c-mrt/references/ENVIRONMENT-COMMANDS.md +218 -0
- package/content/guidance/b2c-cli/b2c-mrt/references/PROJECT-COMMANDS.md +154 -0
- package/content/guidance/b2c-cli/b2c-sandbox/SKILL.md +112 -0
- package/content/guidance/b2c-cli/b2c-scapi-custom/SKILL.md +126 -0
- package/content/guidance/b2c-cli/b2c-scapi-schemas/SKILL.md +66 -0
- package/content/guidance/b2c-cli/b2c-scapi-schemas/references/CLI-EXAMPLES.md +108 -0
- package/content/guidance/b2c-cli/b2c-site-import-export/SKILL.md +57 -0
- package/content/guidance/b2c-cli/b2c-site-import-export/references/IMPORT-OPTIONS.md +118 -0
- package/content/guidance/b2c-cli/b2c-site-import-export/references/METADATA-XML.md +381 -0
- package/content/guidance/b2c-cli/b2c-site-import-export/references/WORKFLOWS.md +182 -0
- package/content/guidance/b2c-cli/b2c-sites/SKILL.md +112 -0
- package/content/guidance/b2c-cli/b2c-slas/SKILL.md +182 -0
- package/content/guidance/b2c-cli/b2c-webdav/SKILL.md +186 -0
- package/content/guidance/b2c-ops/b2c-checkout-triage/SKILL.md +68 -0
- package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +75 -0
- package/content/guidance/b2c-ops/b2c-job-health/references/job-logs.md +21 -0
- package/content/guidance/b2c-ops/b2c-order-failure-triage/SKILL.md +66 -0
- package/content/guidance/b2c-ops/b2c-order-failure-triage/references/order-evidence.md +87 -0
- package/content/guidance/b2c-ops/b2c-production-triage/SKILL.md +87 -0
- package/content/guidance/b2c-ops/b2c-production-triage/references/escalation.md +57 -0
- package/content/guidance/index.json +1949 -0
- package/content/guidance/storefront-next/sfnext-accessibility/SKILL.md +103 -0
- package/content/guidance/storefront-next/sfnext-accessibility/references/checklist.md +64 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/SKILL.md +91 -0
- package/content/guidance/storefront-next/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
- package/content/guidance/storefront-next/sfnext-authentication/SKILL.md +127 -0
- package/content/guidance/storefront-next/sfnext-authentication/references/COOKIES.md +39 -0
- package/content/guidance/storefront-next/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/SKILL.md +67 -0
- package/content/guidance/storefront-next/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
- package/content/guidance/storefront-next/sfnext-components/SKILL.md +153 -0
- package/content/guidance/storefront-next/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
- package/content/guidance/storefront-next/sfnext-components/references/SHAPE-TOKENS.md +51 -0
- package/content/guidance/storefront-next/sfnext-components/references/STORYBOOK.md +54 -0
- package/content/guidance/storefront-next/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
- package/content/guidance/storefront-next/sfnext-components/references/TROUBLESHOOTING.md +19 -0
- package/content/guidance/storefront-next/sfnext-configuration/SKILL.md +163 -0
- package/content/guidance/storefront-next/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
- package/content/guidance/storefront-next/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/SKILL.md +140 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/ACTIONS.md +53 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADERS.md +73 -0
- package/content/guidance/storefront-next/sfnext-data-fetching/references/SCAPI-FETCHER.md +39 -0
- package/content/guidance/storefront-next/sfnext-deployment/SKILL.md +127 -0
- package/content/guidance/storefront-next/sfnext-deployment/references/MRT-DEPLOYMENT.md +59 -0
- package/content/guidance/storefront-next/sfnext-extensions/SKILL.md +118 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/BASE-AUDIT.md +68 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
- package/content/guidance/storefront-next/sfnext-extensions/references/EXTENSION-EXAMPLES.md +79 -0
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/SKILL.md +93 -0
- package/content/guidance/storefront-next/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +86 -0
- package/content/guidance/storefront-next/sfnext-i18n/SKILL.md +152 -0
- package/content/guidance/storefront-next/sfnext-i18n/references/locale-config.md +35 -0
- package/content/guidance/storefront-next/sfnext-overview/SKILL.md +101 -0
- package/content/guidance/storefront-next/sfnext-page-designer/SKILL.md +202 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/COMPONENT-REGISTRY.md +111 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/DECORATOR-PATTERNS.md +168 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
- package/content/guidance/storefront-next/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
- package/content/guidance/storefront-next/sfnext-performance/SKILL.md +102 -0
- package/content/guidance/storefront-next/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
- package/content/guidance/storefront-next/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
- package/content/guidance/storefront-next/sfnext-project-setup/SKILL.md +147 -0
- package/content/guidance/storefront-next/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -0
- package/content/guidance/storefront-next/sfnext-project-setup/references/SCRIPTS.md +47 -0
- package/content/guidance/storefront-next/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/SKILL.md +70 -0
- package/content/guidance/storefront-next/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
- package/content/guidance/storefront-next/sfnext-revalidation/SKILL.md +121 -0
- package/content/guidance/storefront-next/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
- package/content/guidance/storefront-next/sfnext-routing/SKILL.md +123 -0
- package/content/guidance/storefront-next/sfnext-routing/references/ROUTE-CONVENTIONS.md +65 -0
- package/content/guidance/storefront-next/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
- package/content/guidance/storefront-next/sfnext-scapi/SKILL.md +126 -0
- package/content/guidance/storefront-next/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/SKILL.md +129 -0
- package/content/guidance/storefront-next/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
- package/content/guidance/storefront-next/sfnext-security/references/TURNSTILE.md +43 -0
- package/content/guidance/storefront-next/sfnext-seo/SKILL.md +95 -0
- package/content/guidance/storefront-next/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
- package/content/guidance/storefront-next/sfnext-seo/references/SEO-ROUTES.md +31 -0
- package/content/guidance/storefront-next/sfnext-state-management/SKILL.md +114 -0
- package/content/guidance/storefront-next/sfnext-state-management/references/PATTERNS.md +45 -0
- package/content/guidance/storefront-next/sfnext-testing/SKILL.md +151 -0
- package/content/guidance/storefront-next/sfnext-testing/references/E2E.md +38 -0
- package/content/guidance/storefront-next/sfnext-testing/references/STORYBOOK-PATTERNS.md +97 -0
- package/content/guidance/storefront-next/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
- package/content/guidance/storefront-next/sfnext-theming/SKILL.md +104 -0
- package/content/guidance/storefront-next/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
- package/dist/commands/cap/install.d.ts +1 -0
- package/dist/commands/cap/list.d.ts +1 -0
- package/dist/commands/cap/pull.d.ts +1 -0
- package/dist/commands/cap/tasks.d.ts +1 -0
- package/dist/commands/cap/uninstall.d.ts +1 -0
- package/dist/commands/cip/describe.d.ts +1 -0
- package/dist/commands/cip/query.d.ts +1 -0
- package/dist/commands/cip/report/bot-traffic-share.d.ts +1 -0
- package/dist/commands/cip/report/checkout-funnel-dropoff.d.ts +1 -0
- package/dist/commands/cip/report/controller-error-rate-trend.d.ts +1 -0
- package/dist/commands/cip/report/controller-health-scorecard.d.ts +1 -0
- package/dist/commands/cip/report/customer-registration-trends.d.ts +1 -0
- package/dist/commands/cip/report/discount-depth-breakdown.d.ts +1 -0
- package/dist/commands/cip/report/inventory-stockout-by-location.d.ts +1 -0
- package/dist/commands/cip/report/new-vs-returning-buyer-revenue.d.ts +1 -0
- package/dist/commands/cip/report/ocapi-client-usage.d.ts +1 -0
- package/dist/commands/cip/report/ocapi-requests.d.ts +1 -0
- package/dist/commands/cip/report/payment-method-performance.d.ts +1 -0
- package/dist/commands/cip/report/product-co-purchase-analysis.d.ts +1 -0
- package/dist/commands/cip/report/promotion-discount-analysis.d.ts +1 -0
- package/dist/commands/cip/report/promotion-roi-leaderboard.d.ts +1 -0
- package/dist/commands/cip/report/recommender-effectiveness.d.ts +1 -0
- package/dist/commands/cip/report/remote-include-performance.d.ts +1 -0
- package/dist/commands/cip/report/revenue-by-channel.d.ts +1 -0
- package/dist/commands/cip/report/sales-analytics.d.ts +1 -0
- package/dist/commands/cip/report/sales-summary.d.ts +1 -0
- package/dist/commands/cip/report/scapi-cache-hit-ratio.d.ts +1 -0
- package/dist/commands/cip/report/scapi-error-rate-by-status.d.ts +1 -0
- package/dist/commands/cip/report/scapi-latency-distribution.d.ts +1 -0
- package/dist/commands/cip/report/scapi-traffic-latency.d.ts +1 -0
- package/dist/commands/cip/report/search-query-performance.d.ts +1 -0
- package/dist/commands/cip/report/top-referrers.d.ts +1 -0
- package/dist/commands/cip/report/top-selling-products.d.ts +1 -0
- package/dist/commands/cip/report/zero-result-searches.d.ts +1 -0
- package/dist/commands/cip/tables.d.ts +1 -0
- package/dist/commands/code/activate.d.ts +1 -0
- package/dist/commands/code/delete.d.ts +1 -0
- package/dist/commands/code/deploy.d.ts +1 -0
- package/dist/commands/code/download.d.ts +1 -0
- package/dist/commands/code/watch.d.ts +1 -0
- package/dist/commands/commands/search.d.ts +35 -0
- package/dist/commands/commands/search.js +85 -0
- package/dist/commands/commands/search.js.map +1 -0
- package/dist/commands/content/export.d.ts +1 -0
- package/dist/commands/content/list.d.ts +1 -0
- package/dist/commands/content/validate.d.ts +1 -0
- package/dist/commands/debug/cli.d.ts +1 -0
- package/dist/commands/debug/index.d.ts +1 -0
- package/dist/commands/docs/cache.d.ts +1 -0
- package/dist/commands/docs/download.d.ts +1 -0
- package/dist/commands/docs/read.d.ts +1 -0
- package/dist/commands/docs/schema.d.ts +1 -0
- package/dist/commands/docs/search.d.ts +1 -0
- package/dist/commands/docs/skill.d.ts +41 -0
- package/dist/commands/docs/skill.js +183 -0
- package/dist/commands/docs/skill.js.map +1 -0
- package/dist/commands/ecdn/cache/purge.d.ts +1 -0
- package/dist/commands/ecdn/certificates/add.d.ts +1 -0
- package/dist/commands/ecdn/certificates/delete.d.ts +1 -0
- package/dist/commands/ecdn/certificates/list.d.ts +1 -0
- package/dist/commands/ecdn/certificates/update.d.ts +1 -0
- package/dist/commands/ecdn/certificates/validate.d.ts +1 -0
- package/dist/commands/ecdn/cipher-suites/get.d.ts +1 -0
- package/dist/commands/ecdn/cipher-suites/update.d.ts +1 -0
- package/dist/commands/ecdn/firewall/create.d.ts +1 -0
- package/dist/commands/ecdn/firewall/delete.d.ts +1 -0
- package/dist/commands/ecdn/firewall/get.d.ts +1 -0
- package/dist/commands/ecdn/firewall/list.d.ts +1 -0
- package/dist/commands/ecdn/firewall/reorder.d.ts +1 -0
- package/dist/commands/ecdn/firewall/update.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/create.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/delete.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/get.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/list.d.ts +1 -0
- package/dist/commands/ecdn/logpush/jobs/update.d.ts +1 -0
- package/dist/commands/ecdn/logpush/ownership.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/create.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/delete.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/get.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/rules/delete.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/rules/update.d.ts +1 -0
- package/dist/commands/ecdn/mrt-rules/update.d.ts +1 -0
- package/dist/commands/ecdn/mtls/create.d.ts +1 -0
- package/dist/commands/ecdn/mtls/delete.d.ts +1 -0
- package/dist/commands/ecdn/mtls/get.d.ts +1 -0
- package/dist/commands/ecdn/mtls/issue.d.ts +1 -0
- package/dist/commands/ecdn/mtls/list.d.ts +1 -0
- package/dist/commands/ecdn/mtls/setup.d.ts +1 -0
- package/dist/commands/ecdn/origin-headers/delete.d.ts +1 -0
- package/dist/commands/ecdn/origin-headers/get.d.ts +1 -0
- package/dist/commands/ecdn/origin-headers/set.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/notifications/create.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/notifications/delete.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/notifications/list.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/create.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/delete.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/get.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/list.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/policies/update.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/scripts/get.d.ts +1 -0
- package/dist/commands/ecdn/page-shield/scripts/list.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/create.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/delete.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/get.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/list.d.ts +1 -0
- package/dist/commands/ecdn/rate-limit/update.d.ts +1 -0
- package/dist/commands/ecdn/security/get.d.ts +1 -0
- package/dist/commands/ecdn/security/update.d.ts +1 -0
- package/dist/commands/ecdn/speed/get.d.ts +1 -0
- package/dist/commands/ecdn/speed/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/groups/list.d.ts +1 -0
- package/dist/commands/ecdn/waf/groups/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/managed-rules/list.d.ts +1 -0
- package/dist/commands/ecdn/waf/managed-rules/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/migrate.d.ts +1 -0
- package/dist/commands/ecdn/waf/owasp/get.d.ts +1 -0
- package/dist/commands/ecdn/waf/owasp/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/rules/get.d.ts +1 -0
- package/dist/commands/ecdn/waf/rules/list.d.ts +1 -0
- package/dist/commands/ecdn/waf/rules/update.d.ts +1 -0
- package/dist/commands/ecdn/waf/rulesets/list.d.ts +1 -0
- package/dist/commands/ecdn/waf/rulesets/update.d.ts +1 -0
- package/dist/commands/ecdn/zones/create.d.ts +1 -0
- package/dist/commands/ecdn/zones/list.d.ts +1 -0
- package/dist/commands/job/execution/delete.d.ts +1 -0
- package/dist/commands/job/export.d.ts +1 -0
- package/dist/commands/job/import-set.d.ts +1 -0
- package/dist/commands/job/import.d.ts +1 -0
- package/dist/commands/job/log.d.ts +1 -0
- package/dist/commands/job/run.d.ts +1 -0
- package/dist/commands/job/search.d.ts +1 -0
- package/dist/commands/job/wait.d.ts +1 -0
- package/dist/commands/logs/get.d.ts +1 -0
- package/dist/commands/logs/list.d.ts +1 -0
- package/dist/commands/logs/tail.d.ts +1 -0
- package/dist/commands/metrics/controller.d.ts +1 -0
- package/dist/commands/metrics/ecdn.d.ts +1 -0
- package/dist/commands/metrics/mrt.d.ts +1 -0
- package/dist/commands/metrics/ocapi.d.ts +1 -0
- package/dist/commands/metrics/overall.d.ts +1 -0
- package/dist/commands/metrics/sales.d.ts +1 -0
- package/dist/commands/metrics/scapi-hooks.d.ts +1 -0
- package/dist/commands/metrics/scapi.d.ts +1 -0
- package/dist/commands/metrics/third-party.d.ts +1 -0
- package/dist/commands/mrt/bundle/delete.d.ts +1 -0
- package/dist/commands/mrt/bundle/deploy.d.ts +1 -0
- package/dist/commands/mrt/bundle/download.d.ts +1 -0
- package/dist/commands/mrt/bundle/history.d.ts +1 -0
- package/dist/commands/mrt/bundle/list.d.ts +1 -0
- package/dist/commands/mrt/bundle/save.d.ts +1 -0
- package/dist/commands/mrt/bundle/upload-v2.d.ts +1 -0
- package/dist/commands/mrt/env/access-control/list.d.ts +1 -0
- package/dist/commands/mrt/env/b2c.d.ts +1 -0
- package/dist/commands/mrt/env/clone.d.ts +1 -0
- package/dist/commands/mrt/env/create.d.ts +1 -0
- package/dist/commands/mrt/env/delete.d.ts +1 -0
- package/dist/commands/mrt/env/get.d.ts +1 -0
- package/dist/commands/mrt/env/invalidate.d.ts +1 -0
- package/dist/commands/mrt/env/list.d.ts +1 -0
- package/dist/commands/mrt/env/redirect/clone.d.ts +1 -0
- package/dist/commands/mrt/env/redirect/create.d.ts +1 -0
- package/dist/commands/mrt/env/redirect/delete.d.ts +1 -0
- package/dist/commands/mrt/env/redirect/list.d.ts +1 -0
- package/dist/commands/mrt/env/update.d.ts +1 -0
- package/dist/commands/mrt/env/var/delete.d.ts +1 -0
- package/dist/commands/mrt/env/var/list.d.ts +1 -0
- package/dist/commands/mrt/env/var/push.d.ts +1 -0
- package/dist/commands/mrt/env/var/set.d.ts +1 -0
- package/dist/commands/mrt/org/b2c.d.ts +1 -0
- package/dist/commands/mrt/org/cert/create.d.ts +1 -0
- package/dist/commands/mrt/org/cert/delete.d.ts +1 -0
- package/dist/commands/mrt/org/cert/get.d.ts +1 -0
- package/dist/commands/mrt/org/cert/list.d.ts +1 -0
- package/dist/commands/mrt/org/cert/restart-validation.d.ts +1 -0
- package/dist/commands/mrt/org/list.d.ts +1 -0
- package/dist/commands/mrt/org/member/add.d.ts +1 -0
- package/dist/commands/mrt/org/member/get.d.ts +1 -0
- package/dist/commands/mrt/org/member/list.d.ts +1 -0
- package/dist/commands/mrt/org/member/remove.d.ts +1 -0
- package/dist/commands/mrt/org/member/update.d.ts +1 -0
- package/dist/commands/mrt/project/create.d.ts +1 -0
- package/dist/commands/mrt/project/delete.d.ts +1 -0
- package/dist/commands/mrt/project/get.d.ts +1 -0
- package/dist/commands/mrt/project/list.d.ts +1 -0
- package/dist/commands/mrt/project/member/add.d.ts +1 -0
- package/dist/commands/mrt/project/member/get.d.ts +1 -0
- package/dist/commands/mrt/project/member/list.d.ts +1 -0
- package/dist/commands/mrt/project/member/remove.d.ts +1 -0
- package/dist/commands/mrt/project/member/update.d.ts +1 -0
- package/dist/commands/mrt/project/notification/delete.d.ts +1 -0
- package/dist/commands/mrt/project/notification/get.d.ts +1 -0
- package/dist/commands/mrt/project/update.d.ts +1 -0
- package/dist/commands/mrt/save-credentials.d.ts +1 -0
- package/dist/commands/mrt/tail-logs.d.ts +1 -0
- package/dist/commands/mrt/user/api-key.d.ts +1 -0
- package/dist/commands/mrt/user/email-prefs.d.ts +1 -0
- package/dist/commands/mrt/user/profile.d.ts +1 -0
- package/dist/commands/scaffold/init.js +2 -1
- package/dist/commands/scaffold/init.js.map +1 -1
- package/dist/commands/scapi/custom/status.d.ts +1 -0
- package/dist/commands/scapi/schemas/get.d.ts +1 -0
- package/dist/commands/scapi/schemas/list.d.ts +1 -0
- package/dist/commands/setup/ide/tsserver-plugin.d.ts +1 -0
- package/dist/commands/setup/ide/vscode-types.d.ts +1 -0
- package/dist/commands/setup/index.js +4 -3
- package/dist/commands/setup/index.js.map +1 -1
- package/dist/commands/setup/inspect.d.ts +1 -0
- package/dist/commands/setup/inspect.js +17 -2
- package/dist/commands/setup/inspect.js.map +1 -1
- package/dist/commands/setup/instance/create.d.ts +1 -0
- package/dist/commands/setup/instance/list.d.ts +1 -0
- package/dist/commands/setup/instance/remove.d.ts +1 -0
- package/dist/commands/setup/instance/set-active.d.ts +1 -0
- package/dist/commands/setup/openshell.d.ts +1 -0
- package/dist/commands/setup/skills.d.ts +1 -0
- package/dist/commands/slas/client/create.d.ts +1 -0
- package/dist/commands/slas/client/delete.d.ts +1 -0
- package/dist/commands/slas/client/get.d.ts +1 -0
- package/dist/commands/slas/client/list.d.ts +1 -0
- package/dist/commands/slas/client/open.d.ts +1 -0
- package/dist/commands/slas/client/update.d.ts +1 -0
- package/dist/commands/slas/token.d.ts +1 -0
- package/dist/commands/slas/token.js +2 -1
- package/dist/commands/slas/token.js.map +1 -1
- package/dist/commands/webdav/get.d.ts +1 -0
- package/dist/commands/webdav/rm.d.ts +1 -0
- package/dist/help.d.ts +25 -0
- package/dist/help.js +96 -0
- package/dist/help.js.map +1 -0
- package/dist/lib/scaffold/generate-helper.js +3 -2
- package/dist/lib/scaffold/generate-helper.js.map +1 -1
- package/dist/lib/skills.d.ts +19 -0
- package/dist/lib/skills.js +75 -0
- package/dist/lib/skills.js.map +1 -0
- package/dist/utils/cip/command.d.ts +1 -0
- package/dist/utils/ecdn/zone-command.d.ts +1 -0
- package/dist/utils/slas/client.d.ts +1 -0
- package/oclif.manifest.json +21814 -18473
- package/package.json +11 -5
package/bin/dev.js
CHANGED
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
* For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
import {existsSync, readFileSync} from 'node:fs';
|
|
9
|
+
import {parseEnv} from 'node:util';
|
|
10
|
+
|
|
11
|
+
// The project .env (or --dotenv-file / SFCC_DOTENV_FILE) is loaded by each command
|
|
12
|
+
// before its flags are parsed. Only the telemetry opt-in is read from ./.env here.
|
|
13
|
+
const dotEnv = existsSync('.env') ? parseEnv(readFileSync('.env', 'utf8')) : {};
|
|
14
|
+
const telemetrySetting = (name) => process.env[name] ?? dotEnv[name];
|
|
15
15
|
|
|
16
16
|
// Disable telemetry by default in development when both vars are unset.
|
|
17
17
|
// Set SFCC_DISABLE_TELEMETRY=false (or SF_DISABLE_TELEMETRY=false) in .env to enable COMMAND_START/COMMAND_SUCCESS.
|
|
18
18
|
const userWantsTelemetryEnabled =
|
|
19
|
-
|
|
19
|
+
telemetrySetting('SF_DISABLE_TELEMETRY') === 'false' || telemetrySetting('SFCC_DISABLE_TELEMETRY') === 'false';
|
|
20
20
|
if (userWantsTelemetryEnabled) {
|
|
21
21
|
process.env.SF_DISABLE_TELEMETRY = 'false';
|
|
22
22
|
process.env.SFCC_DISABLE_TELEMETRY = 'false';
|
package/bin/run.js
CHANGED
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
* For full license text, see the license.txt file in the repo root or http://www.apache.org/licenses/LICENSE-2.0
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
// Load .env file if present (Node.js native support)
|
|
9
|
-
try {
|
|
10
|
-
process.loadEnvFile();
|
|
11
|
-
} catch {
|
|
12
|
-
// .env file not found or not readable, continue without it
|
|
13
|
-
}
|
|
14
|
-
|
|
15
8
|
import {execute} from '@oclif/core';
|
|
9
|
+
import {preloadEnvFile} from '@salesforce/b2c-tooling-sdk/config';
|
|
10
|
+
|
|
11
|
+
// Apply the project .env (or --dotenv-file / SFCC_DOTENV_FILE) before oclif starts so
|
|
12
|
+
// hooks and plugins see it. Shell variables are never overridden.
|
|
13
|
+
preloadEnvFile();
|
|
16
14
|
|
|
17
15
|
await execute({dir: import.meta.url});
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: b2c-business-manager-extensions
|
|
3
|
+
description: Build Business Manager extension cartridges with custom admin tools, menu items, and dialog actions. Use this skill whenever the user needs to create bm_* cartridges, add menu actions or dialog buttons in BM, configure bm_extensions.xml, or extend admin pages with form overlays. Also use when customizing the BM interface for back-office workflows -- even if they just say 'add a button to BM' or 'custom admin page'.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Business Manager Extensions Skill
|
|
7
|
+
|
|
8
|
+
This skill guides you through creating Business Manager (BM) extension cartridges to customize the admin interface.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
BM extensions add custom functionality to Business Manager through a single `bm_extensions.xml` descriptor plus a controller that renders ISML pages:
|
|
13
|
+
|
|
14
|
+
| Extension Type | Purpose |
|
|
15
|
+
|----------------|---------|
|
|
16
|
+
| **Menu Items** | Add a navigation section (a container in the Admin or a site's menu) |
|
|
17
|
+
| **Menu Actions** | Add a functional link/page under a menu item — wired to a controller node |
|
|
18
|
+
| **Dialog Actions** | Add buttons to existing BM pages at defined extension points |
|
|
19
|
+
| **Form Extensions** | Add fields to existing BM search forms (order/customer search) |
|
|
20
|
+
|
|
21
|
+
## ⚠️ Schema essentials (read first)
|
|
22
|
+
|
|
23
|
+
These are the most common mistakes. The descriptor uses the **`bmmodules/2007-12-11`** schema (`bmext.xsd`), not the `extensibility/*` namespace.
|
|
24
|
+
|
|
25
|
+
- **Namespace** is `http://www.demandware.com/xml/bmmodules/2007-12-11`.
|
|
26
|
+
- `name`, `short_description`, and `description` are **child elements** with a required `xml:lang` attribute — NOT attributes and NOT resource keys. Localize by repeating the element per language. There is no `name="..."` attribute.
|
|
27
|
+
- `<icon>` is a plain string **element** holding a path (`<icon>icons/q.png</icon>`), NOT `<icon path="..."/>`.
|
|
28
|
+
- `position` is ascending: **lower numbers appear higher** in the menu. Core BM items run 2000–12000, so custom items typically use a large number (e.g. `99999`) to sit at the bottom, or `-1` to float a "Home" action to the top.
|
|
29
|
+
- The dialog-action extension-point attribute is **`xp_ref`** (underscore), and dialog actions link to a menu action via a child `<menuactions><menuaction-ref action-id="..."/></menuactions>` element — there is no `menuaction-ref` attribute.
|
|
30
|
+
- Use the file encoding `ISO-8859-1` to match platform samples.
|
|
31
|
+
|
|
32
|
+
To confirm any detail against the authoritative schema:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
b2c docs schema bmext
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## File Structure
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
/bm_my_extension
|
|
42
|
+
/cartridge
|
|
43
|
+
bm_extensions.xml # Extension definitions (required)
|
|
44
|
+
bm_my_extension.properties # Cartridge properties (required)
|
|
45
|
+
/controllers
|
|
46
|
+
MyExtension.js # Controller for menu actions
|
|
47
|
+
/templates
|
|
48
|
+
/default
|
|
49
|
+
/extensions
|
|
50
|
+
mypage.isml # Custom BM pages
|
|
51
|
+
/static
|
|
52
|
+
/default
|
|
53
|
+
/icons
|
|
54
|
+
my-icon.png # Menu icons
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`bm_my_extension.properties` is a standard cartridge marker file:
|
|
58
|
+
|
|
59
|
+
```properties
|
|
60
|
+
## cartridge.properties for cartridge bm_my_extension
|
|
61
|
+
demandware.cartridges.bm_my_extension.multipleLanguageStorefront=true
|
|
62
|
+
demandware.cartridges.bm_my_extension.id=bm_my_extension
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Basic bm_extensions.xml
|
|
66
|
+
|
|
67
|
+
```xml
|
|
68
|
+
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
|
69
|
+
<extensions xmlns="http://www.demandware.com/xml/bmmodules/2007-12-11"
|
|
70
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
71
|
+
xsi:schemaLocation="http://www.demandware.com/xml/bmmodules/2007-12-11 bmext.xsd">
|
|
72
|
+
|
|
73
|
+
<!-- Menu Item: a container in the Administration menu (site="false") -->
|
|
74
|
+
<menuitem id="acme_id01" position="99999" site="false">
|
|
75
|
+
<name xml:lang="x-default">ACME Tools</name>
|
|
76
|
+
<short_description xml:lang="x-default">ACME admin tools</short_description>
|
|
77
|
+
<description xml:lang="x-default">Tools and utilities from the ACME team</description>
|
|
78
|
+
<icon>icons/acme.png</icon>
|
|
79
|
+
</menuitem>
|
|
80
|
+
|
|
81
|
+
<!-- Menu Action: a page under the menu item, wired to a controller node.
|
|
82
|
+
position="-1" floats it to the top of the section. -->
|
|
83
|
+
<menuaction id="acme-home" menupath="acme_id01" position="-1" site="false">
|
|
84
|
+
<name xml:lang="x-default">Home</name>
|
|
85
|
+
<short_description xml:lang="x-default">ACME Home</short_description>
|
|
86
|
+
<exec pipeline="ACME" node="Start"/>
|
|
87
|
+
<sub-pipelines>
|
|
88
|
+
<pipeline name="ACME-Start"/>
|
|
89
|
+
</sub-pipelines>
|
|
90
|
+
<icon>icons/acme.png</icon>
|
|
91
|
+
</menuaction>
|
|
92
|
+
</extensions>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`pipeline="ACME"` resolves to the controller `ACME.js`; `node="Start"` resolves to its exported `Start` function (which must be marked `Start.public = true`).
|
|
96
|
+
|
|
97
|
+
## Menu Items
|
|
98
|
+
|
|
99
|
+
Top-level navigation containers. `site="false"` places the item in the **Administration** menu; `site="true"` (the default) places it in a **site** menu.
|
|
100
|
+
|
|
101
|
+
```xml
|
|
102
|
+
<menuitem id="acme_id01" position="99999" site="false">
|
|
103
|
+
<name xml:lang="x-default">ACME Tools</name>
|
|
104
|
+
<name xml:lang="de">ACME Werkzeuge</name>
|
|
105
|
+
<short_description xml:lang="x-default">ACME admin tools</short_description>
|
|
106
|
+
<icon>icons/acme.png</icon>
|
|
107
|
+
</menuitem>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
| Attribute | Required | Default | Description |
|
|
111
|
+
|-----------|----------|---------|-------------|
|
|
112
|
+
| `id` | Yes | - | Unique identifier. Prefix to avoid collisions with core BM IDs. |
|
|
113
|
+
| `site` | No | `true` | `true` = site menu, `false` = Administration menu |
|
|
114
|
+
| `position` | No | - | Sort order — **lower = higher**. Use a large value to sit at the bottom. |
|
|
115
|
+
| `type` | No | `BM` | `BM` or `CSC` (Customer Service Center) |
|
|
116
|
+
|
|
117
|
+
Child elements: `name` (required, localized), `short_description`, `description` (localized), `icon` (string path), `sldsIconName` (an SLDS utility icon name, preferred in the modern BM UI), `exec`.
|
|
118
|
+
|
|
119
|
+
## Menu Actions
|
|
120
|
+
|
|
121
|
+
Functional pages under a menu item. Wire each to a controller node via `<exec>` and register every controller node it uses in `<sub-pipelines>`.
|
|
122
|
+
|
|
123
|
+
```xml
|
|
124
|
+
<menuaction id="acme-export" menupath="acme_id01" position="20" site="false">
|
|
125
|
+
<name xml:lang="x-default">Product Export</name>
|
|
126
|
+
<short_description xml:lang="x-default">Export products to CSV</short_description>
|
|
127
|
+
<exec pipeline="ACME" node="Export"/>
|
|
128
|
+
<sub-pipelines>
|
|
129
|
+
<pipeline name="ACME-Export"/>
|
|
130
|
+
<pipeline name="ACME-Download"/>
|
|
131
|
+
</sub-pipelines>
|
|
132
|
+
<parameters>
|
|
133
|
+
<parameter name="defaultFormat" value="csv"/>
|
|
134
|
+
</parameters>
|
|
135
|
+
<icon>icons/export.png</icon>
|
|
136
|
+
</menuaction>
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
| Attribute | Required | Default | Description |
|
|
140
|
+
|-----------|----------|---------|-------------|
|
|
141
|
+
| `id` | Yes | - | Unique identifier |
|
|
142
|
+
| `menupath` | No | - | Parent menu item `id` (or a core BM menu/item `id` to attach to it) |
|
|
143
|
+
| `site` | No | `true` | Must match the parent menu item |
|
|
144
|
+
| `position` | No | - | Sort order (lower = higher; `-1` floats to top) |
|
|
145
|
+
| `extern` | No | `false` | `true` opens the action in a new window |
|
|
146
|
+
|
|
147
|
+
Key child elements: `name` (required), `short_description`, `description`, `extended_description`, `exec`, `sub-pipelines`, `parameters`, `icon`.
|
|
148
|
+
|
|
149
|
+
> **Note:** `<exec>` takes only `pipeline` and `node` (both required) — there is no `https` attribute. The `apis`, `scapis`, and `required-features` elements in the schema are **not supported for custom menu actions**.
|
|
150
|
+
|
|
151
|
+
### The `NoPermissionCheck` idiom
|
|
152
|
+
|
|
153
|
+
BM checks that the logged-in user has permission for the menu action whose `sub-pipelines` register the requested controller node. For endpoints that must work **without** a module permission check — keepalive pings, service workers, polling/AJAX endpoints called by your page's JavaScript — register their nodes under a dedicated action with the reserved id `NoPermissionCheck` and **no `<exec>`**:
|
|
154
|
+
|
|
155
|
+
```xml
|
|
156
|
+
<menuaction id="NoPermissionCheck" site="false">
|
|
157
|
+
<name xml:lang="x-default">Dummy</name>
|
|
158
|
+
<short_description xml:lang="x-default">Holds pipelines that do not require a permission check</short_description>
|
|
159
|
+
<sub-pipelines>
|
|
160
|
+
<pipeline name="ACME-Keepalive"/>
|
|
161
|
+
<pipeline name="ACME-ServiceWorker"/>
|
|
162
|
+
<pipeline name="ACME-Poll"/>
|
|
163
|
+
</sub-pipelines>
|
|
164
|
+
</menuaction>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Without this, those nodes 403 for users who haven't been granted the module. Only register nodes here that are genuinely safe to expose to any authenticated BM user.
|
|
168
|
+
|
|
169
|
+
## Dialog Actions
|
|
170
|
+
|
|
171
|
+
Add buttons to existing BM pages at a named extension point (`xp_ref`).
|
|
172
|
+
|
|
173
|
+
```xml
|
|
174
|
+
<dialogaction id="acme-order-sync" xp_ref="OrderPage-OrderDetails" position="100">
|
|
175
|
+
<name xml:lang="x-default">Sync Order</name>
|
|
176
|
+
<exec pipeline="ACME" node="OrderSync"/>
|
|
177
|
+
<parameters>
|
|
178
|
+
<parameter name="OrderNo"/>
|
|
179
|
+
</parameters>
|
|
180
|
+
<menuactions>
|
|
181
|
+
<menuaction-ref action-id="acme-home"/>
|
|
182
|
+
</menuactions>
|
|
183
|
+
</dialogaction>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
| Attribute | Required | Default | Description |
|
|
187
|
+
|-----------|----------|---------|-------------|
|
|
188
|
+
| `id` | Yes | - | Unique identifier |
|
|
189
|
+
| `xp_ref` | Yes | - | Extension point ID (note the underscore) |
|
|
190
|
+
| `position` | No | - | Sort order |
|
|
191
|
+
| `class` | No | - | Optional CSS class |
|
|
192
|
+
| `extern` | No | `false` | `true` opens in a new window |
|
|
193
|
+
|
|
194
|
+
Child elements: `name` (optional, localized), `exec` (**required**), `parameters`, `menuactions` (one or more `<menuaction-ref action-id="..."/>` linking to the menu action that owns the permission check). Dialog actions do **not** take an `icon` child.
|
|
195
|
+
|
|
196
|
+
Common extension points: `OrderPage-OrderDetails`, `ProductPage-General`, `ProductPage-Images`, `CustomerPage-Profile`, `ContentPage-General`, `CatalogPage-CategoryGeneral`.
|
|
197
|
+
|
|
198
|
+
## Form Extensions
|
|
199
|
+
|
|
200
|
+
Add fields to existing BM search forms (e.g. order or customer search).
|
|
201
|
+
|
|
202
|
+
```xml
|
|
203
|
+
<formextension id="order-search">
|
|
204
|
+
<valueinput type="string" name="invoiceNumber">
|
|
205
|
+
<label xml:lang="x-default">Invoice Number</label>
|
|
206
|
+
<label xml:lang="de">Rechnungsnummer</label>
|
|
207
|
+
</valueinput>
|
|
208
|
+
<valueinput type="string" name="syncStatus" defaultvalue="">
|
|
209
|
+
<label xml:lang="x-default">Sync Status</label>
|
|
210
|
+
<option>All</option>
|
|
211
|
+
<option>Synced</option>
|
|
212
|
+
<option>Pending</option>
|
|
213
|
+
<option>Failed</option>
|
|
214
|
+
</valueinput>
|
|
215
|
+
<valueinput type="int" name="minQuantity">
|
|
216
|
+
<label xml:lang="x-default">Minimum Quantity</label>
|
|
217
|
+
</valueinput>
|
|
218
|
+
</formextension>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
`id` matches the target form (e.g. `order-search`, `customer-search`). `valueinput` requires `type` (`string`, `int`, or `double`) and `name`; `defaultvalue` is optional. Each `valueinput` has localized `<label>` children and optional `<option>` children for dropdowns.
|
|
222
|
+
|
|
223
|
+
## Controller Example
|
|
224
|
+
|
|
225
|
+
Controllers live in `controllers/` and export functions marked `.public = true`. Use `*/cartridge/...` requires so logic can be shared, and gate page nodes on the BM session.
|
|
226
|
+
|
|
227
|
+
```javascript
|
|
228
|
+
'use strict';
|
|
229
|
+
|
|
230
|
+
var ISML = require('dw/template/ISML');
|
|
231
|
+
var URLUtils = require('dw/web/URLUtils');
|
|
232
|
+
var Logger = require('dw/system/Logger');
|
|
233
|
+
|
|
234
|
+
var log = Logger.getLogger('bm', 'ACME');
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Render the dashboard. Wired to <exec pipeline="ACME" node="Start"/>.
|
|
238
|
+
*/
|
|
239
|
+
function Start() {
|
|
240
|
+
// BM nodes should only be reachable in an authenticated BM session
|
|
241
|
+
if (!session.userAuthenticated) {
|
|
242
|
+
response.setStatus(403);
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
ISML.renderTemplate('extensions/acme/dashboard', {
|
|
247
|
+
stats: getStats()
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
Start.public = true;
|
|
251
|
+
module.exports.Start = Start;
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Process an action, then redirect back to the dashboard.
|
|
255
|
+
*/
|
|
256
|
+
function Process() {
|
|
257
|
+
var action = request.httpParameterMap.action.stringValue;
|
|
258
|
+
try {
|
|
259
|
+
performAction(action);
|
|
260
|
+
response.redirect(URLUtils.url('ACME-Start', 'message', 'Done'));
|
|
261
|
+
} catch (e) {
|
|
262
|
+
log.error('Action failed: {0}', e.message);
|
|
263
|
+
response.redirect(URLUtils.url('ACME-Start', 'error', e.message));
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
Process.public = true;
|
|
267
|
+
module.exports.Process = Process;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Lightweight endpoint called by page JS — registered under NoPermissionCheck.
|
|
271
|
+
*/
|
|
272
|
+
function Keepalive() {
|
|
273
|
+
response.setContentType('application/json');
|
|
274
|
+
response.writer.print('{"ok":true}');
|
|
275
|
+
}
|
|
276
|
+
Keepalive.public = true;
|
|
277
|
+
module.exports.Keepalive = Keepalive;
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Every node referenced by `<exec>` or `<sub-pipelines>` must be exported and `.public = true`, or BM returns 403.
|
|
281
|
+
|
|
282
|
+
## Template Example
|
|
283
|
+
|
|
284
|
+
BM templates render under `templates/default/extensions/`. Reference the `node` via `URLUtils.url('Controller-Node', ...)`.
|
|
285
|
+
|
|
286
|
+
```html
|
|
287
|
+
<isdecorate template="application/MenuFrame">
|
|
288
|
+
<isinclude template="inc/Modules"/>
|
|
289
|
+
<div class="acme-dashboard">
|
|
290
|
+
<h1>ACME Dashboard</h1>
|
|
291
|
+
|
|
292
|
+
<isif condition="${request.httpParameterMap.message.submitted}">
|
|
293
|
+
<div class="success">${request.httpParameterMap.message.stringValue}</div>
|
|
294
|
+
</isif>
|
|
295
|
+
|
|
296
|
+
<table class="data">
|
|
297
|
+
<thead><tr><th>Metric</th><th>Value</th></tr></thead>
|
|
298
|
+
<tbody>
|
|
299
|
+
<isloop items="${pdict.stats}" var="stat">
|
|
300
|
+
<tr><td>${stat.label}</td><td>${stat.value}</td></tr>
|
|
301
|
+
</isloop>
|
|
302
|
+
</tbody>
|
|
303
|
+
</table>
|
|
304
|
+
|
|
305
|
+
<a href="${URLUtils.url('ACME-Process', 'action', 'refresh')}" class="button">
|
|
306
|
+
Refresh
|
|
307
|
+
</a>
|
|
308
|
+
</div>
|
|
309
|
+
</isdecorate>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Decorating with `application/MenuFrame` (and including `inc/Modules`) gives the page the standard BM chrome. A plain HTML document also works if you want a fully custom page (the modern qlabs-style approach mounts a single-page app into a container template).
|
|
313
|
+
|
|
314
|
+
## Attaching to Existing BM Menus
|
|
315
|
+
|
|
316
|
+
Instead of a new menu item, point a menu action's `menupath` at a core BM menu id. The full list of core ids is in the reference; the most useful:
|
|
317
|
+
|
|
318
|
+
| Menu | `id` | `site` |
|
|
319
|
+
|------|------|--------|
|
|
320
|
+
| Site Preferences | `site-prefs` | `true` |
|
|
321
|
+
| Merchant Tools › Products and Catalogs | `prod-cat` | `true` |
|
|
322
|
+
| Merchant Tools › Ordering | `orders` | `true` |
|
|
323
|
+
| Administration › Operations | `operations` | `false` |
|
|
324
|
+
| Administration › Site Development | `studio` | `false` |
|
|
325
|
+
| Administration › Global Preferences | `global-prefs` | `false` |
|
|
326
|
+
|
|
327
|
+
```xml
|
|
328
|
+
<menuaction id="acme-pref" menupath="site-prefs" position="2000" site="true">
|
|
329
|
+
<name xml:lang="x-default">ACME Preferences</name>
|
|
330
|
+
<exec pipeline="ACME" node="Preferences"/>
|
|
331
|
+
<sub-pipelines>
|
|
332
|
+
<pipeline name="ACME-Preferences"/>
|
|
333
|
+
</sub-pipelines>
|
|
334
|
+
</menuaction>
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
> Reusing a **core BM `id`** for your own `menuitem`/`menuaction` hides your extension. Always use unique, prefixed ids and only reference core ids via `menupath`.
|
|
338
|
+
|
|
339
|
+
## Enabling the Extension
|
|
340
|
+
|
|
341
|
+
1. Add the cartridge to the **Business Manager site's** cartridge path:
|
|
342
|
+
- Administration › Sites › Manage Sites › Business Manager › Settings
|
|
343
|
+
- Add the cartridge id (e.g. `bm_my_extension`) to the cartridge path.
|
|
344
|
+
2. Grant the module to roles:
|
|
345
|
+
- Administration › Organization › Roles › *(role)* › Business Manager Modules
|
|
346
|
+
- Enable the custom module (it appears once the extension is on the path).
|
|
347
|
+
- Nodes registered under `NoPermissionCheck` are reachable without this grant.
|
|
348
|
+
|
|
349
|
+
## Best Practices
|
|
350
|
+
|
|
351
|
+
1. **Validate against the XSD** with `b2c docs schema bmext` whenever unsure.
|
|
352
|
+
2. **Prefix all ids** to avoid colliding with (and accidentally hiding behind) core BM ids.
|
|
353
|
+
3. **Register every node** a page uses in `sub-pipelines`, or it 403s.
|
|
354
|
+
4. **Use `NoPermissionCheck`** only for endpoints that are safe for any authenticated BM user (keepalive, service workers, polling).
|
|
355
|
+
5. **Keep BM cartridges separate** from storefront cartridges.
|
|
356
|
+
6. **Gate page nodes** on `session.userAuthenticated`.
|
|
357
|
+
7. **Test with a non-admin role** to confirm your permission boundaries.
|
|
358
|
+
|
|
359
|
+
## Detailed Reference
|
|
360
|
+
|
|
361
|
+
- [Extensions XML Reference](references/EXTENSIONS-XML.md) — complete schema, every element/attribute, the `NoPermissionCheck` pattern, and the full core BM menu-id table.
|