@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.
Files changed (415) hide show
  1. package/bin/dev.js +8 -8
  2. package/bin/run.js +5 -7
  3. package/content/guidance/b2c/b2c-business-manager-extensions/SKILL.md +361 -0
  4. package/content/guidance/b2c/b2c-business-manager-extensions/references/EXTENSIONS-XML.md +458 -0
  5. package/content/guidance/b2c/b2c-controllers/SKILL.md +301 -0
  6. package/content/guidance/b2c/b2c-controllers/references/CLASSIC-PATTERNS.md +335 -0
  7. package/content/guidance/b2c/b2c-controllers/references/SFRA-PATTERNS.md +400 -0
  8. package/content/guidance/b2c/b2c-custom-api-development/SKILL.md +281 -0
  9. package/content/guidance/b2c/b2c-custom-api-development/references/CONTRACT.md +142 -0
  10. package/content/guidance/b2c/b2c-custom-api-development/references/IMPLEMENTATION.md +153 -0
  11. package/content/guidance/b2c/b2c-custom-api-development/references/TESTING.md +118 -0
  12. package/content/guidance/b2c/b2c-custom-caches/SKILL.md +279 -0
  13. package/content/guidance/b2c/b2c-custom-job-steps/SKILL.md +520 -0
  14. package/content/guidance/b2c/b2c-custom-job-steps/references/CHUNK-ORIENTED.md +377 -0
  15. package/content/guidance/b2c/b2c-custom-job-steps/references/JOBS-XML.md +212 -0
  16. package/content/guidance/b2c/b2c-custom-job-steps/references/STEPTYPES-JSON.md +373 -0
  17. package/content/guidance/b2c/b2c-custom-job-steps/references/TASK-ORIENTED.md +344 -0
  18. package/content/guidance/b2c/b2c-custom-objects/SKILL.md +327 -0
  19. package/content/guidance/b2c/b2c-custom-objects/references/OCAPI-SEARCH.md +298 -0
  20. package/content/guidance/b2c/b2c-forms/SKILL.md +242 -0
  21. package/content/guidance/b2c/b2c-forms/references/FORM-XML.md +409 -0
  22. package/content/guidance/b2c/b2c-hooks/SKILL.md +500 -0
  23. package/content/guidance/b2c/b2c-hooks/references/OCAPI-SCAPI-HOOKS.md +403 -0
  24. package/content/guidance/b2c/b2c-hooks/references/ORDER-HOOK-LIFECYCLE.md +169 -0
  25. package/content/guidance/b2c/b2c-hooks/references/SYSTEM-HOOKS.md +433 -0
  26. package/content/guidance/b2c/b2c-isml/SKILL.md +320 -0
  27. package/content/guidance/b2c/b2c-isml/references/EXPRESSIONS.md +366 -0
  28. package/content/guidance/b2c/b2c-isml/references/TAGS.md +443 -0
  29. package/content/guidance/b2c/b2c-localization/SKILL.md +344 -0
  30. package/content/guidance/b2c/b2c-localization/references/PATTERNS.md +407 -0
  31. package/content/guidance/b2c/b2c-logging/SKILL.md +352 -0
  32. package/content/guidance/b2c/b2c-logging/references/LOG-FILES.md +282 -0
  33. package/content/guidance/b2c/b2c-metadata/SKILL.md +406 -0
  34. package/content/guidance/b2c/b2c-metadata/references/SYSTEM-OBJECTS.md +320 -0
  35. package/content/guidance/b2c/b2c-metadata/references/XML-EXAMPLES.md +366 -0
  36. package/content/guidance/b2c/b2c-onboarding/SKILL.md +154 -0
  37. package/content/guidance/b2c/b2c-ordering/SKILL.md +391 -0
  38. package/content/guidance/b2c/b2c-page-designer/SKILL.md +410 -0
  39. package/content/guidance/b2c/b2c-page-designer/references/ATTRIBUTE-TYPES.md +436 -0
  40. package/content/guidance/b2c/b2c-page-designer/references/META-DEFINITIONS.md +340 -0
  41. package/content/guidance/b2c/b2c-querying-data/SKILL.md +289 -0
  42. package/content/guidance/b2c/b2c-querying-data/references/PERFORMANCE-APIS.md +74 -0
  43. package/content/guidance/b2c/b2c-scapi-admin/SKILL.md +53 -0
  44. package/content/guidance/b2c/b2c-scapi-admin/references/CLIENT-EXAMPLES.md +440 -0
  45. package/content/guidance/b2c/b2c-scapi-admin/references/INTEGRATION-PATTERNS.md +518 -0
  46. package/content/guidance/b2c/b2c-scapi-admin/references/OAUTH-SCOPES.md +337 -0
  47. package/content/guidance/b2c/b2c-scapi-shopper/SKILL.md +56 -0
  48. package/content/guidance/b2c/b2c-scapi-shopper/references/CHECKOUT-FLOW.md +466 -0
  49. package/content/guidance/b2c/b2c-scapi-shopper/references/CLIENT-EXAMPLES.md +351 -0
  50. package/content/guidance/b2c/b2c-scapi-shopper/references/COMMON-PATTERNS.md +390 -0
  51. package/content/guidance/b2c/b2c-scapi-shopper/references/SCOPES.md +290 -0
  52. package/content/guidance/b2c/b2c-slas-auth-patterns/SKILL.md +420 -0
  53. package/content/guidance/b2c/b2c-slas-auth-patterns/references/PASSKEYS.md +126 -0
  54. package/content/guidance/b2c/b2c-slas-auth-patterns/references/SESSION-BRIDGE.md +267 -0
  55. package/content/guidance/b2c/b2c-slas-auth-patterns/references/TOKEN-LIFECYCLE.md +367 -0
  56. package/content/guidance/b2c/b2c-webservices/SKILL.md +318 -0
  57. package/content/guidance/b2c/b2c-webservices/references/FTP-SERVICES.md +524 -0
  58. package/content/guidance/b2c/b2c-webservices/references/HTTP-SERVICES.md +578 -0
  59. package/content/guidance/b2c/b2c-webservices/references/SERVICES-XML.md +351 -0
  60. package/content/guidance/b2c/b2c-webservices/references/SOAP-SERVICES.md +587 -0
  61. package/content/guidance/b2c-cli/b2c-am/SKILL.md +277 -0
  62. package/content/guidance/b2c-cli/b2c-bm-users-roles/SKILL.md +210 -0
  63. package/content/guidance/b2c-cli/b2c-cap/SKILL.md +131 -0
  64. package/content/guidance/b2c-cli/b2c-cip/SKILL.md +116 -0
  65. package/content/guidance/b2c-cli/b2c-cip/references/KNOWN_TABLES.md +105 -0
  66. package/content/guidance/b2c-cli/b2c-cip/references/SALES_ANALYSIS.md +50 -0
  67. package/content/guidance/b2c-cli/b2c-cip/references/STARTER_QUERIES.md +147 -0
  68. package/content/guidance/b2c-cli/b2c-code/SKILL.md +146 -0
  69. package/content/guidance/b2c-cli/b2c-config/SKILL.md +462 -0
  70. package/content/guidance/b2c-cli/b2c-content/SKILL.md +176 -0
  71. package/content/guidance/b2c-cli/b2c-debug/SKILL.md +138 -0
  72. package/content/guidance/b2c-cli/b2c-docs/SKILL.md +301 -0
  73. package/content/guidance/b2c-cli/b2c-ecdn/SKILL.md +135 -0
  74. package/content/guidance/b2c-cli/b2c-ecdn/references/ADVANCED.md +97 -0
  75. package/content/guidance/b2c-cli/b2c-ecdn/references/SECURITY.md +75 -0
  76. package/content/guidance/b2c-cli/b2c-import-set-migrations/SKILL.md +265 -0
  77. package/content/guidance/b2c-cli/b2c-job/SKILL.md +64 -0
  78. package/content/guidance/b2c-cli/b2c-job/references/EXPORT.md +121 -0
  79. package/content/guidance/b2c-cli/b2c-job/references/IMPORT.md +55 -0
  80. package/content/guidance/b2c-cli/b2c-job/references/RUN-AND-MONITOR.md +119 -0
  81. package/content/guidance/b2c-cli/b2c-logs/SKILL.md +249 -0
  82. package/content/guidance/b2c-cli/b2c-metrics/SKILL.md +315 -0
  83. package/content/guidance/b2c-cli/b2c-mrt/SKILL.md +207 -0
  84. package/content/guidance/b2c-cli/b2c-mrt/references/BUNDLE-COMMANDS.md +203 -0
  85. package/content/guidance/b2c-cli/b2c-mrt/references/ENVIRONMENT-COMMANDS.md +218 -0
  86. package/content/guidance/b2c-cli/b2c-mrt/references/PROJECT-COMMANDS.md +154 -0
  87. package/content/guidance/b2c-cli/b2c-sandbox/SKILL.md +112 -0
  88. package/content/guidance/b2c-cli/b2c-scapi-custom/SKILL.md +126 -0
  89. package/content/guidance/b2c-cli/b2c-scapi-schemas/SKILL.md +66 -0
  90. package/content/guidance/b2c-cli/b2c-scapi-schemas/references/CLI-EXAMPLES.md +108 -0
  91. package/content/guidance/b2c-cli/b2c-site-import-export/SKILL.md +57 -0
  92. package/content/guidance/b2c-cli/b2c-site-import-export/references/IMPORT-OPTIONS.md +118 -0
  93. package/content/guidance/b2c-cli/b2c-site-import-export/references/METADATA-XML.md +381 -0
  94. package/content/guidance/b2c-cli/b2c-site-import-export/references/WORKFLOWS.md +182 -0
  95. package/content/guidance/b2c-cli/b2c-sites/SKILL.md +112 -0
  96. package/content/guidance/b2c-cli/b2c-slas/SKILL.md +182 -0
  97. package/content/guidance/b2c-cli/b2c-webdav/SKILL.md +186 -0
  98. package/content/guidance/b2c-ops/b2c-checkout-triage/SKILL.md +68 -0
  99. package/content/guidance/b2c-ops/b2c-job-health/SKILL.md +75 -0
  100. package/content/guidance/b2c-ops/b2c-job-health/references/job-logs.md +21 -0
  101. package/content/guidance/b2c-ops/b2c-order-failure-triage/SKILL.md +66 -0
  102. package/content/guidance/b2c-ops/b2c-order-failure-triage/references/order-evidence.md +87 -0
  103. package/content/guidance/b2c-ops/b2c-production-triage/SKILL.md +87 -0
  104. package/content/guidance/b2c-ops/b2c-production-triage/references/escalation.md +57 -0
  105. package/content/guidance/index.json +1949 -0
  106. package/content/guidance/storefront-next/sfnext-accessibility/SKILL.md +103 -0
  107. package/content/guidance/storefront-next/sfnext-accessibility/references/checklist.md +64 -0
  108. package/content/guidance/storefront-next/sfnext-analytics-consent/SKILL.md +91 -0
  109. package/content/guidance/storefront-next/sfnext-analytics-consent/references/CUSTOM-ADAPTER.md +49 -0
  110. package/content/guidance/storefront-next/sfnext-authentication/SKILL.md +127 -0
  111. package/content/guidance/storefront-next/sfnext-authentication/references/COOKIES.md +39 -0
  112. package/content/guidance/storefront-next/sfnext-authentication/references/LOGIN-FLOWS.md +59 -0
  113. package/content/guidance/storefront-next/sfnext-commerce-features/SKILL.md +67 -0
  114. package/content/guidance/storefront-next/sfnext-commerce-features/references/FEATURE-PREREQUISITES.md +37 -0
  115. package/content/guidance/storefront-next/sfnext-components/SKILL.md +153 -0
  116. package/content/guidance/storefront-next/sfnext-components/references/COMPONENT-AUTHORING.md +118 -0
  117. package/content/guidance/storefront-next/sfnext-components/references/SHAPE-TOKENS.md +51 -0
  118. package/content/guidance/storefront-next/sfnext-components/references/STORYBOOK.md +54 -0
  119. package/content/guidance/storefront-next/sfnext-components/references/TOKEN-SYSTEM.md +53 -0
  120. package/content/guidance/storefront-next/sfnext-components/references/TROUBLESHOOTING.md +19 -0
  121. package/content/guidance/storefront-next/sfnext-configuration/SKILL.md +163 -0
  122. package/content/guidance/storefront-next/sfnext-configuration/references/ENV-VARIABLES.md +55 -0
  123. package/content/guidance/storefront-next/sfnext-configuration/references/MULTI-SITE-URLS.md +137 -0
  124. package/content/guidance/storefront-next/sfnext-data-fetching/SKILL.md +140 -0
  125. package/content/guidance/storefront-next/sfnext-data-fetching/references/ACTIONS.md +53 -0
  126. package/content/guidance/storefront-next/sfnext-data-fetching/references/API-CLIENTS.md +34 -0
  127. package/content/guidance/storefront-next/sfnext-data-fetching/references/LOADERS.md +73 -0
  128. package/content/guidance/storefront-next/sfnext-data-fetching/references/SCAPI-FETCHER.md +39 -0
  129. package/content/guidance/storefront-next/sfnext-deployment/SKILL.md +127 -0
  130. package/content/guidance/storefront-next/sfnext-deployment/references/MRT-DEPLOYMENT.md +59 -0
  131. package/content/guidance/storefront-next/sfnext-extensions/SKILL.md +118 -0
  132. package/content/guidance/storefront-next/sfnext-extensions/references/ACTION-HOOKS.md +57 -0
  133. package/content/guidance/storefront-next/sfnext-extensions/references/BASE-AUDIT.md +68 -0
  134. package/content/guidance/storefront-next/sfnext-extensions/references/CLI-AND-INSTALL.md +58 -0
  135. package/content/guidance/storefront-next/sfnext-extensions/references/EXTENSION-EXAMPLES.md +79 -0
  136. package/content/guidance/storefront-next/sfnext-hybrid-storefronts/SKILL.md +93 -0
  137. package/content/guidance/storefront-next/sfnext-hybrid-storefronts/references/HYBRID-PROXY-CONFIG.md +86 -0
  138. package/content/guidance/storefront-next/sfnext-i18n/SKILL.md +152 -0
  139. package/content/guidance/storefront-next/sfnext-i18n/references/locale-config.md +35 -0
  140. package/content/guidance/storefront-next/sfnext-overview/SKILL.md +101 -0
  141. package/content/guidance/storefront-next/sfnext-page-designer/SKILL.md +202 -0
  142. package/content/guidance/storefront-next/sfnext-page-designer/references/BUSINESS-MANAGER.md +46 -0
  143. package/content/guidance/storefront-next/sfnext-page-designer/references/COMPONENT-REGISTRY.md +111 -0
  144. package/content/guidance/storefront-next/sfnext-page-designer/references/DECORATOR-PATTERNS.md +168 -0
  145. package/content/guidance/storefront-next/sfnext-page-designer/references/REVIEW-CHECKLIST.md +83 -0
  146. package/content/guidance/storefront-next/sfnext-page-designer/references/TROUBLESHOOTING.md +35 -0
  147. package/content/guidance/storefront-next/sfnext-performance/SKILL.md +102 -0
  148. package/content/guidance/storefront-next/sfnext-performance/references/PERFORMANCE-REVIEW-CHECKLIST.md +85 -0
  149. package/content/guidance/storefront-next/sfnext-performance/references/SUSPENSE-AND-STREAMING.md +58 -0
  150. package/content/guidance/storefront-next/sfnext-project-setup/SKILL.md +147 -0
  151. package/content/guidance/storefront-next/sfnext-project-setup/references/PROJECT-STRUCTURE.md +61 -0
  152. package/content/guidance/storefront-next/sfnext-project-setup/references/SCRIPTS.md +47 -0
  153. package/content/guidance/storefront-next/sfnext-project-setup/references/SFNEXT-CLI.md +63 -0
  154. package/content/guidance/storefront-next/sfnext-quality-gates/SKILL.md +70 -0
  155. package/content/guidance/storefront-next/sfnext-quality-gates/references/lint-and-budgets.md +39 -0
  156. package/content/guidance/storefront-next/sfnext-revalidation/SKILL.md +121 -0
  157. package/content/guidance/storefront-next/sfnext-revalidation/references/POLICIES-AND-TAGS.md +55 -0
  158. package/content/guidance/storefront-next/sfnext-routing/SKILL.md +123 -0
  159. package/content/guidance/storefront-next/sfnext-routing/references/ROUTE-CONVENTIONS.md +65 -0
  160. package/content/guidance/storefront-next/sfnext-routing/references/URLS-AND-SEO-ROUTES.md +22 -0
  161. package/content/guidance/storefront-next/sfnext-scapi/SKILL.md +126 -0
  162. package/content/guidance/storefront-next/sfnext-scapi/references/WORKED-EXAMPLE.md +39 -0
  163. package/content/guidance/storefront-next/sfnext-security/SKILL.md +129 -0
  164. package/content/guidance/storefront-next/sfnext-security/references/COOKIE-DOMAIN.md +39 -0
  165. package/content/guidance/storefront-next/sfnext-security/references/TURNSTILE.md +43 -0
  166. package/content/guidance/storefront-next/sfnext-seo/SKILL.md +95 -0
  167. package/content/guidance/storefront-next/sfnext-seo/references/MULTI-DOMAIN-BASE-PATH.md +17 -0
  168. package/content/guidance/storefront-next/sfnext-seo/references/SEO-ROUTES.md +31 -0
  169. package/content/guidance/storefront-next/sfnext-state-management/SKILL.md +114 -0
  170. package/content/guidance/storefront-next/sfnext-state-management/references/PATTERNS.md +45 -0
  171. package/content/guidance/storefront-next/sfnext-testing/SKILL.md +151 -0
  172. package/content/guidance/storefront-next/sfnext-testing/references/E2E.md +38 -0
  173. package/content/guidance/storefront-next/sfnext-testing/references/STORYBOOK-PATTERNS.md +97 -0
  174. package/content/guidance/storefront-next/sfnext-testing/references/UNIT-AND-ROUTE-TESTS.md +60 -0
  175. package/content/guidance/storefront-next/sfnext-theming/SKILL.md +104 -0
  176. package/content/guidance/storefront-next/sfnext-theming/references/REBRAND-CHECKLIST.md +29 -0
  177. package/dist/commands/cap/install.d.ts +1 -0
  178. package/dist/commands/cap/list.d.ts +1 -0
  179. package/dist/commands/cap/pull.d.ts +1 -0
  180. package/dist/commands/cap/tasks.d.ts +1 -0
  181. package/dist/commands/cap/uninstall.d.ts +1 -0
  182. package/dist/commands/cip/describe.d.ts +1 -0
  183. package/dist/commands/cip/query.d.ts +1 -0
  184. package/dist/commands/cip/report/bot-traffic-share.d.ts +1 -0
  185. package/dist/commands/cip/report/checkout-funnel-dropoff.d.ts +1 -0
  186. package/dist/commands/cip/report/controller-error-rate-trend.d.ts +1 -0
  187. package/dist/commands/cip/report/controller-health-scorecard.d.ts +1 -0
  188. package/dist/commands/cip/report/customer-registration-trends.d.ts +1 -0
  189. package/dist/commands/cip/report/discount-depth-breakdown.d.ts +1 -0
  190. package/dist/commands/cip/report/inventory-stockout-by-location.d.ts +1 -0
  191. package/dist/commands/cip/report/new-vs-returning-buyer-revenue.d.ts +1 -0
  192. package/dist/commands/cip/report/ocapi-client-usage.d.ts +1 -0
  193. package/dist/commands/cip/report/ocapi-requests.d.ts +1 -0
  194. package/dist/commands/cip/report/payment-method-performance.d.ts +1 -0
  195. package/dist/commands/cip/report/product-co-purchase-analysis.d.ts +1 -0
  196. package/dist/commands/cip/report/promotion-discount-analysis.d.ts +1 -0
  197. package/dist/commands/cip/report/promotion-roi-leaderboard.d.ts +1 -0
  198. package/dist/commands/cip/report/recommender-effectiveness.d.ts +1 -0
  199. package/dist/commands/cip/report/remote-include-performance.d.ts +1 -0
  200. package/dist/commands/cip/report/revenue-by-channel.d.ts +1 -0
  201. package/dist/commands/cip/report/sales-analytics.d.ts +1 -0
  202. package/dist/commands/cip/report/sales-summary.d.ts +1 -0
  203. package/dist/commands/cip/report/scapi-cache-hit-ratio.d.ts +1 -0
  204. package/dist/commands/cip/report/scapi-error-rate-by-status.d.ts +1 -0
  205. package/dist/commands/cip/report/scapi-latency-distribution.d.ts +1 -0
  206. package/dist/commands/cip/report/scapi-traffic-latency.d.ts +1 -0
  207. package/dist/commands/cip/report/search-query-performance.d.ts +1 -0
  208. package/dist/commands/cip/report/top-referrers.d.ts +1 -0
  209. package/dist/commands/cip/report/top-selling-products.d.ts +1 -0
  210. package/dist/commands/cip/report/zero-result-searches.d.ts +1 -0
  211. package/dist/commands/cip/tables.d.ts +1 -0
  212. package/dist/commands/code/activate.d.ts +1 -0
  213. package/dist/commands/code/delete.d.ts +1 -0
  214. package/dist/commands/code/deploy.d.ts +1 -0
  215. package/dist/commands/code/download.d.ts +1 -0
  216. package/dist/commands/code/watch.d.ts +1 -0
  217. package/dist/commands/commands/search.d.ts +35 -0
  218. package/dist/commands/commands/search.js +85 -0
  219. package/dist/commands/commands/search.js.map +1 -0
  220. package/dist/commands/content/export.d.ts +1 -0
  221. package/dist/commands/content/list.d.ts +1 -0
  222. package/dist/commands/content/validate.d.ts +1 -0
  223. package/dist/commands/debug/cli.d.ts +1 -0
  224. package/dist/commands/debug/index.d.ts +1 -0
  225. package/dist/commands/docs/cache.d.ts +1 -0
  226. package/dist/commands/docs/download.d.ts +1 -0
  227. package/dist/commands/docs/read.d.ts +1 -0
  228. package/dist/commands/docs/schema.d.ts +1 -0
  229. package/dist/commands/docs/search.d.ts +1 -0
  230. package/dist/commands/docs/skill.d.ts +41 -0
  231. package/dist/commands/docs/skill.js +183 -0
  232. package/dist/commands/docs/skill.js.map +1 -0
  233. package/dist/commands/ecdn/cache/purge.d.ts +1 -0
  234. package/dist/commands/ecdn/certificates/add.d.ts +1 -0
  235. package/dist/commands/ecdn/certificates/delete.d.ts +1 -0
  236. package/dist/commands/ecdn/certificates/list.d.ts +1 -0
  237. package/dist/commands/ecdn/certificates/update.d.ts +1 -0
  238. package/dist/commands/ecdn/certificates/validate.d.ts +1 -0
  239. package/dist/commands/ecdn/cipher-suites/get.d.ts +1 -0
  240. package/dist/commands/ecdn/cipher-suites/update.d.ts +1 -0
  241. package/dist/commands/ecdn/firewall/create.d.ts +1 -0
  242. package/dist/commands/ecdn/firewall/delete.d.ts +1 -0
  243. package/dist/commands/ecdn/firewall/get.d.ts +1 -0
  244. package/dist/commands/ecdn/firewall/list.d.ts +1 -0
  245. package/dist/commands/ecdn/firewall/reorder.d.ts +1 -0
  246. package/dist/commands/ecdn/firewall/update.d.ts +1 -0
  247. package/dist/commands/ecdn/logpush/jobs/create.d.ts +1 -0
  248. package/dist/commands/ecdn/logpush/jobs/delete.d.ts +1 -0
  249. package/dist/commands/ecdn/logpush/jobs/get.d.ts +1 -0
  250. package/dist/commands/ecdn/logpush/jobs/list.d.ts +1 -0
  251. package/dist/commands/ecdn/logpush/jobs/update.d.ts +1 -0
  252. package/dist/commands/ecdn/logpush/ownership.d.ts +1 -0
  253. package/dist/commands/ecdn/mrt-rules/create.d.ts +1 -0
  254. package/dist/commands/ecdn/mrt-rules/delete.d.ts +1 -0
  255. package/dist/commands/ecdn/mrt-rules/get.d.ts +1 -0
  256. package/dist/commands/ecdn/mrt-rules/rules/delete.d.ts +1 -0
  257. package/dist/commands/ecdn/mrt-rules/rules/update.d.ts +1 -0
  258. package/dist/commands/ecdn/mrt-rules/update.d.ts +1 -0
  259. package/dist/commands/ecdn/mtls/create.d.ts +1 -0
  260. package/dist/commands/ecdn/mtls/delete.d.ts +1 -0
  261. package/dist/commands/ecdn/mtls/get.d.ts +1 -0
  262. package/dist/commands/ecdn/mtls/issue.d.ts +1 -0
  263. package/dist/commands/ecdn/mtls/list.d.ts +1 -0
  264. package/dist/commands/ecdn/mtls/setup.d.ts +1 -0
  265. package/dist/commands/ecdn/origin-headers/delete.d.ts +1 -0
  266. package/dist/commands/ecdn/origin-headers/get.d.ts +1 -0
  267. package/dist/commands/ecdn/origin-headers/set.d.ts +1 -0
  268. package/dist/commands/ecdn/page-shield/notifications/create.d.ts +1 -0
  269. package/dist/commands/ecdn/page-shield/notifications/delete.d.ts +1 -0
  270. package/dist/commands/ecdn/page-shield/notifications/list.d.ts +1 -0
  271. package/dist/commands/ecdn/page-shield/policies/create.d.ts +1 -0
  272. package/dist/commands/ecdn/page-shield/policies/delete.d.ts +1 -0
  273. package/dist/commands/ecdn/page-shield/policies/get.d.ts +1 -0
  274. package/dist/commands/ecdn/page-shield/policies/list.d.ts +1 -0
  275. package/dist/commands/ecdn/page-shield/policies/update.d.ts +1 -0
  276. package/dist/commands/ecdn/page-shield/scripts/get.d.ts +1 -0
  277. package/dist/commands/ecdn/page-shield/scripts/list.d.ts +1 -0
  278. package/dist/commands/ecdn/rate-limit/create.d.ts +1 -0
  279. package/dist/commands/ecdn/rate-limit/delete.d.ts +1 -0
  280. package/dist/commands/ecdn/rate-limit/get.d.ts +1 -0
  281. package/dist/commands/ecdn/rate-limit/list.d.ts +1 -0
  282. package/dist/commands/ecdn/rate-limit/update.d.ts +1 -0
  283. package/dist/commands/ecdn/security/get.d.ts +1 -0
  284. package/dist/commands/ecdn/security/update.d.ts +1 -0
  285. package/dist/commands/ecdn/speed/get.d.ts +1 -0
  286. package/dist/commands/ecdn/speed/update.d.ts +1 -0
  287. package/dist/commands/ecdn/waf/groups/list.d.ts +1 -0
  288. package/dist/commands/ecdn/waf/groups/update.d.ts +1 -0
  289. package/dist/commands/ecdn/waf/managed-rules/list.d.ts +1 -0
  290. package/dist/commands/ecdn/waf/managed-rules/update.d.ts +1 -0
  291. package/dist/commands/ecdn/waf/migrate.d.ts +1 -0
  292. package/dist/commands/ecdn/waf/owasp/get.d.ts +1 -0
  293. package/dist/commands/ecdn/waf/owasp/update.d.ts +1 -0
  294. package/dist/commands/ecdn/waf/rules/get.d.ts +1 -0
  295. package/dist/commands/ecdn/waf/rules/list.d.ts +1 -0
  296. package/dist/commands/ecdn/waf/rules/update.d.ts +1 -0
  297. package/dist/commands/ecdn/waf/rulesets/list.d.ts +1 -0
  298. package/dist/commands/ecdn/waf/rulesets/update.d.ts +1 -0
  299. package/dist/commands/ecdn/zones/create.d.ts +1 -0
  300. package/dist/commands/ecdn/zones/list.d.ts +1 -0
  301. package/dist/commands/job/execution/delete.d.ts +1 -0
  302. package/dist/commands/job/export.d.ts +1 -0
  303. package/dist/commands/job/import-set.d.ts +1 -0
  304. package/dist/commands/job/import.d.ts +1 -0
  305. package/dist/commands/job/log.d.ts +1 -0
  306. package/dist/commands/job/run.d.ts +1 -0
  307. package/dist/commands/job/search.d.ts +1 -0
  308. package/dist/commands/job/wait.d.ts +1 -0
  309. package/dist/commands/logs/get.d.ts +1 -0
  310. package/dist/commands/logs/list.d.ts +1 -0
  311. package/dist/commands/logs/tail.d.ts +1 -0
  312. package/dist/commands/metrics/controller.d.ts +1 -0
  313. package/dist/commands/metrics/ecdn.d.ts +1 -0
  314. package/dist/commands/metrics/mrt.d.ts +1 -0
  315. package/dist/commands/metrics/ocapi.d.ts +1 -0
  316. package/dist/commands/metrics/overall.d.ts +1 -0
  317. package/dist/commands/metrics/sales.d.ts +1 -0
  318. package/dist/commands/metrics/scapi-hooks.d.ts +1 -0
  319. package/dist/commands/metrics/scapi.d.ts +1 -0
  320. package/dist/commands/metrics/third-party.d.ts +1 -0
  321. package/dist/commands/mrt/bundle/delete.d.ts +1 -0
  322. package/dist/commands/mrt/bundle/deploy.d.ts +1 -0
  323. package/dist/commands/mrt/bundle/download.d.ts +1 -0
  324. package/dist/commands/mrt/bundle/history.d.ts +1 -0
  325. package/dist/commands/mrt/bundle/list.d.ts +1 -0
  326. package/dist/commands/mrt/bundle/save.d.ts +1 -0
  327. package/dist/commands/mrt/bundle/upload-v2.d.ts +1 -0
  328. package/dist/commands/mrt/env/access-control/list.d.ts +1 -0
  329. package/dist/commands/mrt/env/b2c.d.ts +1 -0
  330. package/dist/commands/mrt/env/clone.d.ts +1 -0
  331. package/dist/commands/mrt/env/create.d.ts +1 -0
  332. package/dist/commands/mrt/env/delete.d.ts +1 -0
  333. package/dist/commands/mrt/env/get.d.ts +1 -0
  334. package/dist/commands/mrt/env/invalidate.d.ts +1 -0
  335. package/dist/commands/mrt/env/list.d.ts +1 -0
  336. package/dist/commands/mrt/env/redirect/clone.d.ts +1 -0
  337. package/dist/commands/mrt/env/redirect/create.d.ts +1 -0
  338. package/dist/commands/mrt/env/redirect/delete.d.ts +1 -0
  339. package/dist/commands/mrt/env/redirect/list.d.ts +1 -0
  340. package/dist/commands/mrt/env/update.d.ts +1 -0
  341. package/dist/commands/mrt/env/var/delete.d.ts +1 -0
  342. package/dist/commands/mrt/env/var/list.d.ts +1 -0
  343. package/dist/commands/mrt/env/var/push.d.ts +1 -0
  344. package/dist/commands/mrt/env/var/set.d.ts +1 -0
  345. package/dist/commands/mrt/org/b2c.d.ts +1 -0
  346. package/dist/commands/mrt/org/cert/create.d.ts +1 -0
  347. package/dist/commands/mrt/org/cert/delete.d.ts +1 -0
  348. package/dist/commands/mrt/org/cert/get.d.ts +1 -0
  349. package/dist/commands/mrt/org/cert/list.d.ts +1 -0
  350. package/dist/commands/mrt/org/cert/restart-validation.d.ts +1 -0
  351. package/dist/commands/mrt/org/list.d.ts +1 -0
  352. package/dist/commands/mrt/org/member/add.d.ts +1 -0
  353. package/dist/commands/mrt/org/member/get.d.ts +1 -0
  354. package/dist/commands/mrt/org/member/list.d.ts +1 -0
  355. package/dist/commands/mrt/org/member/remove.d.ts +1 -0
  356. package/dist/commands/mrt/org/member/update.d.ts +1 -0
  357. package/dist/commands/mrt/project/create.d.ts +1 -0
  358. package/dist/commands/mrt/project/delete.d.ts +1 -0
  359. package/dist/commands/mrt/project/get.d.ts +1 -0
  360. package/dist/commands/mrt/project/list.d.ts +1 -0
  361. package/dist/commands/mrt/project/member/add.d.ts +1 -0
  362. package/dist/commands/mrt/project/member/get.d.ts +1 -0
  363. package/dist/commands/mrt/project/member/list.d.ts +1 -0
  364. package/dist/commands/mrt/project/member/remove.d.ts +1 -0
  365. package/dist/commands/mrt/project/member/update.d.ts +1 -0
  366. package/dist/commands/mrt/project/notification/delete.d.ts +1 -0
  367. package/dist/commands/mrt/project/notification/get.d.ts +1 -0
  368. package/dist/commands/mrt/project/update.d.ts +1 -0
  369. package/dist/commands/mrt/save-credentials.d.ts +1 -0
  370. package/dist/commands/mrt/tail-logs.d.ts +1 -0
  371. package/dist/commands/mrt/user/api-key.d.ts +1 -0
  372. package/dist/commands/mrt/user/email-prefs.d.ts +1 -0
  373. package/dist/commands/mrt/user/profile.d.ts +1 -0
  374. package/dist/commands/scaffold/init.js +2 -1
  375. package/dist/commands/scaffold/init.js.map +1 -1
  376. package/dist/commands/scapi/custom/status.d.ts +1 -0
  377. package/dist/commands/scapi/schemas/get.d.ts +1 -0
  378. package/dist/commands/scapi/schemas/list.d.ts +1 -0
  379. package/dist/commands/setup/ide/tsserver-plugin.d.ts +1 -0
  380. package/dist/commands/setup/ide/vscode-types.d.ts +1 -0
  381. package/dist/commands/setup/index.js +4 -3
  382. package/dist/commands/setup/index.js.map +1 -1
  383. package/dist/commands/setup/inspect.d.ts +1 -0
  384. package/dist/commands/setup/inspect.js +17 -2
  385. package/dist/commands/setup/inspect.js.map +1 -1
  386. package/dist/commands/setup/instance/create.d.ts +1 -0
  387. package/dist/commands/setup/instance/list.d.ts +1 -0
  388. package/dist/commands/setup/instance/remove.d.ts +1 -0
  389. package/dist/commands/setup/instance/set-active.d.ts +1 -0
  390. package/dist/commands/setup/openshell.d.ts +1 -0
  391. package/dist/commands/setup/skills.d.ts +1 -0
  392. package/dist/commands/slas/client/create.d.ts +1 -0
  393. package/dist/commands/slas/client/delete.d.ts +1 -0
  394. package/dist/commands/slas/client/get.d.ts +1 -0
  395. package/dist/commands/slas/client/list.d.ts +1 -0
  396. package/dist/commands/slas/client/open.d.ts +1 -0
  397. package/dist/commands/slas/client/update.d.ts +1 -0
  398. package/dist/commands/slas/token.d.ts +1 -0
  399. package/dist/commands/slas/token.js +2 -1
  400. package/dist/commands/slas/token.js.map +1 -1
  401. package/dist/commands/webdav/get.d.ts +1 -0
  402. package/dist/commands/webdav/rm.d.ts +1 -0
  403. package/dist/help.d.ts +25 -0
  404. package/dist/help.js +96 -0
  405. package/dist/help.js.map +1 -0
  406. package/dist/lib/scaffold/generate-helper.js +3 -2
  407. package/dist/lib/scaffold/generate-helper.js.map +1 -1
  408. package/dist/lib/skills.d.ts +19 -0
  409. package/dist/lib/skills.js +75 -0
  410. package/dist/lib/skills.js.map +1 -0
  411. package/dist/utils/cip/command.d.ts +1 -0
  412. package/dist/utils/ecdn/zone-command.d.ts +1 -0
  413. package/dist/utils/slas/client.d.ts +1 -0
  414. package/oclif.manifest.json +21814 -18473
  415. package/package.json +11 -5
