If you are using SalesForce Commerce Cloud (SFCC) as a CRM for your website, you won't have access to the root of your website to upload Batch's Service Worker.
Here are the necessary steps to complete the web push integration with SFCC:
1. Add the Service Worker
Step 1. Create an SFCC object
First, you need to create an SFCC object with the type « Content Asset » (for example "ServiceWorker-GetFile").
Step 2. Create an alias of the route to the Service Worker
Create an entry in "Business Manager" → "Merchant Tools" → "SEO" → "Aliases".
This entry must route "/batchsdk-worker-loader.js" to the Content Asset created in Step 1 (e.g. "ServiceWorker-GetFile"):
"your-host" : \[
The service worker should now be available here: https://mywebsite.com/batchsdk-worker-loader.js
Once the Service Worker is added, you can complete the integration by following this guide: How can I integrate web push into my website?
This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.