@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
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: b2c-metadata
|
|
3
|
+
description: Define custom attributes, custom object types, and site preferences for B2C Commerce using metadata XML. Use this skill whenever the user needs to add a field to products, orders, or customers, create a new custom object type, set up site preferences, or extend the B2C data model. Also use when they ask about system-objecttype-extensions.xml, custom-objecttype-definitions.xml, attribute groups in Business Manager, or data model definitions — even if they just say "add a field to products" or "I need a new object type".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Metadata Skill
|
|
7
|
+
|
|
8
|
+
This skill guides you through working with site metadata XML for Salesforce B2C Commerce, including custom attributes, custom objects, and site preferences.
|
|
9
|
+
|
|
10
|
+
## Scope & grounding
|
|
11
|
+
|
|
12
|
+
This skill covers B2C Commerce metadata XML system (metadata.xsd namespace http://www.demandware.com/xml/impex/metadata/2006-10-31), including system-objecttype-extensions.xml, custom-objecttype-definitions.xml, and preferences.xml file structures. The examples show attribute types, enum value patterns, and Script API custom attribute access via dw.system.Site and ExtensibleObject.custom. Before answering questions that name specific B2C versions, XSD schema constraints, or emitting code the user will run, confirm current API shape and schema rules via `b2c docs search` and `b2c docs read` (CLI) or docs_search/docs_read (MCP). The canonical B2C Commerce documentation is the grounding source for metadata schema evolution, Script API signatures, and platform object types.
|
|
13
|
+
|
|
14
|
+
**Canonical docs:**
|
|
15
|
+
- `metadata` - metadata XML schema and structure
|
|
16
|
+
- `dw.system.Site` - Script API for site preferences
|
|
17
|
+
- `dw.system.SitePreferences` - Script API for site preferences access
|
|
18
|
+
- `dw.object.CustomAttributes` - Script API for custom attribute access
|
|
19
|
+
- `b2c-commerce/b2c-create-impex-folder-structure-ds` - site archive folder structure
|
|
20
|
+
- `b2c-commerce/b2c-exporting-active-data` - export guide
|
|
21
|
+
- `b2c-commerce/creatingcustombusinessobjectswithdemandwarebusinessmanager` - custom object creation
|
|
22
|
+
- `b2c-commerce/b2c-business-manager-extension-points` - Business Manager extension points
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
Metadata defines the structure of your B2C Commerce data:
|
|
27
|
+
|
|
28
|
+
| Metadata Type | Purpose |
|
|
29
|
+
|---------------|---------|
|
|
30
|
+
| **System Object Extensions** | Add custom attributes to Products, Orders, Customers, etc. |
|
|
31
|
+
| **Custom Objects** | Define entirely new data types |
|
|
32
|
+
| **Site Preferences** | Site-specific configuration values |
|
|
33
|
+
|
|
34
|
+
## Site Archive Structure
|
|
35
|
+
|
|
36
|
+
Metadata is organized in site archives:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
/site-archive
|
|
40
|
+
/meta
|
|
41
|
+
system-objecttype-extensions.xml # Custom attributes on system objects
|
|
42
|
+
custom-objecttype-definitions.xml # Custom object definitions
|
|
43
|
+
/sites
|
|
44
|
+
/MySite
|
|
45
|
+
preferences.xml # Site preferences
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## System Object Extensions
|
|
49
|
+
|
|
50
|
+
Add custom attributes to existing system objects.
|
|
51
|
+
|
|
52
|
+
### Basic Structure
|
|
53
|
+
|
|
54
|
+
```xml
|
|
55
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
56
|
+
<metadata xmlns="http://www.demandware.com/xml/impex/metadata/2006-10-31">
|
|
57
|
+
<type-extension type-id="Product">
|
|
58
|
+
<custom-attribute-definitions>
|
|
59
|
+
<attribute-definition attribute-id="myCustomAttribute">
|
|
60
|
+
<display-name xml:lang="x-default">My Custom Attribute</display-name>
|
|
61
|
+
<type>string</type>
|
|
62
|
+
<mandatory-flag>false</mandatory-flag>
|
|
63
|
+
<externally-managed-flag>false</externally-managed-flag>
|
|
64
|
+
</attribute-definition>
|
|
65
|
+
</custom-attribute-definitions>
|
|
66
|
+
<group-definitions>
|
|
67
|
+
<attribute-group group-id="MyCustomGroup">
|
|
68
|
+
<display-name xml:lang="x-default">My Custom Group</display-name>
|
|
69
|
+
<attribute attribute-id="myCustomAttribute"/>
|
|
70
|
+
</attribute-group>
|
|
71
|
+
</group-definitions>
|
|
72
|
+
</type-extension>
|
|
73
|
+
</metadata>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Common System Objects
|
|
77
|
+
|
|
78
|
+
> Illustrative list; confirm current platform object types with `b2c docs read b2c-commerce/creatingcustombusinessobjectswithdemandwarebusinessmanager` and Business Manager object reference.
|
|
79
|
+
|
|
80
|
+
| Object Type | Use Case |
|
|
81
|
+
|-------------|----------|
|
|
82
|
+
| `Product` | Product attributes |
|
|
83
|
+
| `Order` | Order metadata |
|
|
84
|
+
| `Profile` | Customer profile data |
|
|
85
|
+
| `Basket` | Cart data |
|
|
86
|
+
| `SitePreferences` | Site configuration |
|
|
87
|
+
| `Category` | Category attributes |
|
|
88
|
+
| `Content` | Content asset attributes |
|
|
89
|
+
|
|
90
|
+
See [System Objects Reference](references/SYSTEM-OBJECTS.md) for more types. The full set of extensible system objects is defined by the B2C platform — check Business Manager and official docs for version-specific availability.
|
|
91
|
+
|
|
92
|
+
### Attribute Types
|
|
93
|
+
|
|
94
|
+
> Per metadata.xsd simpleType.AttributeType — confirm current schema with `b2c docs schema metadata`.
|
|
95
|
+
|
|
96
|
+
| Type | Description | Example |
|
|
97
|
+
|------|-------------|---------|
|
|
98
|
+
| `string` | Text (max 4000 chars) | SKU, descriptions |
|
|
99
|
+
| `text` | Long text (unlimited) | Rich content |
|
|
100
|
+
| `int` | Integer | Quantity, rank |
|
|
101
|
+
| `double` | Decimal | Percentage, weight |
|
|
102
|
+
| `boolean` | true/false | Flags |
|
|
103
|
+
| `date` | Date only | Birth date |
|
|
104
|
+
| `datetime` | Date and time | Timestamps |
|
|
105
|
+
| `email` | Email address | Contact email |
|
|
106
|
+
| `password` | Encrypted | API keys |
|
|
107
|
+
| `html` | HTML content | Rich text |
|
|
108
|
+
| `enum-of-string` | Single select | Status |
|
|
109
|
+
| `enum-of-int` | Numeric enum | Priority level |
|
|
110
|
+
| `set-of-string` | Multi-select | Tags |
|
|
111
|
+
| `set-of-int` | Numeric multi-select | Categories |
|
|
112
|
+
| `image` | Image reference | Thumbnails |
|
|
113
|
+
|
|
114
|
+
### Enum Value Definitions
|
|
115
|
+
|
|
116
|
+
> Illustrative of enum structure; confirm current schema ordering constraints with `b2c docs schema metadata`.
|
|
117
|
+
|
|
118
|
+
Enum types (`enum-of-string`, `enum-of-int`, `set-of-string`, `set-of-int`) require `value-definitions` with **display/value pairs**:
|
|
119
|
+
|
|
120
|
+
> **Element order matters.** The metadata.xsd schema requires `<display>` before `<value>` in each `<value-definition>` — see `b2c docs schema metadata` for current schema constraints.
|
|
121
|
+
|
|
122
|
+
```xml
|
|
123
|
+
<attribute-definition attribute-id="warrantyType">
|
|
124
|
+
<display-name xml:lang="x-default">Warranty Type</display-name>
|
|
125
|
+
<type>enum-of-string</type>
|
|
126
|
+
<mandatory-flag>false</mandatory-flag>
|
|
127
|
+
<value-definitions>
|
|
128
|
+
<value-definition>
|
|
129
|
+
<display xml:lang="x-default">No Warranty</display>
|
|
130
|
+
<value>none</value>
|
|
131
|
+
</value-definition>
|
|
132
|
+
<value-definition>
|
|
133
|
+
<display xml:lang="x-default">Limited Warranty</display>
|
|
134
|
+
<value>limited</value>
|
|
135
|
+
</value-definition>
|
|
136
|
+
<value-definition>
|
|
137
|
+
<display xml:lang="x-default">Full Warranty</display>
|
|
138
|
+
<value>full</value>
|
|
139
|
+
</value-definition>
|
|
140
|
+
</value-definitions>
|
|
141
|
+
</attribute-definition>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
| Element | Purpose |
|
|
145
|
+
|---------|---------|
|
|
146
|
+
| `<display>` | Human-readable label shown in Business Manager (must appear first) |
|
|
147
|
+
| `<value>` | The stored/API value (use lowercase, no spaces) |
|
|
148
|
+
|
|
149
|
+
## Product Custom Attribute Example
|
|
150
|
+
|
|
151
|
+
```xml
|
|
152
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
153
|
+
<metadata xmlns="http://www.demandware.com/xml/impex/metadata/2006-10-31">
|
|
154
|
+
<type-extension type-id="Product">
|
|
155
|
+
<custom-attribute-definitions>
|
|
156
|
+
<!-- Simple string attribute -->
|
|
157
|
+
<attribute-definition attribute-id="vendorSKU">
|
|
158
|
+
<display-name xml:lang="x-default">Vendor SKU</display-name>
|
|
159
|
+
<type>string</type>
|
|
160
|
+
<mandatory-flag>false</mandatory-flag>
|
|
161
|
+
<externally-managed-flag>true</externally-managed-flag>
|
|
162
|
+
</attribute-definition>
|
|
163
|
+
|
|
164
|
+
<!-- Enum (dropdown) attribute -->
|
|
165
|
+
<attribute-definition attribute-id="productCondition">
|
|
166
|
+
<display-name xml:lang="x-default">Product Condition</display-name>
|
|
167
|
+
<type>enum-of-string</type>
|
|
168
|
+
<mandatory-flag>false</mandatory-flag>
|
|
169
|
+
<value-definitions>
|
|
170
|
+
<value-definition>
|
|
171
|
+
<display xml:lang="x-default">New</display>
|
|
172
|
+
<value>new</value>
|
|
173
|
+
</value-definition>
|
|
174
|
+
<value-definition>
|
|
175
|
+
<display xml:lang="x-default">Refurbished</display>
|
|
176
|
+
<value>refurbished</value>
|
|
177
|
+
</value-definition>
|
|
178
|
+
<value-definition>
|
|
179
|
+
<display xml:lang="x-default">Used</display>
|
|
180
|
+
<value>used</value>
|
|
181
|
+
</value-definition>
|
|
182
|
+
</value-definitions>
|
|
183
|
+
</attribute-definition>
|
|
184
|
+
|
|
185
|
+
<!-- Boolean attribute -->
|
|
186
|
+
<attribute-definition attribute-id="isHazardous">
|
|
187
|
+
<display-name xml:lang="x-default">Hazardous Material</display-name>
|
|
188
|
+
<type>boolean</type>
|
|
189
|
+
<mandatory-flag>false</mandatory-flag>
|
|
190
|
+
<default-value>false</default-value>
|
|
191
|
+
</attribute-definition>
|
|
192
|
+
|
|
193
|
+
<!-- Multi-select attribute -->
|
|
194
|
+
<attribute-definition attribute-id="productFeatures">
|
|
195
|
+
<display-name xml:lang="x-default">Product Features</display-name>
|
|
196
|
+
<type>set-of-string</type>
|
|
197
|
+
<mandatory-flag>false</mandatory-flag>
|
|
198
|
+
<value-definitions>
|
|
199
|
+
<value-definition>
|
|
200
|
+
<display xml:lang="x-default">Waterproof</display>
|
|
201
|
+
<value>waterproof</value>
|
|
202
|
+
</value-definition>
|
|
203
|
+
<value-definition>
|
|
204
|
+
<display xml:lang="x-default">Recyclable</display>
|
|
205
|
+
<value>recyclable</value>
|
|
206
|
+
</value-definition>
|
|
207
|
+
</value-definitions>
|
|
208
|
+
</attribute-definition>
|
|
209
|
+
</custom-attribute-definitions>
|
|
210
|
+
|
|
211
|
+
<group-definitions>
|
|
212
|
+
<attribute-group group-id="CustomProductInfo">
|
|
213
|
+
<display-name xml:lang="x-default">Custom Product Information</display-name>
|
|
214
|
+
<attribute attribute-id="vendorSKU"/>
|
|
215
|
+
<attribute attribute-id="productCondition"/>
|
|
216
|
+
<attribute attribute-id="isHazardous"/>
|
|
217
|
+
<attribute attribute-id="productFeatures"/>
|
|
218
|
+
</attribute-group>
|
|
219
|
+
</group-definitions>
|
|
220
|
+
</type-extension>
|
|
221
|
+
</metadata>
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Custom Object Definitions
|
|
225
|
+
|
|
226
|
+
Create entirely new data types.
|
|
227
|
+
|
|
228
|
+
```xml
|
|
229
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
230
|
+
<metadata xmlns="http://www.demandware.com/xml/impex/metadata/2006-10-31">
|
|
231
|
+
<custom-type type-id="StoreLocations">
|
|
232
|
+
<display-name xml:lang="x-default">Store Locations</display-name>
|
|
233
|
+
<description xml:lang="x-default">Physical store information</description>
|
|
234
|
+
<staging-mode>source-to-target</staging-mode>
|
|
235
|
+
<storage-scope>site</storage-scope>
|
|
236
|
+
<key-definition attribute-id="storeId">
|
|
237
|
+
<display-name xml:lang="x-default">Store ID</display-name>
|
|
238
|
+
<type>string</type>
|
|
239
|
+
<min-length>1</min-length>
|
|
240
|
+
</key-definition>
|
|
241
|
+
<attribute-definitions>
|
|
242
|
+
<attribute-definition attribute-id="storeName">
|
|
243
|
+
<display-name xml:lang="x-default">Store Name</display-name>
|
|
244
|
+
<type>string</type>
|
|
245
|
+
<mandatory-flag>true</mandatory-flag>
|
|
246
|
+
</attribute-definition>
|
|
247
|
+
<attribute-definition attribute-id="latitude">
|
|
248
|
+
<display-name xml:lang="x-default">Latitude</display-name>
|
|
249
|
+
<type>double</type>
|
|
250
|
+
</attribute-definition>
|
|
251
|
+
<attribute-definition attribute-id="longitude">
|
|
252
|
+
<display-name xml:lang="x-default">Longitude</display-name>
|
|
253
|
+
<type>double</type>
|
|
254
|
+
</attribute-definition>
|
|
255
|
+
<attribute-definition attribute-id="phone">
|
|
256
|
+
<display-name xml:lang="x-default">Phone</display-name>
|
|
257
|
+
<type>string</type>
|
|
258
|
+
</attribute-definition>
|
|
259
|
+
<attribute-definition attribute-id="isActive">
|
|
260
|
+
<display-name xml:lang="x-default">Active</display-name>
|
|
261
|
+
<type>boolean</type>
|
|
262
|
+
<default-value>true</default-value>
|
|
263
|
+
</attribute-definition>
|
|
264
|
+
</attribute-definitions>
|
|
265
|
+
<group-definitions>
|
|
266
|
+
<attribute-group group-id="StoreInfo">
|
|
267
|
+
<display-name xml:lang="x-default">Store Information</display-name>
|
|
268
|
+
<attribute attribute-id="storeId" system="true"/>
|
|
269
|
+
<attribute attribute-id="storeName"/>
|
|
270
|
+
<attribute attribute-id="latitude"/>
|
|
271
|
+
<attribute attribute-id="longitude"/>
|
|
272
|
+
<attribute attribute-id="phone"/>
|
|
273
|
+
<attribute attribute-id="isActive"/>
|
|
274
|
+
</attribute-group>
|
|
275
|
+
</group-definitions>
|
|
276
|
+
</custom-type>
|
|
277
|
+
</metadata>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
## Site Preferences
|
|
281
|
+
|
|
282
|
+
Site-specific configuration via custom attributes on SitePreferences.
|
|
283
|
+
|
|
284
|
+
### Metadata (system-objecttype-extensions.xml)
|
|
285
|
+
|
|
286
|
+
```xml
|
|
287
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
288
|
+
<metadata xmlns="http://www.demandware.com/xml/impex/metadata/2006-10-31">
|
|
289
|
+
<type-extension type-id="SitePreferences">
|
|
290
|
+
<custom-attribute-definitions>
|
|
291
|
+
<attribute-definition attribute-id="enableFeatureX">
|
|
292
|
+
<display-name xml:lang="x-default">Enable Feature X</display-name>
|
|
293
|
+
<type>boolean</type>
|
|
294
|
+
<default-value>false</default-value>
|
|
295
|
+
</attribute-definition>
|
|
296
|
+
<attribute-definition attribute-id="apiEndpoint">
|
|
297
|
+
<display-name xml:lang="x-default">API Endpoint</display-name>
|
|
298
|
+
<type>string</type>
|
|
299
|
+
</attribute-definition>
|
|
300
|
+
<attribute-definition attribute-id="maxItemsPerPage">
|
|
301
|
+
<display-name xml:lang="x-default">Max Items Per Page</display-name>
|
|
302
|
+
<type>int</type>
|
|
303
|
+
<default-value>20</default-value>
|
|
304
|
+
</attribute-definition>
|
|
305
|
+
</custom-attribute-definitions>
|
|
306
|
+
<group-definitions>
|
|
307
|
+
<attribute-group group-id="CustomSettings">
|
|
308
|
+
<display-name xml:lang="x-default">Custom Settings</display-name>
|
|
309
|
+
<attribute attribute-id="enableFeatureX"/>
|
|
310
|
+
<attribute attribute-id="apiEndpoint"/>
|
|
311
|
+
<attribute attribute-id="maxItemsPerPage"/>
|
|
312
|
+
</attribute-group>
|
|
313
|
+
</group-definitions>
|
|
314
|
+
</type-extension>
|
|
315
|
+
</metadata>
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Values (sites/MySite/preferences.xml)
|
|
319
|
+
|
|
320
|
+
Preferences can be set per instance type (development, staging, production) or for all instances:
|
|
321
|
+
|
|
322
|
+
```xml
|
|
323
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
324
|
+
<preferences xmlns="http://www.demandware.com/xml/impex/preferences/2007-03-31">
|
|
325
|
+
<custom-preferences>
|
|
326
|
+
<all-instances>
|
|
327
|
+
<!-- Values that apply to all instance types -->
|
|
328
|
+
<preference preference-id="maxItemsPerPage">25</preference>
|
|
329
|
+
</all-instances>
|
|
330
|
+
<development>
|
|
331
|
+
<!-- Development-specific values -->
|
|
332
|
+
<preference preference-id="enableFeatureX">true</preference>
|
|
333
|
+
<preference preference-id="apiEndpoint">https://dev-api.example.com/v1</preference>
|
|
334
|
+
</development>
|
|
335
|
+
<staging>
|
|
336
|
+
<preference preference-id="enableFeatureX">true</preference>
|
|
337
|
+
<preference preference-id="apiEndpoint">https://staging-api.example.com/v1</preference>
|
|
338
|
+
</staging>
|
|
339
|
+
<production>
|
|
340
|
+
<preference preference-id="enableFeatureX">false</preference>
|
|
341
|
+
<preference preference-id="apiEndpoint">https://api.example.com/v1</preference>
|
|
342
|
+
</production>
|
|
343
|
+
</custom-preferences>
|
|
344
|
+
</preferences>
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### Access in Code
|
|
348
|
+
|
|
349
|
+
> Illustrative code; confirm current API signatures and return types with `b2c docs read dw.system.Site`.
|
|
350
|
+
|
|
351
|
+
```javascript
|
|
352
|
+
// See dw.system.Site Script API docs for full method signatures and return types
|
|
353
|
+
var Site = require('dw/system/Site');
|
|
354
|
+
|
|
355
|
+
var enableFeatureX = Site.current.getCustomPreferenceValue('enableFeatureX');
|
|
356
|
+
var apiEndpoint = Site.current.getCustomPreferenceValue('apiEndpoint');
|
|
357
|
+
var maxItems = Site.current.getCustomPreferenceValue('maxItemsPerPage');
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
## Attribute Definition Options
|
|
361
|
+
|
|
362
|
+
> Illustrative of available flags; confirm current schema elements and deprecation status with `b2c docs schema metadata`.
|
|
363
|
+
|
|
364
|
+
```xml
|
|
365
|
+
<attribute-definition attribute-id="myAttribute">
|
|
366
|
+
<display-name xml:lang="x-default">Display Name</display-name>
|
|
367
|
+
<description xml:lang="x-default">Description for BM tooltip</description>
|
|
368
|
+
<type>string</type>
|
|
369
|
+
<localizable-flag>false</localizable-flag>
|
|
370
|
+
<site-specific-flag>false</site-specific-flag>
|
|
371
|
+
<mandatory-flag>false</mandatory-flag>
|
|
372
|
+
<searchable-flag>false</searchable-flag>
|
|
373
|
+
<visible-flag>true</visible-flag>
|
|
374
|
+
<externally-managed-flag>false</externally-managed-flag>
|
|
375
|
+
<order-required-flag>false</order-required-flag>
|
|
376
|
+
<min-length>0</min-length>
|
|
377
|
+
<field-length>256</field-length>
|
|
378
|
+
<unit xml:lang="x-default">kg</unit>
|
|
379
|
+
<default-value>default</default-value>
|
|
380
|
+
</attribute-definition>
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
| Flag | Purpose |
|
|
384
|
+
|------|---------|
|
|
385
|
+
| `localizable-flag` | Can have different values per locale |
|
|
386
|
+
| `mandatory-flag` | Required in BM |
|
|
387
|
+
| `externally-managed-flag` | Read-only in BM |
|
|
388
|
+
| `visible-flag` | Shown in BM |
|
|
389
|
+
| `site-specific-flag` | Different value per site |
|
|
390
|
+
| `order-required-flag` | Required for order export |
|
|
391
|
+
| `searchable-flag` | Indexed for search (deprecated per metadata.xsd — use search2.xsd SearchableAttributes instead) |
|
|
392
|
+
|
|
393
|
+
## Best Practices
|
|
394
|
+
|
|
395
|
+
1. **Use attribute groups** to organize in Business Manager
|
|
396
|
+
2. **Prefix custom attributes** with organization name (e.g., `acme_myAttribute`)
|
|
397
|
+
3. **Set externally-managed** for data imported from external systems
|
|
398
|
+
4. **Use enums over strings** for controlled vocabularies
|
|
399
|
+
5. **Document with descriptions** - they appear as tooltips
|
|
400
|
+
|
|
401
|
+
## Quick Reference
|
|
402
|
+
|
|
403
|
+
For canonical documentation, see the Scope & Grounding section above. The files below are derived quick-reference summaries.
|
|
404
|
+
|
|
405
|
+
- [System Objects Reference](references/SYSTEM-OBJECTS.md) - All system object types
|
|
406
|
+
- [XML Examples](references/XML-EXAMPLES.md) - Complete import/export examples
|