On-Demand Salesforce Commerce Cloud boxes can be using sfcc-ci or native SFCC’s swagger. I am going to jot down steps using sfcc-ci
1. sfcc-ci is available in GitHub, https://github.com/SalesforceCommerceCloud/sfcc-ci
2. You could clone the repo or use npm to install.
3. Create dw.json in your visual studio code workspace and if you are trying to run behind the firewall, set “self-signed”: “true”
{ “client-id”: “xxxxxxxxxxxxxxx”, “client-secret”: “”, “self-signed”: “true”, “hostname”: “”, “username”: “”, “password”: “”, “realm”: “xxxx” }
You have successfully setup sfcc-ci and now good to use the command-line interface to access on-demand SFCC Sandbox.
I commonly use these CLI commands.
- To authenticate the realm
sfcc-ci auth:login
2. To list sandboxes in your realm
sfcc-ci sandbox:list
3. To start the sandbox
sfcc-ci sandbox:start -s <realmID>-<sandbox number>
eg.usuallyrealmID is 4 character and sandbox number starts from 001
4. To stop the sandbox
sfcc-ci sandbox:stop -s <realmID>-<sandbox number>
eg.usuallyrealmID is 4 character and sandbox number starts from 001
5. To restart sandbox
sfcc-ci sandbox:restart -s <realmID>-<sandbox number>
eg.usuallyrealmID is 4 character and sandbox number starts from 001