Skip to main content

Basics

Scripts

The scripts in Script Engine are written in plain JavaScript. There are no frameworks, browser APIs, or Node APIs available. That means no filesystem access, no networking, and no DOM API.

To make Script Engine meaningful there are a handful of functions that allow you to interact with data sheets and there are also limited networking capabilities.

Check out the script documentation for more information.

Connectors

Connectors provide external data to the Script Engine sandbox, such as spreadsheets or HTTP requests. These can be used to do the complex calculations that fit your business cases.

Check out the connector documentation for more information.

Connecting to Your Product

A script needs to be connected to a product for it to be used. This way a script can be used with multiple products.

When your product and script are set up and available in the Backoffice, navigate to the product and click on Configure → Pricing. Here you can set up pricing and SKU calculations.

Link Script to Product

For SKU calculations, open the dropdown that says "SKU Generator" and select "Script Engine." A new menu will show up allowing you to select your SKU script to use with the product.

For pricing calculations, check the box that says "Script Engine," in the "Price calculators" section. The same menu will show up here, allowing you to link your pricing script to the product.