A RecordMatcherType implemented in JS, configured per-account as a "record-matcher" element in the Queries repo's record-matchers.xml - lets an account build a custom matcher (eg one specific to its own data shape) without a Java deployment. It is driven by up to three named script functions: matchFn is required and groups or splits candidate sales records into matched source/destination sets; candidateCriteriaFn is an optional function that narrows the base candidate query; and revalidateFn is an optional function that rechecks existing matches for continued validity, falling back to RecordMatcherType's default invalidation logic when omitted.
Group: Rewards
Implements: RecordMatcherType
Properties
| Property | Returns | Description |
|---|---|---|
| candidateCriteriaFn | String | Name of the optional JS function that narrows the base candidate query for this matcher. |
| fields | List<ExtraField> | The configuration fields shown when setting up this matcher, as defined in the account's Queries repo configuration, used to build the generic form when getFormPath() is not set. |
| formPath | String | Path to a Velocity template fragment that renders a purpose-built management UI form for this matcher's own parameters, in place of the generic form built from getFields(). |
| id | String | Unique identifier for this matcher instance, used to select it when configuring record matching. |
| matchFn | String | Name of the required JS function that groups or splits candidate sales records into matched source/destination sets. |
| revalidateFn | String | Name of the optional JS function that rechecks this matcher's existing active matches for continued validity. |
| reversalDetector | boolean | Whether this matcher only links its own source records together (eg to detect reversed transactions) rather than producing new destination records. |
| title | String | Display title shown when choosing a record matcher type in the admin UI. |
Methods
getId()
Returns: String
Unique identifier for this matcher instance, used to select it when configuring record matching.
getTitle()
Returns: String
Display title shown when choosing a record matcher type in the admin UI.
getFields()
Returns: List<ExtraField>
The configuration fields shown when setting up this matcher, as defined in the account's Queries repo configuration, used to build the generic form when getFormPath() is not set.
getFormPath()
Returns: String
Path to a Velocity template fragment that renders a purpose-built management UI form for this matcher's own parameters, in place of the generic form built from getFields().
getCandidateCriteriaFn()
Returns: String
Name of the optional JS function that narrows the base candidate query for this matcher.
getMatchFn()
Returns: String
Name of the required JS function that groups or splits candidate sales records into matched source/destination sets.
getRevalidateFn()
Returns: String
Name of the optional JS function that rechecks this matcher's existing active matches for continued validity.
isReversalDetector()
Returns: boolean
Whether this matcher only links its own source records together (eg to detect reversed transactions) rather than producing new destination records.