The Rules Engine

The rules engine is the heart of Contact Manager, telling the software how to process the entries found in imported address books. The rules tell Contact Manager:

  • how to differentiate between entries, using a filter value
  • the output actions it should take for different entries
  • any additional information that should be added to the entries
  • what purge settings to apply
  • what default mail type entries should have
  • how to name the contact object on the directory

When an address book is imported, the entries are passed to the rule engine one at a time. The rules engine will try and match the entry to each of the individual rule’s filter values. The rules are processed in order, starting with the first.

When an entry matches a rule's filter value, the entry is updated by that rule’s settings and then it is processed according to the rule’s output action. This could be creation in an OU, adding to a text file or to be ignored.

Once an entry has matched a rule, the remaining rules are then ignored, and processing passes to the next entry. If an entry does not match against any of the rules, it is marked as unmatched, and the next entry passed to the rules engine.

Each rule contains the following options:

  • Friendly Name – a user-defined name used to reference the rule. This name will be used for reporting purposes.
  • Filter Value – how to match entries against the rule
  • Output Action – how to process matching entries
  • Purge Type – what type of purging will be used for matching entries
  • Expiry Age – the age of entries before they are purged
  • Template – additional information to be added to the entries before creation
  • Mail Type – the default mail type the entries will use
  • Object Name - the value to be used to name the contact object on the directory

The rule's filter value is used to match entries to the rule. Each filter value is made up of an attribute, a value and a matching operator.

  • Attribute – a field present on the address book file (e.g., Organisation Code, Department)
  • Value – a free text value that entries will match against (e.g., RX5, Human Resources)
  • Matching Operator – How the value should be compared against the attribute (e.g., equals, contains, starts with)

When using the "equal to" and "does not equal" operators, the * (asterisk) can be used to capture all entries.

As each entry is passed through the rules engine, it is checked to see if it matches this filter value. When an attribute on the entry matches the value, a match has been made and the entry processed according to that rule’s settings.

Rules are processed in order, with the first taking priority and then working sequentially to the last. When adding rules, very specific rules should be placed at the top and more general rules placed towards the bottom. When added, rules are inserted at the bottom of the list.

The purge options only apply to rules that are creating contacts on a directory.