SAP Commerce Cloud

Add Inclusify to your SAP Commerce Cloud storefront using Spartacus or Accelerator templates. There is no Inclusify extension or addon to install - the integration is the script tag below.

Register the domain first

Add your domain in the Inclusify panel before you paste the script tag. Bundles are built per registered domain, and an unregistered one fails silently: the script URL still returns HTTP 200, but what it serves is a single console.log saying the domain is not registered. There is no error to find and no widget appears.

Spartacus / Composable Storefront (Angular)

For Spartacus storefronts, add the script to your index.html:

src/index.html
<script src="https://app.inclusifyapp.com/w/YOUR-DOMAIN.com.js" async></script>

Add before the closing </body> tag, then rebuild and redeploy - Angular inlines this file at build time, so an un-rebuilt bundle keeps the old markup.

Accelerator (JSP)

For Accelerator storefronts, add the script near the end of the master tag file - the tag that wraps every responsive page, rather than a footer template of its own:

yacceleratorstorefront/web/webroot/WEB-INF/tags/responsive/template/master.tag
<script src="https://app.inclusifyapp.com/w/YOUR-DOMAIN.com.js" async></script>

Rebuild the storefront extension and restart the platform afterwards - JSP and tag files are cached by the application server.

Notes

  • • Works with SAP Commerce 2105 and later
  • • Works with Spartacus and its successor, SAP Composable Storefront - since 2211.19 the storefront is versioned in line with SAP Commerce Cloud, so there is no separate compatibility matrix to check for a script tag.
  • • Check the live storefront, not SmartEdit. SmartEdit renders the storefront in an iframe with a restricted CSP, so the widget can be missing from the authoring preview while working in production.

Verify the installation

  1. Rebuild and redeploy after editing index.html — Spartacus inlines it at build time, so an un-rebuilt bundle keeps the old markup.
  2. For SSR deployments, confirm the server-rendered HTML contains the tag by using View Source rather than the DevTools element inspector.
  3. Load a product detail page and a cart page, not just the home page.

Widget bundles are served from a CDN and cached for a few hours. If you changed widget settings in the panel and the site still shows the old configuration, wait for the cache to expire or load the script URL directly with a cache-busting query string (`?v=2`) to confirm the new version is being served.

Troubleshooting SAP Commerce Cloud installs

The tag is in index.html but missing from the deployed site.
The Angular build was not rerun. Run the production build and redeploy — Spartacus does not read index.html at runtime.
The widget does not load under server-side rendering.
SSR serves pre-rendered HTML from the Node server. Restart the SSR process after deploying so it picks up the new bundle.
The widget is missing inside SmartEdit.
SmartEdit renders the storefront in an iframe with a restricted CSP. This affects the authoring preview only; check the live storefront instead.
Nothing changes on an Accelerator storefront.
JSP and tag files are cached by the application server. Rebuild the storefront extension and restart the platform, then clear the browser cache.

SAP Commerce Cloud questions

Which SAP Commerce versions are supported?
2105 and later, on both Spartacus and Accelerator storefronts. The integration is a plain script tag, so the constraint is where you can add markup, not the platform version.
Spartacus or Accelerator — does the method differ?
Only in which file you edit. Spartacus takes the tag in src/index.html and requires a rebuild; Accelerator takes it in the master tag file and requires an extension rebuild and platform restart.
Does it work with server-side rendering?
Yes. The tag is part of the document shell, so it is present in the SSR output and the browser loads the widget after hydration.
Do I need a CSP change?
If your storefront sets a Content Security Policy — common on Spartacus deployments behind a CDN — add the widget host to script-src.

Related