Cert++
Close

IDE extensions and command-line tools for uploading cartridges

Key Takeaway

Prophet Debugger uploads cartridges into the code-version set in dw.json. The codeversion in launch.json is for debugging, so it does not change the upload target.

You write B2C Commerce cartridges on your own machine and then upload them into a code version on a sandbox. IDE extensions do the upload, such as the Prophet Debugger for Visual Studio Code. Command-line tools also do it, such as sgmf-scripts, dwupload and sfcc-ci. Most of these tools read the connection details from a small file called dw.json. For those tools, the values in that file decide which sandbox and code version receive your code.

What dw.json holds

Each upload tool needs to know three things: which sandbox to connect to, which user to log in as, and which code version to upload into. Prophet Debugger, dwupload and the SFRA upload script read all three from dw.json. Here is a sample file:

{
  "hostname": "my-sandbox.example.com",
  "username": "dana.lee",
  "password": "example-password",
  "code-version": "version1"
}

The sample shows the four main values in a dw.json file:

  • hostname: the fully qualified domain name (FQDN) of the sandbox, without https or http.
  • username: a user with Site Development rights.
  • password: that user's password.
  • code-version: the code version to upload into, for example version1 for a new sandbox.

The file can also hold an optional cartridge array. Put dw.json in the top-level folder of the repository, as a sibling of the cartridges directory. In the SFRA repository, the file goes at the root of the project. The file must be valid JSON.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Given a sandbox environment, configure an IDE to use WebDAV to deploy cartridges to the correct version directories

0/6

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers. 796 members and growing.