Shared Sandbox with Multiple Developers
- How to work on one sandbox with multiple users with having separate storefront sites in a Business Manager.
- - In most of the cases in SFCC, it is not recommended to work on a single sandbox by multiple developers as it is recommended way to work with one developer in a single sandbox but there is a way to use it in one sandbox with multiple developers where each developer having their own site which able to show changes using their respective custom cartridge.
— Here are the steps that should be followed to complete the setup.
Get Backup from Existing Sandbox (optional):
— Follow the below path in Business manager to get a backup (import sandbox data)
- Administrative -> Site Development -> Site Import & Export
- Go to Data Units to Export section and select sites and other required fields which you want to take as a backup and give some archive name to it and then click on Export.
- Then You’ll get it under Status as it is running a job with start time and status and check for if it is completed.
- Then scroll up and go to the Upload archive section and click on the newly created zip file link and click on it to download it to your local system.
Login to Another’s sandbox : (Restore the backup data to the new sandbox)
- first, unzip your downloaded backup zip file and then change the respective fields inside the file — folder name, Site ID name, and title name inside the site.XML file, and all the folder names having old names give a new site name. after changing all the names again zip a parent folder and then follow the same path to import the file inside the new sandbox that you want to use.
Get Anurag Singh’s stories in your inbox
Join Medium for free to get updates from this writer.
Follow the below path in Business manager to import sandbox data.
- Administrative -> Site Development -> Site Import & Export
- Go to upload Archive and select local and then click on choose file to choose a zip file and then click on import after the upload is completed select the same uploaded file and then click on the import option below.
- It will run a job with the status running or completed and after completion, you can see the changes inside the new sandbox.
- After that, you’ll see your site imported successfully inside the new sandbox and now you can select it to see its storefront.
Imp. Points to notice while doing this task -
- To login inside the Sandbox use the credentials which are provided by your organization, which are already configured with authentication and account canter, or you can log in using the other credentials if required.
- If you are creating new custom code in your existing workspace then you need to run these commands to set up a new custom layer over a base layer.
mkdir app_custom_sitename
cd app_custom_sitename
npm install –g sgmf-scripts
sgmf-scripts --createCartridge app_custom_sitename- you can run all these three commands (optional)
npm run compile:scss
npm run compile:js
npm run compile:fonts- Change the dw.json file which is available inside the SFRA code base and change the hostname to the newly respective sandbox URL, and also the code version.
// dw.json file
{
"hostname": "new-sandbox-url",
"username": "username@cloudodyssey.co",
"password": "pass",
"code-version": "current-code-version"
}- After creating a new custom layer in your workspace go to cartridge path inside site development and change the cartridge path as first your custom layer cartridge: base layer cartridge and then click on apply and then do prophet debugger to push all the cartridges to the sandbox and select the leave all code when you’ll get the pop up while uploading the code into the sandbox.
And then select your own site and make changes to see it in the storefront.
TheEnd.






