Utility Functions
B2C Commerce includes utility functions used frequently in templates. See the B2C Commerce Script API documentation for more information.
- Object: dw.system.Request
Because you are working in a template, and templates use request as a top-level variable, you can immediately call methods of this object. - Object: dw.system.Session
Because you are working in a template, and templates use session as a top-level variable, you can immediately call methods in this class. - Object: dw.util.StringUtils
The Template Processor pre-imports dw.util.StringUtils, so the StringUtils class can be used within a template by its simple name. - Object: dw.web.URLUtils
The Template Processor pre-imports dw.web.URLUtils, so the URLUtils class can be used within a template by its simple name.
Infocenter Retirement: On June 30, 2023, the Infocenter was retired, and documentation currently hosted on the Infocenter will be published to Salesforce Help, Commerce Cloud Developer Center, and Salesforce B2C Commerce Developer Documentation Resources. For more information, see the release note.