Salesforce Commerce Cloud
Add Inclusify to your Salesforce Commerce Cloud (SFCC) storefront using SFRA templates.
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.
SFRA Installation
There is no Inclusify cartridge to install. The integration is the plain script tag, added to the SFRA footer template through your own cartridge.
Overlay the footer template
SFRA renders the footer from pageFooter.isml in the base cartridge:
cartridges/app_storefront_base/cartridge/templates/default/components/footer/pageFooter.ismlDo not edit it there. Copy it to the same relative path inside your own cartridge and edit that copy, so an upgrade to the base cartridge cannot overwrite your change.
Add Widget Script
Add the script at the end of the template. The footer template does not contain the closing </body> tag - that lives in the page layout - but the footer is the last thing the layout renders inside the body, which is close enough for an async tag.
<script src="https://app.inclusifyapp.com/w/YOUR-DOMAIN.com.js" async></script>Deploy
Deploy your cartridge to your sandbox or production instance, and make sure it sits ahead of app_storefront_base in the site’s cartridge path, or the base template still wins.
Notes
- • Works with SFRA and SiteGenesis. Only the template you edit differs - SiteGenesis does not have this path.
- • PWA Kit storefronts render React, not ISML. Use the React / Next.js guide for those.
- • This is a script tag, not a Salesforce cartridge or AppExchange listing. There is nothing to install on the B2C Commerce side.
Verify the installation
- Deploy the cartridge to your sandbox first and load a product page there before promoting to production.
- Confirm the cartridge containing your override is present in the site's cartridge path under Administration → Sites → Manage Sites.
- Invalidate the page cache in Business Manager after deploying, then reload the storefront.
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 Salesforce Commerce Cloud installs
- The template change deployed but the storefront is unchanged.
- Your cartridge is not ahead of app_storefront_base in the cartridge path, so the base template still wins. Reorder the path under Administration → Sites → Manage Sites → Settings.
- The script is blocked in the browser console.
- SFCC enforces a Content Security Policy configured per site. Add app.inclusifyapp.com to script-src under Merchant Tools → Site Preferences → Content Security Policy.
- Changes appear on sandbox but not production.
- Production serves from the page cache. Invalidate it under Administration → Sites → Manage Sites → Cache, then retest.
- The footer template path does not exist in your project.
- SiteGenesis uses a different structure to SFRA. On SiteGenesis the equivalent is htmlHeadIncludes or the footer include under templates/default/components/footer.
Salesforce Commerce Cloud questions
- Should I edit app_storefront_base directly?
- No. Overlay the template in your own cartridge and place that cartridge ahead of the base in the cartridge path, so upgrades to the base cartridge do not overwrite your change.
- Does this work with PWA Kit?
- PWA Kit storefronts are React applications and do not render ISML. Add the script the way you would in any React app — see the React / Next.js guide.
- Do I need a CSP change?
- If your site has a Content Security Policy configured in Business Manager, yes: the widget host has to be listed in script-src, or the browser blocks the request.
- Does it work on SiteGenesis?
- Yes. The script tag itself is architecture-agnostic; only the template you edit differs.
Related
- Script installation — generate the embed code for your domain.
- Customization — position, colour and size of the widget button.