md-systems / crm_core

Drupal 8 port of the CRM Core module
https://www.drupal.org/project/crm_core
11 stars 10 forks source link

Feature: Chaining Matcher #22

Open mirodietiker opened 9 years ago

mirodietiker commented 9 years ago

A matcher offers a simple matching for a specific set.

Previously, there was a global match thing to call all matchers for action. This leads to trouble in case a matcher is only to be executed for a specific case and makes no sense in a global scope.

A chaining Matcher can be selected as a single matcher and internally operates on all selected matchers. Also it maintains an order and a strategy if it stops after a first successfull match.. or if it executes all matchers and reorders the results at the end by score...

The rules / fields for matching need to be collected from all called matchers to offer contexts.

A problem is if the matchers then allow multiple contact types. Currently the contact type is the bundle that is always set on the contact template. The contact type newly needs to be optional.