Scans a SalesDataSeries for sets of records matching a RecordMatcher's configured type, and generates corresponding destination SalesDataRecords. Runs before PointsAllocationSource processing, so generated records are then eligible for normal points allocation.

Group: Managers


Properties

PropertyReturnsDescription
allRecordMatcherTypesList<RecordMatcherType>All available record matcher types: the built-in Java types plus any account-specific JsRecordMatcherType instances configured in that account's Queries repo (mirroring PointsManager.getAllPointsRuleTypes()). Deliberately does not merge in app-registered builders - unlike points rules, record matchers are intended to be custom per-account implementations, not reusable marketplace types.

Methods

getAllRecordMatcherTypes() · recordMatcherType(String id) · newRecordMatcherBuilder(SalesDataSeries series) · linkedAsSource(SalesDataRecord record) · linkedAsDestination(SalesDataRecord record) · sourceLinksForGroup(RecordMatch group) · sourceRecordQuantitiesForGroup(RecordMatch group) · destLinksForGroup(RecordMatch group) · invalidationLinksForGroup(RecordMatch group) · invalidationSourceFor(SalesDataRecord record) · processRecordMatchers(SalesDataSeries series, Consumer<String> progressCallback) · processRecordMatchersForParticipant(SalesDataSeries series, BaseEntity participant) · dryRunPreviewPath(SalesDataSeries series) · hasDryRunPreview(SalesDataSeries series) · deleteDryRunPreview(SalesDataSeries series)

getAllRecordMatcherTypes()

Returns: List<RecordMatcherType>

All available record matcher types: the built-in Java types plus any account-specific JsRecordMatcherType instances configured in that account's Queries repo (mirroring PointsManager.getAllPointsRuleTypes()). Deliberately does not merge in app-registered builders - unlike points rules, record matchers are intended to be custom per-account implementations, not reusable marketplace types.

recordMatcherType(String id)

Returns: RecordMatcherType

Looks up one of the available record matcher types by its id.

ParameterDescription
idthe record matcher type id to look up

newRecordMatcherBuilder(SalesDataSeries series)

Returns: RecordMatcherBuilder

Starts a fluent builder for creating and persisting a new record matcher on the given sales data series.

ParameterDescription
seriesthe sales data series the new record matcher will be configured against

linkedAsSource(SalesDataRecord record)

Returns: List<RecordMatchLink>

Records linked to the given record as a SOURCE, ie matches this record was consumed by. Used by the sales record detail page.

ParameterDescription
recordthe sales data record to find source links for

linkedAsDestination(SalesDataRecord record)

Returns: List<RecordMatchLink>

Records linked to the given record as a DEST, ie matches that generated this record. Used by the sales record detail page.

ParameterDescription
recordthe sales data record to find destination links for

sourceLinksForGroup(RecordMatch group)

Returns: List<RecordMatchLink>

The source-record links belonging to a single matched group. Used by the record matcher's History tab.

ParameterDescription
groupthe match group to find source links for

sourceRecordQuantitiesForGroup(RecordMatch group)

Returns: List<SourceRecordQuantity>

Same as sourceLinksForGroup(), but collapsed to one entry per distinct source record with a quantity count - a matcher type like bundle can link the same source record more than once (see BundleRecordMatcherType), which would otherwise show as repeated identical rows on the record matcher's History tab.

ParameterDescription
groupthe match group to find source record quantities for

destLinksForGroup(RecordMatch group)

Returns: List<RecordMatchLink>

The destination-record links belonging to a single matched group. Used by the record matcher's History tab.

ParameterDescription
groupthe match group to find destination links for

invalidationLinksForGroup(RecordMatch group)

Returns: List<RecordMatchLink>

The invalidation record(s) linked to a match once it's been invalidated (see RecordMatchLink.ROLE_INVALIDATION). Empty for an ACTIVE match.

ParameterDescription
groupthe match group to find invalidation links for

invalidationSourceFor(SalesDataRecord record)

Returns: RecordMatch

If the given record is itself an invalidation record (ie it negates a previous match), the match it invalidates. Null otherwise. Used by the sales record detail page.

ParameterDescription
recordthe sales data record to check

processRecordMatchers(SalesDataSeries series, Consumer<String> progressCallback)

Returns: void

Runs every active record matcher configured on the given series. Runs manually (via an admin action) for now - not yet wired into the import pipeline or a MapReduce batch job. In dry-run mode, clears the series' record-matcher preview spreadsheet before scanning, so each run replaces the previous one rather than accumulating duplicate rows on top of it - see deleteDryRunPreview().

ParameterDescription
seriesthe sales data series whose active record matchers should be run
progressCallbackoptional callback invoked with a status message before each matcher runs and after each one that produced results, or null

processRecordMatchersForParticipant(SalesDataSeries series, BaseEntity participant)

Returns: void

Runs every active record matcher configured on the given series, scoped to a single participant.

ParameterDescription
seriesthe sales data series whose active record matchers should be run
participantthe single participant (sales rep or sales team) to scope matching to

dryRunPreviewPath(SalesDataSeries series)

Returns: Path

The path of the series' own record-matcher dry-run preview spreadsheet - a plain, mechanic-owned file that never touches Hibernate-persisted RecordMatch/RecordMatchLink entities. Kept separate from the points-allocation dry-run preview (see DataSeriesManager.dryRunPreviewPath()), since the two mechanics have unrelated taxonomies - that one is about points credits/debits, this one is about matched groups of source/destination records.

ParameterDescription
seriesa sales data series

hasDryRunPreview(SalesDataSeries series)

Returns: boolean

Whether the series' record-matcher dry-run preview spreadsheet has actually been created.

ParameterDescription
seriesa sales data series

deleteDryRunPreview(SalesDataSeries series)

Returns: void

Permanently discards every row in the series' record-matcher dry-run preview spreadsheet.

ParameterDescription
seriesthe sales data series to clear the record-matcher dry-run preview for
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.