Difference between revisions of "Inbound Routing Rules"

From Hornbill
Jump to navigation Jump to search
 
(15 intermediate revisions by 7 users not shown)
Line 1: Line 1:
 +
This document can now be found at its new location in the [https://docs.hornbill.com/esp-config/email/using-email-routing-rules/ Hornbill Document Library].
 +
 +
[[file:hornbill-document-library.png|Hornbill Cloud|link=https://docs.hornbill.com/esp-config/email/using-email-routing-rules/]]
 +
<!--
 +
 
<div style="border:1px solid #90C0FF; background:#D0E0FF; width:99%; padding:4px; margin-bottom:10px;">
 
<div style="border:1px solid #90C0FF; background:#D0E0FF; width:99%; padding:4px; margin-bottom:10px;">
 
__NOTOC__[[Main Page|Home]] > [[Administration]] > [[System Administration|System]] > [[Email_Administration|Email]] > Email Routing Rules
 
__NOTOC__[[Main Page|Home]] > [[Administration]] > [[System Administration|System]] > [[Email_Administration|Email]] > Email Routing Rules
Line 16: Line 21:
  
 
== Routing Rules List==
 
== Routing Rules List==
 +
[[File:routingrule.png|thumb|300px|link=https://wiki.hornbill.com/images/0/0c/Routingrule.png|Email Routing Rule Form]]
 
From the list of Routing Rules there a few actions and some considerations to keep in mind.
 
From the list of Routing Rules there a few actions and some considerations to keep in mind.
 
:* '''Switching On or Off'''
 
:* '''Switching On or Off'''
Line 22: Line 28:
 
:: Clicking on the + in the tool bar will allow you to create a new rule.
 
:: Clicking on the + in the tool bar will allow you to create a new rule.
 
:* '''Ordering'''
 
:* '''Ordering'''
:: Once more than one rule has been created, the order of the rules can be changed by using the up and down arrows located on the right side of each rule. When an email is received, the routing rules will be processed in the order that they are listed, starting at rule 1. If a rule doesn't match it will then check the next rule. If no rules match the email will simply reside in the Inbox.   
+
:: Once more than one rule has been created, the order of the rules can be changed by using the up and down arrows located on the right side of each rule. When an email is received, the routing rules will be processed in the order that they are listed, starting at rule 1. If a rule doesn't match it will then check the next rule. If no rules match the email will simply reside in the Inbox.   
 +
:: '''Note:''' If a rule matches, but its action fails to complete, no further rules will be checked and the rule's ''Fail'' action will be followed.
 
:* '''Deleting a Rule'''
 
:* '''Deleting a Rule'''
 
:: The Delete option in the tool bar becomes available once one or more Rules are selected in the list
 
:: The Delete option in the tool bar becomes available once one or more Rules are selected in the list
 
<br>
 
<br>
 +
 
==Rule Expression==
 
==Rule Expression==
 
Each Routing Rule requires a Rule Expression which is used to validate information held within the email.  To help with setting up the Rule Expression a number of parameters have been provided in the Rule Parameters selector located at the top right of the Rule Expression field.  Selecting any of these items from the list will insert that Rule Parameter into the Rule Expression field.
 
Each Routing Rule requires a Rule Expression which is used to validate information held within the email.  To help with setting up the Rule Expression a number of parameters have been provided in the Rule Parameters selector located at the top right of the Rule Expression field.  Selecting any of these items from the list will insert that Rule Parameter into the Rule Expression field.
Line 31: Line 39:
 
:* toAddress
 
:* toAddress
 
:* toDomain
 
:* toDomain
 +
:* ccAddress
 +
:* ccDomain
 
:* fromAddress
 
:* fromAddress
 
:* fromDomain
 
:* fromDomain
Line 52: Line 62:
 
|-
 
|-
 
|LIKE
 
|LIKE
|subject LIKE '%abc' or LIKE 'xyz%' or LIKE '%mno%'
+
|subject LIKE '%abc' or subject LIKE 'xyz%' or subject LIKE '%mno%'
  
 
|-
 
|-
 
|NOT
 
|NOT
|subject NOT 'abc' or NOT ('abc' and NOT 'zyx')
+
|subject != 'abc'
  
 
|-
 
|-
Line 90: Line 100:
  
  
LEFT(“The Dog”, 3) = “The”
+
LEFT('The Dog', 3) = 'The'
  
 
|-
 
|-
Line 109: Line 119:
  
  
SUBSTRING(“The Dog”, 5) = “Dog”
+
SUBSTRING('The Dog', 5) = 'Dog'
  
  
SUBSTRING(“The Dog”, 5, 2) = “Do”
+
SUBSTRING('The Dog', 5, 2) = 'Do'
  
 
|-
 
|-
Line 124: Line 134:
  
  
RIGHT(“The Dog”, 2) = “og”
+
RIGHT('The Dog', 2) = 'og'
  
 
|-
 
|-
Line 141: Line 151:
  
  
CONCAT(‘The’, ‘ ‘, “Dog”) = “The Dog”
+
CONCAT(‘The’, ‘ ‘, 'Dog') = 'The Dog'
  
 
|-
 
|-
Line 148: Line 158:
  
  
REGEX_MATCH(“String to match”, “regex to test”)
+
REGEX_MATCH('String to match', 'regex to test')
  
  
This function is based on perl compatible regular expressions. Please see the following URL: -
+
This function is based on Perl compatible regular expressions. Please see the following URL: -
  
  
 
[http://www.pcre.org/ http://www.pcre.org/]
 
[http://www.pcre.org/ http://www.pcre.org/]
 +
 +
Example of a routing rule matching a request reference in the email subject: REGEX_MATCH(subject, '.*\b[a-zA-Z]{2}[0-9]{8}\b.*')
  
 
|-
 
|-
Line 164: Line 176:
  
  
This function is based on perl compatible regular expressions. Please see the following URL: -
+
This function is based on Perl compatible regular expressions. Please see the following URL: -
  
  
Line 175: Line 187:
  
 
STRING_REPLACE(''needle'', ''haystack'', ''string'')
 
STRING_REPLACE(''needle'', ''haystack'', ''string'')
 +
 +
|-
 +
| MESSAGE_HEADER
 +
| Return the value of one message header present in the email message being evaluated. If header is not present this will return NULL. Available in platform build 3801 onwards
 +
 +
 +
MESSAGE_HEADER('X-Header-Name')
 +
 +
 +
For example:
 +
 +
MESSAGE_HEADER('Message-ID') LIKE '%some.domain.com%'
  
 
|}
 
|}
Line 197: Line 221:
 
:*'''Target Folder Failure'''
 
:*'''Target Folder Failure'''
 
::In the case of a rule match but action failure the folder you would like the email routed to
 
::In the case of a rule match but action failure the folder you would like the email routed to
 +
:::In order to aid troubleshooting it is recommended that this is not set to "Inbox" as this will make it easier to distinguish between emails that were not picked up by a Rule (which will remain in the Inbox) and emails that were picked up but failed to process correctly (which will move to the Failure Folder)
 
:*'''Reference'''
 
:*'''Reference'''
 
:: This field can be used by the selected operation in order to correctly process the selected Operation.  Refer to the application specific documentation to determine if this is required.   
 
:: This field can be used by the selected operation in order to correctly process the selected Operation.  Refer to the application specific documentation to determine if this is required.   
Line 236: Line 261:
 
:*Update an existing Service Request
 
:*Update an existing Service Request
  
Note: For ''logOrUpdateIncident'', ''logOrUpdateServiceRequest'' and ''updateRequest'' operations the '''Reference''' field is a mandatory parameter. You will need to specify the Regex Syntax that matches your call reference.  E.g. for the standard out-of-the-box reference use: '''[a-zA-Z]{2}[0-9]{8}'''
+
Note: For ''logOrUpdateIncident'', ''logOrUpdateServiceRequest'' and ''updateRequest'' operations the '''Reference''' field is a mandatory parameter. You will need to specify the Regex Syntax that matches your (call) reference in the email's '''Subject'''.  E.g. for the standard out-of-the-box reference use: '''[a-zA-Z]{2}[0-9]{8}'''.
 +
 
 +
To match the same Reference format in the Rule Expression use the following: '''REGEX_MATCH(subject, '.*\b[a-zA-Z]{2}[0-9]{8}\b.*')'''
  
 
[[Category:Administration]]
 
[[Category:Administration]]
 +
-->
 +
[[Category:HDOC]]

Latest revision as of 19:56, 11 April 2024

This document can now be found at its new location in the Hornbill Document Library.

Hornbill Cloud