sfcc configuration
Your service's config class extends CommerceCloudConfig with its own variables and loads it once at startup. Loading fails and names the variable when a required one is missing. A secret is removed from process.env once it is read.
import { type EnviConfig, envfield } from "@evolve-framework/config";import { CommerceCloudConfig } from "@evolve-framework/sfcc";
class Config extends CommerceCloudConfig { readonly HTTP_PORT = 8080;
config(): EnviConfig { return { ...super.config(), HTTP_PORT: envfield.number() }; }}
export const config = new Config();await config.load();CommerceCloudConfig
The Salesforce Commerce Cloud instance a service talks to, through a SLAS client. Extend it with the service's own settings.
import { CommerceCloudConfig } from "@evolve-framework/sfcc";| Variable | Description |
|---|---|
SFCC_CLIENT_IDrequired | The SLAS client's id. |
SFCC_CLIENT_SECRETrequired · secret | The SLAS client's secret. Removed from the environment once read. |
SFCC_SITE_IDrequired | The storefront site, as Business Manager names it. |
SFCC_ORGANIZATION_IDrequired | The organization id, such as f_ecom_zzzz_001. |
SFCC_SHORT_CODErequired | The short code in the instance's API host. |
Every service's variables on one page: Configuration.

