Email Trigger Dialog
Data Query is an Advanced User feature. |
The Email Trigger dialog is displayed by clicking on the button in the top right of the Data Query and is only available when an SQL query has been loaded into the Scripting area. The dialog enables the user to automate the running of the SQL reports and email internally or externally or upload reports to a specific FTP folder.
If you would like an SQL report to be written to be used with an email trigger please email Development with your request.
- Description: the name of the SQL report that has been loaded. This can be edited in the dialog but it does not update the name in the Reports pane to the left.
- Email Template: all the Email Templates as set up in the Email Manager.
- Email Doc Type: the email address that will be used and that is setup in the Company Email Addresses dialog found in the
[ Customer | Detail | General ]
screen. The options are:- Sales Invoice
- Sales Delivery Note
- Return
- Statement
- Payment Remittance
- Purchase Order
- Execute Trigger:
- Period: allows the user to set the number of days between executions of the trigger, for example 1 which equals 1 day, 2 = 2 days etc. You can also have 0.5 for twice per day.
- Day of Month: allows the user to set a specific day of the month on which the workflow will be triggered.
- Last Executed: the date and time the trigger was last run.
Note: it is possible to set a Last Executed date that's in the past in order for the next weekly / monthly run to then run at the correct point going forward, as well as on the first occasion it runs. - Execute Period: the number of days between execution of the trigger.
- : sets the date and time to the current day and time when the button is pressed.
- Next Executed: the date and time the trigger is next due to be run.
- : runs the trigger immediately and will then auto-update next executed time.
- Internal Email Address: if using SQL reports to send to internal addresses for example; to send a list to the customer services department of the quotes that are over # days old and need chasing or to inform the purchasing department of the back order requirement.
- File Name Template: is how the filename for each report should be laid out followed by the tag $SEQUENCE, see next field.
- Sequence Format: stores how the sequence will be displayed. The format should be in the form %.Xd, where X is numeric value. The digit can be removed completely from this to just give a file with the sequential number and no padding. A simple example of this is %.6d, which translates to a number preceded by six zeroes. For example: 0000001, 00000067 etc.
- Trigger Application:
- Any: either of the below adjacent triggers.
- Khaos Control: triggered internally by Khaos Control.
- Command Line: if the trigger can be activated using a Command Line prompt.
- : deletes the data query for the report.
- Send Immediately (default=unticked): sends the email when it is created as a result of the trigger.
Note: if Send Immediately is unticked and Disabled is unticked then the email will go into Pending in the Email Manager. - Consolidated Report: when ticked, if the company has more than one result they are combined.
- FTP: enables the which opens the Supplier FTP dialog:
.
When this option is ticked the system will automatically tick the 'Consolidated Report' checkbox and un-tick the 'Send Immediately' checkbox. For an example of how to use this see How To: Upload Reports to a Specific FTP Folder on a Regular Basis. - Rollup: The Rollup tickbox is exclusive to the other options. When ticked, the report result can be grouped by the fields defined in the rollup fields (below the tickbox) and will generate one email per rollup
- Save to folder only: allows users to set workflow reports to save the output to a folder instead of being sent via FTP or email. This functionality can be used to set the location as a shared folder (Dropbox, Google Drive, One Drive, etc) or a local drive (C:\Documents).
- File Format:
- PDF: exports a pdf.
- CSV: will export a comma-separated values (CSV) report which will open in a spreadsheet.
- TSV: will export a .csv file but will use 'tab' indents as delimiters as opposed to commas which will open in a spreadsheet.
- Tab Align: will export a tab aligned .txt file which will open in a spreadsheet.
- CSV Quoted: exports a CSV file with fields enclosed in double quotes which will open in a spreadsheet.
- Disable checkbox: disables the workflow trigger, it can be enabled at a later date if required.
- Force Blank: allows a blank Data Query report to be sent out as an email attachment. Normally if there are no results after a Data Query has been run, then the system would normally not send out the results. This option allows you to do this.