Triggers

General / System Triggers [TIL005]

Triggers are one of our Selective Architecture components and was recently updated (within version 23.3), which allows users to access Triggers from the front end of DATASCOPE WMS. The System Trigger module replaces our previous rudimentary trigger system (version 23.2 and lower), which required manual file editing in the background. It now features a user-friendly interface, and users can use this module for standard VBScripts editing or as part of the new Task Management module.

 System Triggers form part of the base installation, and no additional licensing is required.

Triggers are asynchronous calls that hook into specific areas of the software and are then typically used to fire off an event, such as a 3rd party software solution or an email that is generated on a particular event (such as a transaction)

 An excellent example of using a trigger is as follows. One of our DSPs developed software to build the required EDI XML file and then posted this to Cadacus (SYSPRO Shipping) for every dispatch note. They then configured a trigger from DATASCOPE WMS to fire after every dispatch note was processed within the DATASCOPE WMS software. This trigger fires off the DSP’s software and passes the newly created dispatch note number to the 3rd party EDI software.

If you don’t like reading, you can watch the video.

Try it!

Prerequisites

  • VBScript developer skills

  • DATASCOPE WMS version 23.3

Location

Before enabling a script for a specific event, you must copy the Sample VBScript files from the Sample folder to the Trigger folder. This ensures that the core VBScript doesn’t change, and you can do further customization on the copied version.

To copy the Triggers:

  • Open Windows Explorer on the box where the application DATASCOPE PREMIUM WMS, is installed.

  • Browse to Program Files (x86) / DATASCOPE / DATASCOPE WMS WebAPI / Triggers / Samples

  • Copy the required script files from the Sample filter to the Trigger folder.

Copy scripts from Samples folder
Content of Trigger folder on clean install

README

A README file is a text file that introduces and explains a project. It typically contains information that is commonly required to understand what the project or code is about.

The Trigger README file contains vital information about how Triggers within DATASCOPE WMS work, including a list of all available Triggers.

The README file is located within the Triggers folder.

Linking Scripts to a Trigger (v23.3 onwards)

  • From the Main Menu, browse to General / System Triggers

  • The System Triggers screen will open.

  • This new System Triggers interface incorporates all our existing VBScript and the new Task Management VBScript.

  • There are a couple of columns within the data grid to take note of:

o   System Trigger – this refers to the VBScript name that is called.

o   Description – This is a detailed description of the script.

o   VB Enabled – this tick box cannot be checked, but it will be checked if the script is linked to a trigger.

o   Task Enabled – this tick box cannot be checked, but it will be checked if a task is linked to a trigger.

o   Warehouses – this column will list all the warehouses where the specific Trigger will work.

o   Edit – this link can be selected to edit a specific trigger.

Let us look at the Trigger Maintenance screen when you select the Edit link in the data grid. Typically, you will link up a specific VBScript with a specific Trigger (and if required, edit it).

  • Click on the Edit link next to one of the System Triggers you want to link the VBScript file.

  • The Trigger Maintenance screen for that System Trigger will open.

  • The System Trigger and the Description will be populated with the System Trigger name.

  • Select the warehouse(s) or All from the drop-down next to Warehouse. The selected system trigger will then only work in the selected warehouses.

 If existing VBScripts must be edited, users will enable the VBScript section and link the applicable VBScript.

  • Select the Enabled check box under the VB Script heading if a specific script must run.

  • The VB Enabled checkbox on the System Trigger screen will be ticked.

  • Select the Script File from the drop-down menu and select the applicable VBScript that must run. You must have copied it from the Sample folder to the Trigger folder first.

  • Select the Script file that must be linked to the trigger.

 The System Triggers module links a specific Trigger (for example PickingSlipCreation) to a specific Event.

Linking Scripts to a Trigger (before v23.3)

To access and configure Triggers before the 23.4 release, users must browse to the following folder on the software server: C: / Program Files (x86) / DATASCOPE / DATASCOPE WMS WebAPI / Triggers.

This folder will only have a Samples folder and the README.txt file in it.

 

Users will locate the required Trigger name within the README.txt file, create a .vbs file under the Triggers folder, and edit it according to the business requirement.