Triggers Form
A Trigger is a stored procedure that runs automatically when a row is inserted, updated, or deleted in a table. In Deacom, triggers serve two purposes:
- Notifying Users or User Groups, via email, when changes to a system table are made. Examples include the creation of a new Vendor record or updates made to a product formula
- Creation of EDI output files used for EDI exports such as 810 Invoices.
Triggers are very useful for notifying users when changes or updates to important tables have been made in the system.
Once the Edit Trigger form has been completed and saved, the Trigger setup process is complete. The Trigger will run automatically and produce the appropriate output, either EDI files or emails, whenever transactions are run that insert, update, or delete rows in the table indicated on the Edit Trigger form.
Notes:
- Anytime changes are made to the trigger via the Edit Trigger form, the automation console or service should be stopped and then restarted.
- Changes to the fields in System Options are immediately available to Triggers without requiring a restart of the automation console or service.
System Navigation
System > Maintenance > Triggers
Edit Trigger form
General tab
Button/Field/Flag |
Description |
---|---|
Copy Trigger |
Allows the user to copy another Trigger to use as a base to create a new Trigger. |
Show Fields |
Displays lists of fields and variables that can be used in the Trigger. |
Name |
Defines the name of the Trigger, which must be unique. |
Trigger Event |
Pick list used to define when the Trigger will fire. Options are:
|
Table |
Pick list used to indicate the Deacom table that will be used as the source of the Trigger. |
Output |
Pick list used to select the result of the Trigger firing. Options are:
|
Subject |
Information or text that will populate the subject line of the email.
|
Destination |
Address for email or folder for EDI file or, when the "Output" field is set to "HTTP POST," the URL where the trigger will post.
|
CC Email |
Address for an email to be sent a carbon copy, which will be present on the recipient's header. Only available when Output is set to "HTML Email" or "Plain Text Email". |
BCC Email |
Address for an email to be sent a blind carbon copy, which will not be present on the recipient's header. Only available when Output is set to "HTML Email" or "Plain Text Email". |
Conditions |
Defines the conditions that must be met to fire the Trigger.
|
Message |
Message body for email or contents of EDI file.
|
Delivery Expression |
Used to enable a delayed action in a Trigger. In other words, it is used to hold the expression to calculate the date and time when a Trigger should fire.
|
Delivery Condition |
Designed to handle situations where reminders to a Vendor need to be sent at various times and on various dates.
|
Custom Query |
Memo field used to define a custom query that allows greater functionality.
|
Notes |
User can add various notes to the Trigger such as identifying the author or for code explanations. |
FTP Server |
Only available when selecting an "Output" of "EDI." Defines the address/location of FTP server. |
SFTP Port |
Port number used for clients who use the Secure File Transfer Protocol. This field will only be used for SFTP and only when it is set to a port number. (greater than 0)
|
FTP User Name |
Only available when selecting an "Output" of "EDI." Defines the unique name of the user for accessing the FTP server. |
FTP Password |
Only available when selecting an "Output" of "EDI." Defines the unique password of the user for accessing the FTP server. |
File Encoding |
Pick list that allows users to enable a file encoding type of UTF-8 or Windows Code Page 1252.
|
Active |
If checked, the Trigger is active and will fire according to the conditions set. |
Template |
If checked, this record is used as a template to create other Triggers via the "Copy Trigger" button.
|
Add Line Feeds After Line Items |
If checked, the system creates a new line in the message for every new line item on a Sales Order. |
Accept Invalid Certificates For FTPS |
Only available when selecting an "Output" of "EDI." If checked, indicates that system will accept invalid SSL certificates.
|
SSH Protocol |
Only available when selecting an "Output" of "EDI."
|
Attachments tab
The Attachments tab allows customers to attach and send Grid Layouts, as MS Excel files, or Report Layouts, as PDF files, when using email Triggers. The tab can also be used to place Grid Layouts or Report Layouts in the path specified in the "Destination" field on the form when using an "Output" type of "EDI." Grid Layouts or Report Layouts may be attached to trigger emails when using either the "HTML Email" or "Plain Text Email" option in the "Output" field on the General tab. The name of the MS Excel or PDF file will be the same as the text specified in the "Subject" field. See the Sending attachments and reports using Triggers help section for more information on the process.
Button/Field/Flag |
Description |
---|---|
Grid Layout |
Search box used to select the Grid Layout that will be attached to the trigger email or placed in the location specified in the "Destination" field on the General tab of this form. The list contains all active Grid Layouts in the system.
|
Print Out |
Search box that displays active Report Layouts based on the entry made in the "Table" field on the General tab. For example, if the Job Header (dtjob) table is selected, only Report Layouts with a type of "Job" will be visible in the list.
|
Export To Excel |
If checked, the Grid Layout that is emailed or placed in the Destinations location will be in MS Excel format.
|