Scheduled scripts are used to automate tasks related with purchase and service. Active scheduled scripts are started automatically in defined time or interval to check if any items are needed to acquire or send to service.
This article describes how to work with scheduled scripts with predefined rules (“classic” scripts). For information about scripts offering more versatile rule definition see custom scheduled scripts.
Setup scheduled script
There are two types of scheduled scripts – purchase scripts and service scripts. For each type rules must be set to define when the action is triggered.
To setup new scheduled script, unique name must be entered. Enter the name and select script type (purchase order, service). Based on selected type different rules can be selected (see purchase script rules and service script rules for more details). Specify additional options as follows on general tab.
Option name | Functionality |
Custom order ID prefix | Specifies if orders created by this script will have custom order ID prefix instead of Default order ID prefix set on vendor detail. |
Custom Ship to ID | Specifies if orders created by this script will have custom Ship to ID information instead of default Ship to ID set on vendor detail. |
Custom Customer number | Specifies if orders created by this script will have custom Customer number information instead of default Customer number set on vendor detail. |
Create order for stock/vendor combination | If this option is selected, all orders created by this script will be created on stock level (one order will contain more devices of one stock) and vendor. If left blank, separate orders will be created for each device and vendor. |
Create order as ”Suggested” | If option is selected, all orders created by this script will be set to state ”Suggested”. To send this order to vendor, user must manually change status to ”Active”. If left blank, script will automatically set order to ”Active” state and send it to vendor based on selected options (if minimum order value is reached or maximum order value is not exceeded as set on vendor, otherwise order is set to ”Suggested” state). |
Item classification | This option specifies what items will be checked against selected rule(s). Item classification can be set on item detail. At lest one classification must be selected. |
Run script at | Specifies how often this script is started. Interval or Scheduled time can be selected. To define script properly, enter all mandatory information for selected option. |
Start date | Specifies day for the first run (script will not be started before this day automatically). |
End date | Specifies day for the last run (script will not be started after this day automatically). |
When all general information is entered and script is saved, target vendors and devices can be defined to restrict script to check only items of specific vendors or items in specific devices. If no vendor or device is selected, no restrictions are applied.
To select vendors or devices, select from available stocks first. Then using “Add” button search for vendor or device and confirm selection. To remove vendor or device from the list, select record and press “Remove” button.
Setup send channels
Each script can define, how orders created by this script will be provided to vendors. On “Send options” tab various channels and order formats can be selected. Orders created by this script will then carry the same sending options according the script who created them.
Activating scheduled script
When all necessary information for scheduled script are entered, script must be activated to allow its automatic start. To activate the script, select “Set active” option in the top menu. Once script is activated, it will be started in specified interval or time, or can be started manually by “Run script” option.
Result of script run can be checked in event log.