Utils Object - Functions Available

Utils Object - Functions Available

The functions available to the utils object to change depending on which script type is being used.  utils.log(), however, is available on all script types. Here are the script type-dependent utils functions.


.getOriginalCartonList() - returns the original Carton list being passed into Cartonization.
.setOutputCartonList(cartonList) - sets the list of Cartons that will actually be used by Cartonization.
.setShouldRunCartonization(true/false) - sets if Infoplus should run its internal Cartonization.
.cartonizationOutput() - Get the current Cartonization Output.
.createNewContainer(cartonId) - Adds a new Carton to the current Cartonization Plan and returns it.

External Shipping System

.getShippingSystemObject() - returns the original object that was going to be sent to the external shipping system.
.getOrderList() - returns the list of Infoplus Order objects corresponding to the order information being sent to the external shipping station.

Finance System Connection

.abort(reason) - stop the import or export process, for the specified reason.

Invoice Worksheet


Shopping Cart Connection Order

.stringToJson(s) - convert given string to JSON object.
.rejectOrder(reason) - stop processing an order from within a script for a specified reason.