The ssp_libraries.js File

This topic applies to

Applies to

SuiteCommerce Advanced

The ssp_libraries.js file contains the server-side JavaScript code used by SuiteCommerce Advanced. When you deploy SuiteCommerce Advanced to NetSuite, the gulp task installs this file in the SSP Application.

When compiling the application, the gulp tasks generate the ssp_libraries.js file by combining all of the following:

  • Backend models — includes all of the backend models defined in the application modules.

  • SspLibraries module — contains JavaScript files that provide server-side methods and utilities used by the backend models. This module includes the following files:

    • Application.js — defines functions for interacting with SuiteScript and the Commerce API. These functions obtain context and environment information from NetSuite. This file also provides methods for sending HTTP responses and errors and methods for returning paginated results.

    • Configuration.js — defines backend configuration for SuiteCommerce Advanced. For more information, see Backend Configuration.

    • Console.js — creates the server-side console used to access to the SSP application.

    • Events.js — defines the core utilities and base classes to create high-level back-end entity models used by services.

    • Models.Init.js — defines global variables available to all backend models.

    • SC.Models.js — defines the base class used by backend models.

    • Utils.js — defines global utility methods that perform server-side tasks, including searching records and formatting currencies.