@@ -0,0 +1,74 @@
1
+ # Performance-Critical APIs
2
+
3
+ Complete reference for index-friendly vs database-intensive APIs in B2C Commerce.
4
+
5
+ ## Product APIs
6
+
7
+ ### Database-Intensive (Avoid on Storefront Pages)
8
+
9
+ | API | Problem | Impact |
10
+ |-----|---------|--------|
11
+ | `Category.getOnlineSubCategories()` | Hits database for each subcategory | Slow on deep category trees |
12
+ | `Category.getProducts()` | Loads all products from database | Memory + time on large categories |
13
+ | `Category.getOnlineProducts()` | Same as above, filtered | Still database-backed |
14
+ | `Category.getProductAssignments()` | Database query per assignment | Expensive with many assignments |
15
+ | `Category.getOnlineCategoryAssignments()` | Same, filtered by online status | Still database-backed |
16
+ | `ProductMgr.queryAllSiteProducts()` | Full table scan of all products | Never use on storefront |
17
+ | `Product.getPriceModel()` | Database lookup for pricing | Expensive in loops |
18
+ | `Product.getVariants()` | Loads all variant products | Very expensive for products with many variants |
19
+ | `Product.getVariationModel()` | Builds full variation model | Database-intensive |
20
+
21
+ ### Index-Friendly Replacements
22
+
23
+ | API | Benefit |
24
+ |-----|---------|
25
+ | `ProductSearchModel.search()` | Search-index backed, fast |
26
+ | `ProductSearchModel.setCategoryID(id)` | Replaces `Category.getProducts()` |
27
+ | `ProductSearchModel.setOrderableProductsOnly(true)` | Replaces `Category.getOnlineProducts()` + availability check |
28
+ | `ProductSearchModel.getRefinements()` | Index-backed refinement values |
29
+ | `ProductSearchRefinements.getNextLevelCategoryRefinementValues(category)` | Replaces `Category.getOnlineSubCategories()` for nav |
30
+ | `ProductSearchRefinements.getAllRefinementValues(attributeName)` | Refinement values for one attribute |
31
+ | `ProductSearchModel.getProductSearchHits()` | Efficient result iteration |
32
+ | `ProductSearchHit.getMinPrice()` / `getMaxPrice()` | Replaces `Product.getPriceModel()` in search |
33
+ | `ProductSearchHit.getRepresentedProductIDs()` | Replaces `Product.getVariants()` in search |
34
+ | `ProductSearchHit.getRepresentedVariationValues(attr)` | Replaces `Product.getVariationModel()` in search |
35
+
36
+ ## Order APIs
37
+
38
+ | API | Type | Notes |
39
+ |-----|------|-------|
40
+ | `OrderMgr.searchOrders(query, sort, ...args)` | Index-backed | Preferred for storefront lookups; limited to 1000 results |
41
+ | `OrderMgr.searchOrder(query, ...args)` | Index-backed | Single order search |
42
+ | `OrderMgr.queryOrders(query, sort, ...args)` | Database | Use for non-indexed attributes only |
43
+ | `OrderMgr.queryOrder(query, ...args)` | Database | Single order, database query |
44
+ | `OrderMgr.getOrder(orderNo)` | Direct lookup | Fast; use when you have the order number |
45
+
46
+ ## Customer / Profile APIs
47
+
48
+ | API | Type | Notes |
49
+ |-----|------|-------|
50
+ | `CustomerMgr.searchProfiles(query, sort, ...args)` | Index-backed | Preferred for storefront; max 1000 results |
51
+ | `CustomerMgr.processProfiles(query, callback, ...args)` | Index-backed | Preferred for jobs; optimized memory management |
52
+ | `CustomerMgr.queryProfiles(query, sort, ...args)` | Database | **Deprecated pattern**; use `searchProfiles` instead |
53
+ | `SystemObjectMgr.querySystemObjects('Profile', ...)` | Database | **Deprecated for profiles**; use `CustomerMgr` methods |
54
+ | `CustomerMgr.getCustomerByLogin(login)` | Direct lookup | Fast; use when you have the login |
55
+ | `CustomerMgr.getCustomerByToken(token)` | Direct lookup | Fast; token-based auth flows |
56
+
57
+ ## Custom Object APIs
58
+
59
+ | API | Type | Notes |
60
+ |-----|------|-------|
61
+ | `CustomObjectMgr.getCustomObject(type, key)` | Direct lookup | Fast; use when you have the key |
62
+ | `CustomObjectMgr.queryCustomObjects(type, query, sort, ...args)` | Database | Only option for filtered queries |
63
+ | `CustomObjectMgr.getAllCustomObjects(type)` | Database | Use with caution on large datasets |
64
+
65
+ ## General Query Performance Rules
66
+
67
+ 1. **Search index APIs** (search*) are 10-100x faster than database APIs (query*) for indexed attributes
68
+ 2. **Direct lookups** (getOrder, getCustomerByLogin, getCustomObject) are fastest when you have the key
69
+ 3. **Database queries** (query*) should only be used when:
70
+ - The attribute is not in the search index
71
+ - You need more than 1000 results (use in jobs, not storefront)
72
+ - You need exact database consistency (search index can be slightly behind)
73
+ 4. **Iterator management**: Always call `.close()` on query/search result iterators
74
+ 5. **Result limits**: Search APIs return at most 1000 hits; design pagination accordingly
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: b2c-scapi-admin
3
+ description: Build backend integrations that sync data between B2C Commerce and external systems like ERPs, OMS, WMS, or CRMs using SCAPI Admin APIs. Use this skill whenever the user needs to pull or push orders, products, inventory, or customer data programmatically from a backend service, set up server-to-server authentication with Account Manager client credentials and admin OAuth scopes, implement bulk inventory imports with NDJSON, or call any Commerce API from a script or pipeline (not a storefront). Also use when building nightly data exports, warehouse sync jobs, or customer data integrations — even if they just say "pull orders into our ERP" or "sync inventory from the warehouse".
4
+ ---
5
+
6
+ # SCAPI Admin APIs
7
+
8
+ Build backend integrations or manage Commerce data through standard Admin APIs.
9
+ Use the `b2c-scapi-shopper` skill for storefront flows.
10
+
11
+ ## Tool choice
12
+
13
+ When B2C MCP is available:
14
+ - Prefer a dedicated task tool. Otherwise read `skill://mcp/b2c-mcp-scapi/SKILL.md` once
15
+ through resources or `skills_read`, then use `skillRead: true`.
16
+ - `scapi_search`: bundled standard contracts, offline. Find method/path/operationId,
17
+ then inspect selected parameters, fields, and security scopes. Return compact projections.
18
+ - `scapi_execute`: supported Admin JSON operations with configured Account Manager
19
+ auth and automatic operation/tenant scopes. Use `config_inspect` with masking;
20
+ do not fetch or print tokens manually for these calls.
21
+ - `scapi_schemas_list`: live tenant schemas, including custom attributes and APIs.
22
+ `scapi_custom_apis_get_status`: custom registration. Custom execution and binary
23
+ transfers are unsupported by code mode; use an appropriate integration client.
24
+ - `docs_search`/`docs_read`: platform semantics, limits, and auth setup. No duplicate
25
+ docs lookup is needed merely to repeat a discovered contract.
26
+
27
+ For CLI/integration development: `b2c scapi schemas list` and
28
+ `b2c scapi schemas get <family> <name> <version>` retrieve live contracts.
29
+ Read [integration examples](references/CLIENT-EXAMPLES.md) only when implementing
30
+ an external client, token flow, or bulk import. There is no CLI code-mode equivalent.
31
+
32
+ ## Execute deliberately
33
+
34
+ - Use configured short code, tenant, and site values. Admin auth requires an
35
+ Account Manager client, API grants, and `SALESFORCE_COMMERCE_API:<tenant_id>`.
36
+ SLAS credentials do not replace Admin credentials.
37
+ - Inspect the operation before use; examples are illustrative. For tenant-specific
38
+ fields use live schemas. Check official docs for version-specific semantics.
39
+ - Distinguish creation from update; PUT may do both. Verify existence and intent,
40
+ then read back meaningful fields. Check earlier writes before retrying a failure.
41
+ - Page/filter at the API and return IDs, selected fields, totals/hasMore, and errors.
42
+ Do not emit whole response trees or log credentials.
43
+ - Safety is method-based: POST searches can require a targeted allow rule.
44
+ Confirmation-required code-mode requests stop; do not bypass them.
45
+
46
+ ## Conditional references
47
+
48
+ - [OAuth scopes](references/OAUTH-SCOPES.md): integration grants; compare with the operation's security.
49
+ - [Integration patterns](references/INTEGRATION-PATTERNS.md): ETL, sync, bulk import.
50
+ - `b2c-config` skill: CLI credentials and precedence.
51
+ - Official docs: `commerce-api/authorization-for-admin-apis`, `commerce-api/auth-z-scope-catalog`,
52
+ `commerce-api/timeouts-limits`, `commerce-api/throttle-rates`,
53
+ `commerce-api/inventory-impex-best-practices`.
@@ -0,0 +1,440 @@
1
+ # SCAPI Client Examples
2
+
3
+ For external integration code; MCP calls use configured authentication. Verify
4
+ contract details with schema discovery before adapting these examples.
5
+
6
+ ## Overview
7
+
8
+ Admin APIs are designed for backend systems and integrations:
9
+
10
+ - **Client**: Backend services, ETL pipelines, management tools
11
+ - **Authentication**: Account Manager OAuth (client credentials)
12
+ - **Response Time**: Typical < 60 seconds; see `docs_read commerce-api/timeouts-limits` for current thresholds
13
+ - **Usage**: Moderate frequency, batch operations preferred
14
+
15
+ ### Base URL Structure
16
+
17
+ ```
18
+ https://{shortCode}.api.commercecloud.salesforce.com/{apiFamily}/{apiName}/v1/organizations/{organizationId}/{resource}
19
+ ```
20
+
21
+ Example:
22
+ ```
23
+ https://kv7kzm78.api.commercecloud.salesforce.com/product/products/v1/organizations/f_ecom_zzte_053/products/25518823M
24
+ ```
25
+
26
+ **Note:** Admin APIs typically don't require `siteId` parameter (unlike Shopper APIs).
27
+
28
+ ## Authentication
29
+
30
+ Admin APIs use Account Manager OAuth with client credentials flow.
31
+
32
+ ### Get Admin Token via CLI
33
+
34
+ ```bash
35
+ # Get admin token (uses clientId/clientSecret from dw.json)
36
+ b2c auth token
37
+
38
+ # Get token with specific scopes — b2c auth token accepts multiple scopes
39
+ # (repeat --auth-scope or pass a comma-separated list). It does NOT auto-inject
40
+ # the tenant scope, so include SALESFORCE_COMMERCE_API:<tenant_id> alongside the API scopes.
41
+ b2c auth token \
42
+ --auth-scope "SALESFORCE_COMMERCE_API:zzte_053" \
43
+ --auth-scope sfcc.orders \
44
+ --auth-scope sfcc.products
45
+
46
+ # Get token as JSON (includes expiration)
47
+ b2c auth token --json
48
+ ```
49
+
50
+ > **Tenant scope is required.** For any SCAPI Admin call (system APIs *and* custom Admin APIs), the token must carry both the tenant scope `SALESFORCE_COMMERCE_API:<tenant_id>` and the API-specific scopes — see [Dual Scope Requirement](#dual-scope-requirement) below. The SCAPI subcommands (`b2c scapi custom status`, `b2c scapi schemas list`) add the tenant scope automatically; `b2c auth token` and raw curl do not.
51
+
52
+ See the `b2c-config` skill for configuration details.
53
+
54
+ ### Get Token Programmatically
55
+
56
+ ```bash
57
+ curl "https://account.demandware.com/dwsso/oauth2/access_token" \
58
+ --request 'POST' \
59
+ --user "${CLIENT_ID}:${CLIENT_SECRET}" \
60
+ --header 'Content-Type: application/x-www-form-urlencoded' \
61
+ --data "grant_type=client_credentials" \
62
+ --data-urlencode "scope=SALESFORCE_COMMERCE_API:${TENANT_ID} ${SCOPES}"
63
+ ```
64
+
65
+ **Example:**
66
+
67
+ ```bash
68
+ CLIENT_ID="your-client-id"
69
+ CLIENT_SECRET="your-client-secret"
70
+ TENANT_ID="zzte_053"
71
+ SCOPES="sfcc.orders sfcc.products"
72
+
73
+ TOKEN=$(curl -s "https://account.demandware.com/dwsso/oauth2/access_token" \
74
+ -u "$CLIENT_ID:$CLIENT_SECRET" \
75
+ -d "grant_type=client_credentials" \
76
+ --data-urlencode "scope=SALESFORCE_COMMERCE_API:$TENANT_ID $SCOPES" \
77
+ | jq -r '.access_token')
78
+ ```
79
+
80
+ ### Dual Scope Requirement
81
+
82
+ Admin APIs require **two types of scopes**:
83
+
84
+ 1. **Tenant scope**: `SALESFORCE_COMMERCE_API:{tenant_id}` - grants access to the tenant
85
+ 2. **API-specific scopes**: `sfcc.catalogs`, `sfcc.orders.rw`, etc. - grants API access
86
+
87
+ ```
88
+ scope=SALESFORCE_COMMERCE_API:zzte_053 sfcc.catalogs sfcc.products.rw
89
+ ```
90
+
91
+ See [OAuth Scopes Reference](../references/OAUTH-SCOPES.md) for the complete scope list.
92
+
93
+ ### Account Manager Setup
94
+
95
+ 1. Log into Account Manager
96
+ 2. Navigate to **API Client** > **Add API Client**
97
+ 3. Configure:
98
+ - Display Name and Password (client secret)
99
+ - Assign Organizations (your B2C instances)
100
+ - Role: "Salesforce Commerce API"
101
+ - Token Endpoint Auth Method: `client_secret_post`
102
+ - Access Token Format: `JWT`
103
+ - Allowed Scopes: Add required scopes
104
+ 4. Copy the Client ID
105
+
106
+ ## API Families
107
+
108
+ > **Note:** The examples below illustrate typical request patterns and are provided for learning purposes. For authoritative API contracts (current request/response schemas, endpoints, query parameters, headers), use `b2c scapi schemas list` and `b2c scapi schemas get <api-family> <api-name> <version>` to retrieve OpenAPI specs, or consult the official [Commerce API Reference](https://developer.salesforce.com/docs/commerce/commerce-api) via `b2c docs search` / `docs_search`.
109
+
110
+ ### Products API
111
+
112
+ Manage product catalog data.
113
+
114
+ ```javascript
115
+ // Get product
116
+ const product = await fetch(
117
+ `https://${shortCode}.api.commercecloud.salesforce.com/product/products/v1/organizations/${orgId}/products/${productId}`,
118
+ {
119
+ headers: { 'Authorization': `Bearer ${adminToken}` }
120
+ }
121
+ ).then(r => r.json());
122
+
123
+ // Update product
124
+ await fetch(
125
+ `https://${shortCode}.api.commercecloud.salesforce.com/product/products/v1/organizations/${orgId}/products/${productId}`,
126
+ {
127
+ method: 'PATCH',
128
+ headers: {
129
+ 'Authorization': `Bearer ${adminToken}`,
130
+ 'Content-Type': 'application/json'
131
+ },
132
+ body: JSON.stringify({
133
+ name: { default: 'Updated Product Name' },
134
+ shortDescription: { default: 'New description' }
135
+ })
136
+ }
137
+ );
138
+ ```
139
+
140
+ **Required Scopes:**
141
+ - Read: `sfcc.products`
142
+ - Write: `sfcc.products.rw`
143
+
144
+ ### Catalogs API
145
+
146
+ Manage catalog structure and assignments.
147
+
148
+ ```javascript
149
+ // List catalogs
150
+ const catalogs = await fetch(
151
+ `https://${shortCode}.api.commercecloud.salesforce.com/product/catalogs/v1/organizations/${orgId}/catalogs`,
152
+ {
153
+ headers: { 'Authorization': `Bearer ${adminToken}` }
154
+ }
155
+ ).then(r => r.json());
156
+
157
+ // Get catalog details
158
+ const catalog = await fetch(
159
+ `https://${shortCode}.api.commercecloud.salesforce.com/product/catalogs/v1/organizations/${orgId}/catalogs/${catalogId}`,
160
+ {
161
+ headers: { 'Authorization': `Bearer ${adminToken}` }
162
+ }
163
+ ).then(r => r.json());
164
+ ```
165
+
166
+ **Required Scopes:**
167
+ - Read: `sfcc.catalogs`
168
+ - Write: `sfcc.catalogs.rw`
169
+
170
+ ### Orders API
171
+
172
+ Retrieve and manage orders.
173
+
174
+ ```javascript
175
+ // Get order by number
176
+ const order = await fetch(
177
+ `https://${shortCode}.api.commercecloud.salesforce.com/checkout/orders/v1/organizations/${orgId}/orders/${orderNo}?siteId=${siteId}`,
178
+ {
179
+ headers: { 'Authorization': `Bearer ${adminToken}` }
180
+ }
181
+ ).then(r => r.json());
182
+
183
+ // Update order status
184
+ await fetch(
185
+ `https://${shortCode}.api.commercecloud.salesforce.com/checkout/orders/v1/organizations/${orgId}/orders/${orderNo}?siteId=${siteId}`,
186
+ {
187
+ method: 'PATCH',
188
+ headers: {
189
+ 'Authorization': `Bearer ${adminToken}`,
190
+ 'Content-Type': 'application/json'
191
+ },
192
+ body: JSON.stringify({
193
+ status: 'completed',
194
+ shippingStatus: 'shipped'
195
+ })
196
+ }
197
+ );
198
+ ```
199
+
200
+ **Required Scopes:**
201
+ - Read: `sfcc.orders`
202
+ - Write: `sfcc.orders.rw`
203
+
204
+ ### Inventory Availability API
205
+
206
+ Manage product inventory.
207
+
208
+ ```javascript
209
+ // Get inventory for a product
210
+ const availability = await fetch(
211
+ `https://${shortCode}.api.commercecloud.salesforce.com/inventory/availability/v1/organizations/${orgId}/availability-records/search`,
212
+ {
213
+ method: 'POST',
214
+ headers: {
215
+ 'Authorization': `Bearer ${adminToken}`,
216
+ 'Content-Type': 'application/json'
217
+ },
218
+ body: JSON.stringify({
219
+ skus: ['SKU001', 'SKU002'],
220
+ locationIds: ['warehouse-1']
221
+ })
222
+ }
223
+ ).then(r => r.json());
224
+
225
+ // Update inventory
226
+ await fetch(
227
+ `https://${shortCode}.api.commercecloud.salesforce.com/inventory/availability/v1/organizations/${orgId}/availability-records`,
228
+ {
229
+ method: 'PATCH',
230
+ headers: {
231
+ 'Authorization': `Bearer ${adminToken}`,
232
+ 'Content-Type': 'application/json'
233
+ },
234
+ body: JSON.stringify({
235
+ records: [{
236
+ sku: 'SKU001',
237
+ locationId: 'warehouse-1',
238
+ onHand: 100,
239
+ effectiveDate: new Date().toISOString()
240
+ }]
241
+ })
242
+ }
243
+ );
244
+ ```
245
+
246
+ **Required Scopes:**
247
+ - Read: `sfcc.inventory.availability`
248
+ - Write: `sfcc.inventory.availability.rw`
249
+
250
+ ### Inventory IMPEX API
251
+
252
+ > Illustrative of the IMPEX flow; confirm file size thresholds, format requirements, and best practices with `docs_read commerce-api/inventory-impex-best-practices`.
253
+
254
+ High-performance bulk inventory import. Use for 1000+ SKU updates.
255
+
256
+ **Critical Requirements:**
257
+ - Files > 100MB **MUST** be gzip compressed
258
+ - Use newline-delimited JSON (NDJSON), not comma-separated arrays
259
+ - Don't run imports during location graph changes
260
+ - Use delta imports (changed data only) for best performance
261
+ - Future quantity values must be > 0
262
+
263
+ ```javascript
264
+ // Step 1: Initiate import
265
+ const importJob = await fetch(
266
+ `https://${shortCode}.api.commercecloud.salesforce.com/inventory/impex/v1/organizations/${orgId}/availability-records/imports`,
267
+ {
268
+ method: 'POST',
269
+ headers: {
270
+ 'Authorization': `Bearer ${adminToken}`,
271
+ 'Content-Type': 'application/json'
272
+ },
273
+ body: JSON.stringify({})
274
+ }
275
+ ).then(r => r.json());
276
+
277
+ // Step 2: Prepare newline-delimited JSON
278
+ const ndjsonData = inventoryRecords
279
+ .map(r => JSON.stringify({
280
+ recordId: r.recordId || crypto.randomUUID(),
281
+ sku: r.sku,
282
+ locationId: r.locationId,
283
+ onHand: r.quantity,
284
+ effectiveDate: new Date().toISOString()
285
+ }))
286
+ .join('\n');
287
+
288
+ // Step 3: Upload data to the uploadLink
289
+ await fetch(importJob.uploadLink, {
290
+ method: 'POST',
291
+ headers: { 'Content-Type': 'application/json' },
292
+ body: ndjsonData
293
+ });
294
+
295
+ // Step 4: Monitor status
296
+ const status = await fetch(importJob.importStatusLink, {
297
+ headers: { 'Authorization': `Bearer ${adminToken}` }
298
+ }).then(r => r.json());
299
+ ```
300
+
301
+ **Required Scope:** `sfcc.inventory.impex-inventory`
302
+
303
+ **Note:** Inventory IMPEX logs don't appear in Log Center. Use correlation IDs and monitor import status directly.
304
+
305
+ See [Integration Patterns Reference](../references/INTEGRATION-PATTERNS.md) for bulk import best practices.
306
+
307
+ ### Customers API
308
+
309
+ Manage customer data.
310
+
311
+ ```javascript
312
+ // Search customers
313
+ const customers = await fetch(
314
+ `https://${shortCode}.api.commercecloud.salesforce.com/customer/customers/v1/organizations/${orgId}/customer-search?siteId=${siteId}`,
315
+ {
316
+ method: 'POST',
317
+ headers: {
318
+ 'Authorization': `Bearer ${adminToken}`,
319
+ 'Content-Type': 'application/json'
320
+ },
321
+ body: JSON.stringify({
322
+ query: {
323
+ textQuery: { fields: ['email'], searchPhrase: 'john@example.com' }
324
+ }
325
+ })
326
+ }
327
+ ).then(r => r.json());
328
+ ```
329
+
330
+ **Required Scopes:**
331
+ - Read: `sfcc.shopper-customers`
332
+ - Write: `sfcc.shopper-customers.rw`
333
+
334
+ ### Promotions API
335
+
336
+ Manage promotions and campaigns.
337
+
338
+ ```javascript
339
+ // Get promotion
340
+ const promotion = await fetch(
341
+ `https://${shortCode}.api.commercecloud.salesforce.com/pricing/promotions/v1/organizations/${orgId}/promotions/${promotionId}?siteId=${siteId}`,
342
+ {
343
+ headers: { 'Authorization': `Bearer ${adminToken}` }
344
+ }
345
+ ).then(r => r.json());
346
+
347
+ // Update promotion
348
+ await fetch(
349
+ `https://${shortCode}.api.commercecloud.salesforce.com/pricing/promotions/v1/organizations/${orgId}/promotions/${promotionId}?siteId=${siteId}`,
350
+ {
351
+ method: 'PATCH',
352
+ headers: {
353
+ 'Authorization': `Bearer ${adminToken}`,
354
+ 'Content-Type': 'application/json'
355
+ },
356
+ body: JSON.stringify({
357
+ enabled: true,
358
+ startDate: '2024-06-01T00:00:00Z',
359
+ endDate: '2024-06-30T23:59:59Z'
360
+ })
361
+ }
362
+ );
363
+ ```
364
+
365
+ **Required Scopes:**
366
+ - Read: `sfcc.promotions`
367
+ - Write: `sfcc.promotions.rw`
368
+
369
+ ## Request Tracking
370
+
371
+ > Illustrative of correlation ID and verbose logging mechanisms; confirm current header names and Log Center search syntax with `docs_read commerce-api/scapi-logs-request-tracking`.
372
+
373
+ ### Correlation IDs
374
+
375
+ Include correlation IDs for tracking requests across systems:
376
+
377
+ ```javascript
378
+ const correlationId = crypto.randomUUID();
379
+
380
+ const response = await fetch(url, {
381
+ headers: {
382
+ 'Authorization': `Bearer ${adminToken}`,
383
+ 'correlation-id': correlationId
384
+ }
385
+ });
386
+
387
+ console.log(`Request ${correlationId} completed`);
388
+ // Search Log Center: externalID:({correlationId})
389
+ ```
390
+
391
+ ### Verbose Logging
392
+
393
+ Enable verbose logging for debugging:
394
+
395
+ ```javascript
396
+ const response = await fetch(url, {
397
+ headers: {
398
+ 'Authorization': `Bearer ${adminToken}`,
399
+ 'sfdc_verbose': 'true'
400
+ }
401
+ });
402
+ ```
403
+
404
+ Check Log Center under `scapi.verbose` category.
405
+
406
+ **Note:** Some Admin APIs (CDN Zones, Inventory, Shopper Context) don't log to Log Center.
407
+
408
+ ## Error Handling
409
+
410
+ ### Common Errors
411
+
412
+ | Status | Meaning | Action |
413
+ |--------|---------|--------|
414
+ | 400 | Bad Request | Check request body/parameters |
415
+ | 401 | Unauthorized | Token expired - get new token |
416
+ | 403 | Forbidden | Missing scope or tenant access |
417
+ | 404 | Not Found | Resource doesn't exist |
418
+ | 429 | Rate Limited | Implement backoff |
419
+ | 500 | Server Error | Retry with backoff |
420
+ | 504 | Timeout | Request took > 60 seconds |
421
+
422
+ ### Rate Limiting
423
+
424
+ Admin APIs have lower rate limits than Shopper APIs. See `docs_read commerce-api/throttle-rates` for specific rate limits per API family. For bulk operations:
425
+
426
+ - Use batch endpoints when available
427
+ - Implement exponential backoff for 429 responses
428
+ - Consider inventory IMPEX for large data imports
429
+ - Spread operations over time for non-urgent updates
430
+
431
+ ## Related Skills
432
+
433
+ - `b2c-config` skill - Get admin tokens via CLI
434
+ - `b2c-scapi-shopper` skill - Shopper-facing APIs
435
+ - `b2c-scapi-schemas` skill - Browse OpenAPI schemas
436
+
437
+ ## Reference Documentation
438
+
439
+ - [OAuth Scopes Reference](../references/OAUTH-SCOPES.md) - Complete admin scope reference
440
+ - [Integration Patterns](../references/INTEGRATION-PATTERNS.md) - ETL, sync, and bulk import patterns