Scriptable Cart Fundamentals and Set Up

With Scriptable Cart, SuiteCommerce developers can use SuiteScript to invoke client scripts on the sales order form used for website orders. Note that SuiteScript is not available for web store registration, but an SSP application can be used to customize a registration page. Essentially, Scriptable Cart is a SuiteScript file deployed to your NetSuite instance that activates when a sales order is created either on the Commerce website or in the backend UI. 

Scriptable Cart operates by listening for events in the client and performing actions when these events occur. Events are grouped into categories such as pageInit (after user login), fieldChanged (when a field is modified), postSourcing (after sourcing changes are made), validateLine (before an item is added or changed in the cart), recalc (after changes in cart contents), and saveRecord (before the sales order is saved). You don’t have to use these exact event names in your scripts, but using similar names is recommended for maintenance purposes. 

Scriptable Cart is useful when a needed customization cannot be achieved through an extension or SuiteCommerce/SCA customization. Examples include running customization code on both the Commerce website and the UI or modifying an item rate. Scripts can run during checkout on a SuiteCommerce or SCA website, or when staff place orders in the NetSuite UI, but they typically execute in only one location. 

To set up Scriptable Cart, an administrator must enable certain features in NetSuite. This involves selecting options in the Enable Features page and enabling the Scriptable Cart and Checkout option in the website setup.

Leave a comment

Your email address will not be published. Required fields are marked *