Salesforce Commerce Node.js SDK
commerce-sdk is a Node.js SDK for Salesforce Commerce. It provides easy access to the Salesforce Commerce platform RESTful APIs.
It is a mono repo containing the tools needed to be a rockstar commerce developer on the Salesforce Commerce platform.
Visit the Commerce Cloud Developer Center to learn more about Salesforce Commerce. The developer center has API documentation, getting started guides, community forums, and more.
The generator package is responsible for generating the SDK from RAML files. Since the SDK is generated it is not a part of any repository. Read more about the SDK here and how the generator works here.
The Core package represents the core functions that call the APIs and interact with Salesforce Commerce. It is used by the SDK. Read more about the core package here.
The exchange-connector package downloads RAML files from Anypoint Exchange to build the SDK. It is used by the generator but not the generated SDK. Read more about the exchange-connector package here.
All of these commands can be run from either the repo root or the package root.
# To setup
npm install
# To build
npm run build
Note: Instructions in the Setup section are prerequisites for this section
To run tests in all the packages, execute
npm test
To print the detailed test results and errors on the console, execute
npm run test:debug
To run tests in the core package only, execute
npm run test:core
To run tests in the exchange-connector package only, execute
npm run test:ec
To run tests in the generator package only, execute
npm run test:generator
First, check the open issues and Commerce Cloud Developer Center for any open issues related to the issue that you are experiencing. If not already raised please file a new issue here with all the necessary details. If you require an urgent resolution to your issue please ask your AM/CSM to file a support ticket with Salesforce Commerce.
If you would like to contribute please take a look at our contributors' guide.