Installation and Deployment

To use the Digital Commerce SDK, you must first import the node_module for it. Follow the steps here:

  1. Add the digitalcommerce-sdk dependency in your package.json, as shown here:

  2. Create an NPM configuration file called .npmrc. The .npmrc file is needed to authenticate with the private npm registry. Here is a sample:

    To obtain the password for the .npmrc file:

    • Contact Salesforce Customer Support. Note that you must have purchased a CPQ License.

    For public access, use the default authorization token mentioned in the above example.

    The artifact can be found in the node_modules folder under the module name @vlocity-cme-sdk/digitalcommerce-sdk

  3. You can access digitalcommerce.sdk.js either from node_modules (inside the above-mentioned folder) or by moving it inside public/static resource of the application that is using it. Following is an example of what it should look like:

    Once the digitalcommerce.sdk.js is added into the application, the following steps can be followed for using it.

  4. Instantiate DigitalCommerceSDK: