My favorites | Sign in
Project Home
Search
for
Rules  
How to specify routing rules
Updated Aug 13, 2010 by aborensz...@gtempaccount.com

Routing Rules

You can specify routing rules in many points of the AO and AT routing algorithms.

Each rule is made of conditions and actions.

Conditions

Conditions specify when a rule's actions are executed.

  • When no condition is specified, the rule's actions are always executed.
  • When more than one condition is specified, the rule's actions will be executed when all the conditions are true.

For conditions on text fields, such as "from", "to", "subject" and "body", you can specify simple operations like "is" (test for equality), "is not", and "starts with". More complex conditions on these fields can be specified using regular expressions.

Regular Expressions

Their syntax used must be that of Ruby. When using groups matching you can use them in the actions:

  • ${n}, where n is an integer equal to or bigger than 1, will match the nth group of the first condition that tests for a regular expression.
  • ${field.n}, where field is the name of a field such as "from", "to", "subject" and "body", and n is an integer equal to or bigger than 1, will match the nth group of the condition on that field.

Actions

Actions set or change a message's fields or custom attributes.

Comment by project member edujez@gmail.com, Dec 16, 2010

Please provide examples of regexes that are needed for common tasks.. e.g. contains string 'foo'. Also please explain what the 'stop' field does


Sign in to add a comment
Powered by Google Project Hosting