How To: Setup Email Trigger Rules

Page approved.




WARNING icon
Creating and Editing Email Trigger Rules is an Advanced User feature.

Email Trigger Rules prompt the system into creating and in some instances automatically sending emails from Khaos Control. They are used in conjunction with Message Templates.

  1. Open an Email Manager screen (show me how).
  2. Press the Trigger Rules radio button and click "GO" to display existing trigger rules.
    Note: existing trigger rules can be opened by double clicking on them in the list.
  3. Press Ctrl+N or click the New item icon is the button bar's NEW button to create a new trigger rule.
  4. Assign a code to the trigger rule and enter this in the "Rule Code" field.
  5. Add a trigger rule description in the "Rule Description" field.
  6. Select the desired type from the "Trigger Type" drop-down to define the area here this rule is to be triggered:
    • CAT REQUEST: for emails generated in relation to something happening in the cat request process. The following conditions will populate the left-hand "Available Conditions" grid below:
      OLD STATUS
      NEW STATUS
    • INVOICE: for emails generated in relation to something happening the Invoice Manager. The following conditions will populate the left-hand "Available Conditions" grid:
      COMPANY CLASS
      CONSIGNMENT REF
      COURIER
      COURIER GROUP
      CUSTOMER COUNTRY
      CUSTOMER OPTIONS (these are from the Additional Options on the company screen)
      EXPORT TYPE
      FIRST INVOICE
      INVOICE PRIORITY
      SALE SOURCE
      SITE
      SORDER BRAND
      SORDER TYPE (e.g. Credit Note, Proforma Order, Quotation, Sales Order)
      UDA COMPANY
      UDA STOCK
      OLD INVOICE STATUS (i.e. Sales Invoice manager stage)
      NEW INVOICE STATUS (i.e. Sales Invoice manager stage)
    • PURCHASE ORDER: for emails generated in relation to purchase ordering. The following condition will populate the left-hand "Available Conditions" grid below:
      UPDATE STATUS
    • RETURN: emails are sent when the return is saved, see How To: Setup and Send Return Emails. The
      MULTIPLE REASONS: this is a checkbox and does not limit the return to single return reasons, for example when multiple items have been returned.
      RETURN BRAND: the brand from the customer's return.
      RETURN REASON: the single return reason as setup in System Data.
    • SO ACKNOWLEDGE: for Sales Order Acknowledgements (Basic Reports Version) emails generated in relation to something happening the Invoice Manager. The following conditions will populate the left-hand "Available Conditions" grid:
      COMPANY CLASS
      CONSIGNMENT REF
      COURIER
      COURIER GROUP
      CUSTOMER COUNTRY
      CUSTOMER OPTIONS (these are from the Additional Options on the company screen)
      EXPORT TYPE
      FIRST INVOICE
      INVOICE PRIORITY
      SALE SOURCE
      SITE
      SORDER BRAND
      SORDER TYPE (e.g. Credit Note, Proforma Order, Quotation, Sales Order)
      UDA COMPANY
      UDA STOCK
      OLD INVOICE STATUS (i.e. Sales Invoice manager stage)
      NEW INVOICE STATUS (i.e. Sales Invoice manager stage)
    • SOURCE SAFE: used for technical purposes on some systems.
  7. Select the message template that is to be used with the trigger rule.
  8. Tick the "Subscribers Only" checkbox to only send the email to customers with E-Mailing List Subscriber ticked in their [ Customer |Detail | Address ] tab.
  9. Tick the "Attach PDF" checkbox to attach a copy of the document (report) to the email.
  10. Tick the "Send Email Immediately" checkbox if the email is to be automatically sent and not held in the Pending emails section.
  11. Tick the "Active" checkbox when you wish the Trigger Rule to be enabled.
    Note: this may be after you have finished creating and testing the Trigger Rule.
  12. Add the required available conditions to the right-hand "Active Conditions" grid using the BtnEmailArrow.jpg button.
  13. Enter the appropriate comparison symbol:
    • <: less than
    • <=: less than or equal to
    • =: equal
    • >: greater than
    • >=:greater than or equal to
    • <>: NOT
  14. For each condition:
    1. click in the "Lookup Value" column and press Ctrl+F8 to display the "Make a Selection" dialog box.
    2. Select the desired criteria from the dialog's drop-down selection box and press "OK"; the criteria will then be shown in the right-hand "Active Conditions" grid.
  15. Repeat as required to add another condition.
    Note: All active conditions have to be true at the same time in order for the rule to work; see examples below.
  16. Press Ctrl+S or click the disk icon is the button bar's SAVE button    to save the Trigger Rule.

Manually Sent Emails

Not all areas have the ability to send automatic emails, these Trigger Types are:

Examples

Rules that work

Example One

The following trigger rule examples will work.
The old invoice status was equal to ORDERS - AWAITING STOCK, the new invoice status is equal to ORDERS - RELEASED and this is for all customers with a Company Class of Retail.

This screenshot is intended to illustrate the tutorial example and may not show all the options available in the current version of Khaos Control.

Example Two

When a new Purchase Order is created it will be emailed to the supplier.

This screenshot is intended to illustrate the tutorial example and may not show all the options available in the current version of Khaos Control.

Rules that don't work

Example Three

The following trigger rules will NOT work.
The old invoice status was equal to ORDERS - AWAITING STOCK and the new invoice status is equal to ORDERS - RELEASED and the Company Class of the customers is Retail and the Company Class of the customers is Personal. Customers cannot belong to more than one Company Class. A separate trigger rule would need to be created for each company class.

This screenshot is intended to illustrate the tutorial example and may not show all the options available in the current version of Khaos Control.

Example Four

The old invoice status was equal to ORDERS - AWAITING STOCK and ORDERS - AWAITING DATE and ORDERS - MANUAL HOLD and ORDERS - TERMS HOLD and the new invoice status is equal to ORDERS - RELEASED. This will not work because orders cannot be in all four stages in the Future Folder at the same time. Four separate trigger rules would need to be created for each stage in the Future folder.

This screenshot is intended to illustrate the tutorial example and may not show all the options available in the current version of Khaos Control.

See Also

Visit KhaosWikiX at https://support.khaoscontrol.com/wiki_kcx/ to see the following:

Contact the Khaos Team