Develop With Your On-Demand Sandbox

This guide walks you through how to work directly with APIs to set up an ODS with your code and data using sfcc-ci. You can also use a third-party IDE, for example: Prophet Debugger.

To quickly get started using a PWA Kit demo site and demo data, see Create an On-Demand Sandbox for PWA Kit.

Only existing customers can access some of the links on this page. Visit Salesforce Commerce Cloud GitHub Repositories and Access for information about how to get access to the Commerce Cloud repositories.

  1. Create your ODS and log in:
    1. If needed, install sfcc-ci.
    2. Create an API client to use with sfcc-ci. See Authorization for Admin APIs.
    3. Authenticate using either of the following sfcc-ci commands:
      • sfcc-ci auth:login {client_id}
      • sfcc-ci client:auth {client_id} {client_secret}
    4. Create your ODS.
      • Specify a sandbox on the abcd realm with an unlimited time to live. sfcc-ci ensures the WebDAV and OCAPI permissions are pre-configured using the client_id from authentication.
      • sfcc-ci sandbox:create -r abcd --ttl 0
    5. Validate your sandbox is started:
      • sfcc-ci sandbox:get -s [sandbox_id]
  2. Zip up your cartridges:
    • Use your preferred tool to create a zip file of your cartridges. The zip should contain a top level folder with the code version name. In this folder should contain the cartridge folders.
    • Your .zip file name must exactly match the top level folder name inside the .zip file, for example if your code version is version1 the zip should be called version1.zip
  3. Upload and activate your code version. For the .zip file, use the same name that you used for the code version.
    • sfcc-ci code:deploy code_version.zip
    • sfcc-ci code:activate code_version
  4. Upload and import your site data:
    • sfcc-ci instance:upload archive.zip -i abcd-001.dx.commercecloud.salesforce.com
    • sfcc-ci instance:import archive.zip -i abcd-001.dx.commercecloud.salesforce.com
  5. Run a job to refresh your indexes:
    1. Choose a job, for example, Full Product Index Update.
    2. Specify the job you selected and a site scope. For example, if you selected the Full Product index update job:
      • sfcc-ci job:run sfcc-search-index-product-full-update SiteScope='{"named_sites": ["RefArch"]}' -i abcd-001.dx.commercecloud.salesforce.com
  • If you receive errors:
    • Make sure the code version information used in your .zip file name exactly matches the name of the top level folder inside of the .zip file.
    • When importing your data, make sure your .zip file archive, also known as the “site import archive”, has the required folder structure.

If you are using SCAPI: see