Skip to content

Manage the Business Manager cartridge path through SCAPI - #839

Merged
clavery merged 2 commits into
mainfrom
fix/bm-cartridge-path-scapi
Oct 31, 2026
Merged

clavery merged 2 commits into
mainfrom
fix/bm-cartridge-path-scapi

Conversation

@clavery

@clavery clavery commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Business Manager cartridge path commands (b2c sites cartridges list|add|remove|set --bm) now use the SCAPI Sites API custom-cartridges resource for Sites-Site.

Previously:

  • list --bm read the SCAPI site resource, which returns 404 for Sites-Site, then fell back to OCAPI and suggested granting OCAPI resources.
  • add/remove/set --bm always ran a site archive import job, even when SCAPI was configured.

Now BM reads and updates go through GET/PUT .../sites/Sites-Site/custom-cartridges (scope sfcc.sites.rw). If SCAPI isn't configured, the instance prefers OCAPI, or the SCAPI call is rejected, updates fall back to site archive import as before. OCAPI is not tried for BM updates since it can't update that site, and the fallback error no longer recommends OCAPI resources for Sites-Site.

No breaking changes.

Testing

Manual, against an instance with a SCAPI-capable API client (sfcc.sites.rw) and shortCode/tenantId configured:

  1. b2c sites cartridges list --bm shows the BM cartridge path (previously failed or fell back to OCAPI).
  2. b2c sites cartridges set "<current path>" --bm --log-level debug shows a PUT .../sites/Sites-Site/custom-cartridges request and no site archive import job.
  3. b2c sites cartridges add <name> --bm then remove <name> --bm round-trips without running an import job.
  4. With --api-backend ocapi, set --bm still uses site archive import.

Business Manager (Sites-Site) cartridge path updates always ran a site
archive import, and 'sites cartridges list --bm' read the SCAPI site
resource, which does not exist for Sites-Site. The SCAPI custom-cartridges
resource does work for Sites-Site, so use it for reads and updates, with
site archive import as the fallback. OCAPI is skipped for BM updates since
it cannot update that site.
@clavery
clavery requested a review from a team October 30, 2026 23:55
@clavery
clavery deployed to b2c-docs-preview October 30, 2026 23:55 — with GitHub Actions Active
@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

📘 Docs preview

🧹 The preview for this PR has been removed (PR closed).

@clavery
clavery deployed to b2c-docs-preview October 31, 2026 00:15 — with GitHub Actions Active
@clavery
clavery merged commit 84cd0da into main Oct 31, 2026
16 checks passed
@clavery
clavery deleted the fix/bm-cartridge-path-scapi branch October 31, 2026 00:24
@clavery
clavery deployed to b2c-docs-preview October 31, 2026 00:24 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
b2c-docs-preview — a0f97026 Deployed Oct 31, 2026 by clavery via Remove preview on close #1185
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant