How to Create a Script
- Navigate to Shipping > Order Scripts.
- Click Create New Script at the top right.
- Select the Merchant whose orders will have this script applied.
- Enter a unique name describing the script's action or purpose.
- Select the scope where you want this script to occur. For instance, a user may only want the script to run from the ShipStream GUI and not from the API. Any combination of the two options may be chosen.
- Change the Is Active field to Yes if you wish to use the script after it is saved, or leave it as No to disable it for now.
- Set a sort order if using multiple scripts to decide where it should run among the other scripts.
- Click Save.
When a script is created from the GUI, then it is automatically executed before the order is placed, but directly after the user submits an order.
If your script contains semantic errors (such as a misspelled orders option) then a red Exception notification will appear to help you debug the issue with the line number of the error.
If the script is successfully executed then you should see no errors or warnings; only a green notification saying "The order has been created."